@c8y/ngx-components 1023.43.3 → 1023.47.1
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/ai/agent-chat/index.d.ts +6 -1
- package/ai/agent-chat/index.d.ts.map +1 -1
- package/ai/ai-chat/index.d.ts.map +1 -1
- package/ai/index.d.ts +39 -30
- package/ai/index.d.ts.map +1 -1
- package/datapoints-export-selector/index.d.ts +2 -1
- package/datapoints-export-selector/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +24 -9
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +5 -4
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +63 -33
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +6 -3
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +5 -4
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +29 -20
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +1 -5
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs +3 -33
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +1203 -34
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs +3 -2
- package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +32 -4
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +122 -80
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +55 -6
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +28 -3
- package/index.d.ts.map +1 -1
- package/locales/de.po +14 -20
- package/locales/es.po +13 -19
- package/locales/fr.po +18 -24
- package/locales/ja_JP.po +13 -19
- package/locales/ko.po +13 -19
- package/locales/locales.pot +11 -17
- package/locales/nl.po +13 -19
- package/locales/pl.po +13 -19
- package/locales/pt_BR.po +13 -19
- package/locales/zh_CN.po +13 -19
- package/locales/zh_TW.po +13 -19
- package/package.json +1 -1
- package/trusted-certificates/index.d.ts +0 -2
- package/trusted-certificates/index.d.ts.map +1 -1
- package/upgrade/index.d.ts.map +1 -1
- package/widgets/definitions/markdown/index.d.ts +1 -1
- package/widgets/implementations/datapoints-graph/index.d.ts +3 -0
- package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
- package/widgets/implementations/markdown/index.d.ts +23 -13
- package/widgets/implementations/markdown/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade-not-found.component-CuCuYAkK.mjs +0 -19
- package/fesm2022/c8y-ngx-components-upgrade-not-found.component-CuCuYAkK.mjs.map +0 -1
|
@@ -4,13 +4,20 @@ import { gettext } from '@c8y/ngx-components/gettext';
|
|
|
4
4
|
import * as i1 from '@c8y/ngx-components';
|
|
5
5
|
import { C8yValidators, FormGroupComponent, DropAreaComponent, EmptyStateComponent, IconDirective, C8yTranslatePipe, MarkdownToHtmlPipe } from '@c8y/ngx-components';
|
|
6
6
|
import * as i1$1 from '@angular/forms';
|
|
7
|
-
import { Validators, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import { Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
8
8
|
import * as i2 from '@c8y/client';
|
|
9
9
|
import * as i3 from '@ngx-translate/core';
|
|
10
10
|
import { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';
|
|
11
11
|
import { AsyncPipe } from '@angular/common';
|
|
12
|
-
import { Subject } from 'rxjs';
|
|
12
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
|
13
13
|
import { takeUntil } from 'rxjs/operators';
|
|
14
|
+
import { EditorComponent } from '@c8y/ngx-components/editor';
|
|
15
|
+
|
|
16
|
+
const MarkdownSourceType = {
|
|
17
|
+
WRITE: 'writeMarkdown',
|
|
18
|
+
UPLOAD: 'uploadBinary',
|
|
19
|
+
URL: 'uploadUrl'
|
|
20
|
+
};
|
|
14
21
|
|
|
15
22
|
class MarkdownWidgetService {
|
|
16
23
|
constructor(fileService, inventory, binary, alert, translate, fetchClient, appStateService) {
|
|
@@ -119,19 +126,30 @@ class MarkdownWidgetConfigComponent {
|
|
|
119
126
|
this.form = form;
|
|
120
127
|
this.alert = alert;
|
|
121
128
|
this.markdownService = markdownService;
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
129
|
+
this.MarkdownSourceType = MarkdownSourceType;
|
|
130
|
+
this.uploadChoice = MarkdownSourceType.URL;
|
|
131
|
+
this.previewMarkdown$ = new BehaviorSubject('');
|
|
132
|
+
this.editorContent = '';
|
|
124
133
|
this.widgetConfigService = inject(WidgetConfigService);
|
|
125
134
|
this.destroy$ = new Subject();
|
|
126
135
|
}
|
|
127
136
|
async onBeforeSave(config) {
|
|
137
|
+
if (this.uploadChoice === MarkdownSourceType.WRITE) {
|
|
138
|
+
Object.assign(config, {
|
|
139
|
+
markdownContent: this.editorContent,
|
|
140
|
+
contentUrl: null,
|
|
141
|
+
markdownBinaryId: null
|
|
142
|
+
});
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
128
145
|
if (this.formGroup.invalid) {
|
|
129
146
|
return false;
|
|
130
147
|
}
|
|
131
|
-
if (this.uploadChoice ===
|
|
148
|
+
if (this.uploadChoice === MarkdownSourceType.URL) {
|
|
132
149
|
Object.assign(config, {
|
|
133
150
|
contentUrl: this.formGroup.value.contentUrl,
|
|
134
|
-
markdownBinaryId: null
|
|
151
|
+
markdownBinaryId: null,
|
|
152
|
+
markdownContent: null
|
|
135
153
|
});
|
|
136
154
|
return true;
|
|
137
155
|
}
|
|
@@ -139,7 +157,7 @@ class MarkdownWidgetConfigComponent {
|
|
|
139
157
|
if (fileFromForm && fileFromForm !== this.fileFromConfig) {
|
|
140
158
|
try {
|
|
141
159
|
const markdownBinaryId = await this.markdownService.uploadFile(fileFromForm);
|
|
142
|
-
Object.assign(config, { markdownBinaryId, contentUrl: null });
|
|
160
|
+
Object.assign(config, { markdownBinaryId, contentUrl: null, markdownContent: null });
|
|
143
161
|
return true;
|
|
144
162
|
}
|
|
145
163
|
catch (e) {
|
|
@@ -148,22 +166,41 @@ class MarkdownWidgetConfigComponent {
|
|
|
148
166
|
}
|
|
149
167
|
}
|
|
150
168
|
if (!fileFromForm) {
|
|
151
|
-
Object.assign(config, {
|
|
169
|
+
Object.assign(config, {
|
|
170
|
+
contentUrl: '/readme.md',
|
|
171
|
+
markdownBinaryId: null,
|
|
172
|
+
markdownContent: null
|
|
173
|
+
});
|
|
152
174
|
}
|
|
153
175
|
return true;
|
|
154
176
|
}
|
|
155
177
|
async ngOnInit() {
|
|
156
|
-
|
|
157
|
-
if (this.config.
|
|
158
|
-
this.uploadChoice =
|
|
159
|
-
this.fileFromConfig = await this.markdownService.getFile(this.config.markdownBinaryId);
|
|
160
|
-
this.formGroup.patchValue({
|
|
161
|
-
droppedFile: [{ file: this.fileFromConfig, name: this.fileFromConfig.name }]
|
|
162
|
-
});
|
|
163
|
-
await this.updatePreviewFromFile(this.fileFromConfig);
|
|
178
|
+
// Determine initial mode from config
|
|
179
|
+
if (this.config.markdownContent) {
|
|
180
|
+
this.uploadChoice = MarkdownSourceType.WRITE;
|
|
164
181
|
}
|
|
165
|
-
else if (this.config.
|
|
166
|
-
this.
|
|
182
|
+
else if (this.config.markdownBinaryId) {
|
|
183
|
+
this.uploadChoice = MarkdownSourceType.UPLOAD;
|
|
184
|
+
}
|
|
185
|
+
this.initForm();
|
|
186
|
+
// Load initial content based on mode
|
|
187
|
+
switch (this.uploadChoice) {
|
|
188
|
+
case MarkdownSourceType.WRITE:
|
|
189
|
+
this.editorContent = this.config.markdownContent;
|
|
190
|
+
this.previewMarkdown$.next(this.config.markdownContent);
|
|
191
|
+
break;
|
|
192
|
+
case MarkdownSourceType.UPLOAD:
|
|
193
|
+
this.fileFromConfig = await this.markdownService.getFile(this.config.markdownBinaryId);
|
|
194
|
+
this.formGroup.patchValue({
|
|
195
|
+
droppedFile: [{ file: this.fileFromConfig, name: this.fileFromConfig.name }]
|
|
196
|
+
});
|
|
197
|
+
await this.updatePreviewFromFile(this.fileFromConfig);
|
|
198
|
+
break;
|
|
199
|
+
case MarkdownSourceType.URL:
|
|
200
|
+
if (this.config.contentUrl) {
|
|
201
|
+
this.previewMarkdown$.next(await this.markdownService.getContentFromUrl(this.config.contentUrl));
|
|
202
|
+
}
|
|
203
|
+
break;
|
|
167
204
|
}
|
|
168
205
|
this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(async (value) => {
|
|
169
206
|
await this.updatePreview(value);
|
|
@@ -177,38 +214,48 @@ class MarkdownWidgetConfigComponent {
|
|
|
177
214
|
this.uploadChoice = value;
|
|
178
215
|
// Ensure dropped file has 'name' property for drop area to display filename
|
|
179
216
|
const droppedFile = this.formGroup.value.droppedFile;
|
|
180
|
-
if (value ===
|
|
217
|
+
if (value === MarkdownSourceType.UPLOAD && droppedFile?.[0]?.file) {
|
|
181
218
|
const normalizedFile = droppedFile.map(item => ({
|
|
182
219
|
...item,
|
|
183
220
|
name: item.name || item.file?.name
|
|
184
221
|
}));
|
|
185
222
|
this.formGroup.controls['droppedFile'].setValue(normalizedFile);
|
|
186
223
|
}
|
|
224
|
+
this.formGroup.updateValueAndValidity();
|
|
225
|
+
}
|
|
226
|
+
onEditorChange(content) {
|
|
227
|
+
this.editorContent = content;
|
|
228
|
+
this.previewMarkdown$.next(content);
|
|
187
229
|
}
|
|
188
230
|
async updatePreview(formValue) {
|
|
189
231
|
const choice = formValue.uploadChoice || this.uploadChoice;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
232
|
+
switch (choice) {
|
|
233
|
+
case MarkdownSourceType.WRITE:
|
|
234
|
+
if (!this.editorContent) {
|
|
235
|
+
this.editorContent = this.previewMarkdown$.getValue();
|
|
236
|
+
}
|
|
237
|
+
this.previewMarkdown$.next(this.editorContent);
|
|
238
|
+
break;
|
|
239
|
+
case MarkdownSourceType.UPLOAD:
|
|
240
|
+
const file = this.getFileFromFormValue(formValue);
|
|
241
|
+
file ? await this.updatePreviewFromFile(file) : this.previewMarkdown$.next('');
|
|
242
|
+
break;
|
|
243
|
+
case MarkdownSourceType.URL:
|
|
244
|
+
if (formValue.contentUrl) {
|
|
245
|
+
this.previewMarkdown$.next(await this.markdownService.getContentFromUrl(formValue.contentUrl));
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.previewMarkdown$.next('');
|
|
249
|
+
}
|
|
250
|
+
break;
|
|
204
251
|
}
|
|
205
252
|
}
|
|
206
253
|
async updatePreviewFromFile(file) {
|
|
207
254
|
try {
|
|
208
|
-
this.previewMarkdown
|
|
255
|
+
this.previewMarkdown$.next(await file.text());
|
|
209
256
|
}
|
|
210
257
|
catch {
|
|
211
|
-
this.previewMarkdown
|
|
258
|
+
this.previewMarkdown$.next('');
|
|
212
259
|
}
|
|
213
260
|
}
|
|
214
261
|
getFileFromFormValue(formValue) {
|
|
@@ -223,72 +270,64 @@ class MarkdownWidgetConfigComponent {
|
|
|
223
270
|
Validators.maxLength(1),
|
|
224
271
|
C8yValidators.filesValidator({ maximumFileSizeInKb: 1000 })
|
|
225
272
|
]),
|
|
226
|
-
uploadChoice: this.formBuilder.nonNullable.control(this.
|
|
227
|
-
}, { validators: this.
|
|
273
|
+
uploadChoice: this.formBuilder.nonNullable.control(this.uploadChoice)
|
|
274
|
+
}, { validators: this.requireValidSource() });
|
|
228
275
|
this.form.form.addControl('config', this.formGroup);
|
|
229
276
|
this.formGroup.patchValue(this.config);
|
|
230
277
|
}
|
|
231
|
-
|
|
278
|
+
requireValidSource() {
|
|
232
279
|
return (control) => {
|
|
233
|
-
const url = control.get(
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const error = { required: true };
|
|
241
|
-
uploadBinary.setErrors(Object.assign({}, uploadBinary.errors || {}, error));
|
|
242
|
-
Object.assign(errors, error);
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
// remove previous error
|
|
246
|
-
this.removeErrors(uploadBinary, ['required']);
|
|
280
|
+
const url = control.get('contentUrl');
|
|
281
|
+
const droppedFile = control.get('droppedFile');
|
|
282
|
+
// Write mode - always valid, editor content handled separately
|
|
283
|
+
if (this.uploadChoice === MarkdownSourceType.WRITE) {
|
|
284
|
+
url.setErrors(null);
|
|
285
|
+
droppedFile.setErrors(null);
|
|
286
|
+
return null;
|
|
247
287
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
288
|
+
// Clear required errors on inactive controls, set on active if empty
|
|
289
|
+
if (this.uploadChoice === MarkdownSourceType.URL) {
|
|
290
|
+
this.clearRequiredError(droppedFile);
|
|
291
|
+
if (!url.value) {
|
|
292
|
+
url.setErrors({ ...url.errors, required: true });
|
|
293
|
+
return { required: true };
|
|
294
|
+
}
|
|
295
|
+
this.clearRequiredError(url);
|
|
253
296
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
297
|
+
if (this.uploadChoice === MarkdownSourceType.UPLOAD) {
|
|
298
|
+
this.clearRequiredError(url);
|
|
299
|
+
if (!droppedFile.value) {
|
|
300
|
+
droppedFile.setErrors({ ...droppedFile.errors, required: true });
|
|
301
|
+
return { required: true };
|
|
302
|
+
}
|
|
303
|
+
this.clearRequiredError(droppedFile);
|
|
257
304
|
}
|
|
258
|
-
return
|
|
305
|
+
return null;
|
|
259
306
|
};
|
|
260
307
|
}
|
|
261
|
-
|
|
262
|
-
if (
|
|
263
|
-
|
|
308
|
+
clearRequiredError(control) {
|
|
309
|
+
if (control?.errors?.required) {
|
|
310
|
+
const { required: _, ...rest } = control.errors;
|
|
311
|
+
control.setErrors(Object.keys(rest).length ? rest : null);
|
|
264
312
|
}
|
|
265
|
-
let removedError = false;
|
|
266
|
-
for (const error of errors) {
|
|
267
|
-
if (control.errors[error]) {
|
|
268
|
-
removedError = true;
|
|
269
|
-
delete control.errors[error];
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
if (removedError) {
|
|
273
|
-
control.setErrors(Object.keys(control.errors).length ? Object.assign({}, control.errors) : null);
|
|
274
|
-
}
|
|
275
|
-
return removedError;
|
|
276
313
|
}
|
|
277
314
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MarkdownWidgetConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: i1$1.NgForm }, { token: i1.AlertService }, { token: MarkdownWidgetService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: MarkdownWidgetConfigComponent, isStandalone: true, selector: "c8y-markdown-widget-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "markdownPreviewTemplate", first: true, predicate: ["markdownPreview"], descendants: true }], ngImport: i0, template: "<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\">\n <div class=\"form-group\">\n <label\n class=\"c8y-radio radio-inline\"\n title=\"{{ 'Upload a binary' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n value=\"
|
|
315
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: MarkdownWidgetConfigComponent, isStandalone: true, selector: "c8y-markdown-widget-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "markdownPreviewTemplate", first: true, predicate: ["markdownPreview"], descendants: true }], ngImport: i0, template: "<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\">\n <div class=\"form-group\">\n <label\n class=\"c8y-radio radio-inline\"\n title=\"{{ 'Write Markdown' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.WRITE\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.WRITE)\"\n />\n <span></span>\n <span>{{ 'Write Markdown' | translate }}</span>\n </label>\n <label\n class=\"c8y-radio radio-inline m-l-8\"\n title=\"{{ 'Upload a binary' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.UPLOAD\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.UPLOAD)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label\n class=\"c8y-radio radio-inline m-l-8\"\n title=\"{{ 'Provide a file path' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.URL\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.URL)\"\n />\n <span></span>\n <span>{{ 'Provide a file path' | translate }}</span>\n </label>\n </div>\n @switch (uploadChoice) {\n @case (MarkdownSourceType.WRITE) {\n <c8y-editor\n class=\"d-block\"\n style=\"height: 300px\"\n [ngModel]=\"editorContent\"\n (ngModelChange)=\"onEditorChange($event)\"\n [ngModelOptions]=\"{ standalone: true }\"\n [editorOptions]=\"{\n language: 'markdown',\n tabSize: 2,\n insertSpaces: true,\n minimap: { enabled: false },\n wordWrap: 'on'\n }\"\n ></c8y-editor>\n }\n @case (MarkdownSourceType.UPLOAD) {\n <c8y-form-group class=\"m-b-24\">\n <c8y-drop-area\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n formControlName=\"droppedFile\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n }\n @case (MarkdownSourceType.URL) {\n <c8y-form-group class=\"m-b-24\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n type=\"text\"\n formControlName=\"contentUrl\"\n />\n </div>\n </c8y-form-group>\n }\n }\n </form>\n</fieldset>\n\n<ng-template #markdownPreview>\n @if (previewMarkdown$ | async; as previewMarkdown) {\n <div\n class=\"p-16 p-t-0 markdown-content fit-h overflow-auto\"\n [innerHTML]=\"previewMarkdown | markdownToHtml | async\"\n ></div>\n } @else {\n <div class=\"fit-h d-flex d-col j-c-center a-i-center\">\n <c8y-ui-empty-state\n [icon]=\"'file-text'\"\n [title]=\"'No content to preview' | translate\"\n [subtitle]=\"\n 'Write Markdown, upload a file, or provide a URL to see the preview' | translate\n \"\n [horizontal]=\"false\"\n ></c8y-ui-empty-state>\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: DropAreaComponent, selector: "c8y-drop-area", inputs: ["formControl", "title", "message", "icon", "loadingMessage", "forceHideList", "alwaysShow", "clickToOpen", "loading", "progress", "maxAllowedFiles", "files", "maxFileSizeInMegaBytes", "accept"], outputs: ["dropped"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: EditorComponent, selector: "c8y-editor", inputs: ["editorOptions", "theme"], outputs: ["editorInit"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: MarkdownToHtmlPipe, name: "markdownToHtml" }] }); }
|
|
279
316
|
}
|
|
280
317
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MarkdownWidgetConfigComponent, decorators: [{
|
|
281
318
|
type: Component,
|
|
282
319
|
args: [{ selector: 'c8y-markdown-widget-config', standalone: true, imports: [
|
|
283
320
|
ReactiveFormsModule,
|
|
321
|
+
FormsModule,
|
|
284
322
|
AsyncPipe,
|
|
285
323
|
C8yTranslatePipe,
|
|
286
324
|
MarkdownToHtmlPipe,
|
|
287
325
|
FormGroupComponent,
|
|
288
326
|
DropAreaComponent,
|
|
289
327
|
EmptyStateComponent,
|
|
290
|
-
IconDirective
|
|
291
|
-
|
|
328
|
+
IconDirective,
|
|
329
|
+
EditorComponent
|
|
330
|
+
], template: "<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\">\n <div class=\"form-group\">\n <label\n class=\"c8y-radio radio-inline\"\n title=\"{{ 'Write Markdown' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.WRITE\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.WRITE)\"\n />\n <span></span>\n <span>{{ 'Write Markdown' | translate }}</span>\n </label>\n <label\n class=\"c8y-radio radio-inline m-l-8\"\n title=\"{{ 'Upload a binary' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.UPLOAD\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.UPLOAD)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label\n class=\"c8y-radio radio-inline m-l-8\"\n title=\"{{ 'Provide a file path' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.URL\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.URL)\"\n />\n <span></span>\n <span>{{ 'Provide a file path' | translate }}</span>\n </label>\n </div>\n @switch (uploadChoice) {\n @case (MarkdownSourceType.WRITE) {\n <c8y-editor\n class=\"d-block\"\n style=\"height: 300px\"\n [ngModel]=\"editorContent\"\n (ngModelChange)=\"onEditorChange($event)\"\n [ngModelOptions]=\"{ standalone: true }\"\n [editorOptions]=\"{\n language: 'markdown',\n tabSize: 2,\n insertSpaces: true,\n minimap: { enabled: false },\n wordWrap: 'on'\n }\"\n ></c8y-editor>\n }\n @case (MarkdownSourceType.UPLOAD) {\n <c8y-form-group class=\"m-b-24\">\n <c8y-drop-area\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n formControlName=\"droppedFile\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n }\n @case (MarkdownSourceType.URL) {\n <c8y-form-group class=\"m-b-24\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n type=\"text\"\n formControlName=\"contentUrl\"\n />\n </div>\n </c8y-form-group>\n }\n }\n </form>\n</fieldset>\n\n<ng-template #markdownPreview>\n @if (previewMarkdown$ | async; as previewMarkdown) {\n <div\n class=\"p-16 p-t-0 markdown-content fit-h overflow-auto\"\n [innerHTML]=\"previewMarkdown | markdownToHtml | async\"\n ></div>\n } @else {\n <div class=\"fit-h d-flex d-col j-c-center a-i-center\">\n <c8y-ui-empty-state\n [icon]=\"'file-text'\"\n [title]=\"'No content to preview' | translate\"\n [subtitle]=\"\n 'Write Markdown, upload a file, or provide a URL to see the preview' | translate\n \"\n [horizontal]=\"false\"\n ></c8y-ui-empty-state>\n </div>\n }\n</ng-template>\n" }]
|
|
292
331
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i1$1.NgForm }, { type: i1.AlertService }, { type: MarkdownWidgetService }], propDecorators: { config: [{
|
|
293
332
|
type: Input
|
|
294
333
|
}], markdownPreviewTemplate: [{
|
|
@@ -301,7 +340,10 @@ class MarkdownWidgetViewComponent {
|
|
|
301
340
|
this.markdownWidgetService = markdownWidgetService;
|
|
302
341
|
}
|
|
303
342
|
async ngOnInit() {
|
|
304
|
-
if (this.config.
|
|
343
|
+
if (this.config.markdownContent) {
|
|
344
|
+
this.markdown = this.config.markdownContent;
|
|
345
|
+
}
|
|
346
|
+
else if (this.config.markdownBinaryId) {
|
|
305
347
|
const file = await this.markdownWidgetService.getFile(this.config.markdownBinaryId);
|
|
306
348
|
this.markdown = await file?.text();
|
|
307
349
|
}
|
|
@@ -323,5 +365,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
323
365
|
* Generated bundle index. Do not edit.
|
|
324
366
|
*/
|
|
325
367
|
|
|
326
|
-
export { MarkdownWidgetConfigComponent, MarkdownWidgetService, MarkdownWidgetViewComponent };
|
|
368
|
+
export { MarkdownSourceType, MarkdownWidgetConfigComponent, MarkdownWidgetService, MarkdownWidgetViewComponent };
|
|
327
369
|
//# sourceMappingURL=c8y-ngx-components-widgets-implementations-markdown.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-implementations-markdown.mjs","sources":["../../widgets/implementations/markdown/markdown-widget.service.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.html","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.ts","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.html","../../widgets/implementations/markdown/c8y-ngx-components-widgets-implementations-markdown.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n FetchClient,\n IFetchOptions,\n IManagedObjectBinary,\n InventoryBinaryService,\n InventoryService\n} from '@c8y/client';\nimport { AlertService, AppStateService, FilesService } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Injectable({ providedIn: 'root' })\nexport class MarkdownWidgetService {\n private readonly headers = { 'Content-Type': 'text/markdown' };\n\n constructor(\n private fileService: FilesService,\n private inventory: InventoryService,\n private binary: InventoryBinaryService,\n private alert: AlertService,\n private translate: TranslateService,\n private fetchClient: FetchClient,\n private appStateService: AppStateService\n ) {}\n\n /**\n * Retrieves a markdown file from the inventory by its binary ID.\n * @param markdownBinaryId - The ID of the binary managed object.\n * @returns The file if found, otherwise null.\n */\n async getFile(markdownBinaryId: string | null): Promise<File> {\n if (!markdownBinaryId) {\n return null;\n }\n\n try {\n const { data: markdownBinaryMo } = await this.inventory.detail(markdownBinaryId);\n const file = await this.fileService.getFile(markdownBinaryMo as IManagedObjectBinary);\n return file;\n } catch (e) {\n const text = this.translate.instant(\n gettext('Unable to retrieve binary with ID: {{ markdownBinaryId }}'),\n { markdownBinaryId }\n );\n this.alert.danger(text, e?.data);\n }\n\n return null;\n }\n\n /**\n * Uploads a markdown file to the inventory as a binary.\n * @param file - The file to upload.\n * @returns The ID of the created binary managed object.\n */\n async uploadFile(file: File): Promise<string> {\n const { data: mo } = await this.binary.create(file);\n return mo.id;\n }\n\n /**\n * Fetches markdown content from a URL.\n * For internal URLs (e.g., `/readme.md`), uses FetchClient with the app's context path.\n * For external URLs, uses XMLHttpRequest to avoid CORS issues with auth headers.\n * @param url - The URL to fetch content from.\n * @returns The markdown content as a string, or empty string on error.\n */\n async getContentFromUrl(url: string): Promise<string> {\n if (url?.toLowerCase() === '/readme.md') {\n return this.getContentFromInternalUrl(url);\n }\n return this.getContentFromExternalUrl(url);\n }\n\n private async getContentFromInternalUrl(url: string): Promise<string> {\n try {\n const contextPath = this.appStateService.state.app.contextPath;\n const options: IFetchOptions = {\n method: 'GET',\n headers: this.headers\n };\n const response = await this.fetchClient.fetch(`/apps/${contextPath}${url}`, options);\n if (response.status === 200) {\n return response.text();\n }\n } catch {\n // ignore error, return empty string\n }\n return '';\n }\n\n private getContentFromExternalUrl(url: string): Promise<string> {\n return new Promise(resolve => {\n const req = new XMLHttpRequest();\n req.onreadystatechange = () => {\n if (req.readyState === 4) {\n if (req.status === 200) {\n resolve(req.response);\n } else {\n resolve('');\n }\n }\n };\n req.onerror = () => resolve('');\n req.open('GET', url);\n req.responseType = 'text';\n req.setRequestHeader('Accept', 'text/html');\n req.send();\n });\n }\n}\n","import { Component, inject, Input, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AlertService,\n C8yTranslatePipe,\n C8yValidators,\n DropAreaComponent,\n EmptyStateComponent,\n FormGroupComponent,\n IconDirective,\n MarkdownToHtmlPipe,\n OnBeforeSave\n} from '@c8y/ngx-components';\nimport {\n AbstractControl,\n FormBuilder,\n NgForm,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport {\n DroppedFileItem,\n MarkdownWidgetConfig,\n MarkdownWidgetFormGroup,\n MarkdownWidgetFormValue\n} from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport { AsyncPipe } from '@angular/common';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Component({\n selector: 'c8y-markdown-widget-config',\n templateUrl: './markdown-widget-config.component.html',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n AsyncPipe,\n C8yTranslatePipe,\n MarkdownToHtmlPipe,\n FormGroupComponent,\n DropAreaComponent,\n EmptyStateComponent,\n IconDirective\n ]\n})\nexport class MarkdownWidgetConfigComponent implements OnInit, OnDestroy, OnBeforeSave {\n @Input() config: MarkdownWidgetConfig;\n @ViewChild('markdownPreview')\n set markdownPreviewTemplate(template: TemplateRef<any>) {\n this.widgetConfigService.setPreview(template || null);\n }\n\n formGroup: MarkdownWidgetFormGroup;\n fileFromConfig: File;\n uploadChoice: 'uploadBinary' | 'uploadUrl' = 'uploadUrl';\n previewMarkdown = '';\n\n private widgetConfigService = inject(WidgetConfigService);\n private destroy$ = new Subject<void>();\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private alert: AlertService,\n private markdownService: MarkdownWidgetService\n ) {}\n\n async onBeforeSave(config?: MarkdownWidgetConfig): Promise<boolean> {\n if (this.formGroup.invalid) {\n return false;\n }\n if (this.uploadChoice === 'uploadUrl') {\n Object.assign(config, {\n contentUrl: this.formGroup.value.contentUrl,\n markdownBinaryId: null\n });\n return true;\n }\n const fileFromForm = this.getFileFromFormValue(this.formGroup.value);\n if (fileFromForm && fileFromForm !== this.fileFromConfig) {\n try {\n const markdownBinaryId = await this.markdownService.uploadFile(fileFromForm);\n Object.assign(config, { markdownBinaryId, contentUrl: null });\n return true;\n } catch (e) {\n this.alert.danger(gettext('Unable to upload Markdown file.'), e?.data);\n return false;\n }\n }\n if (!fileFromForm) {\n Object.assign(config, { contentUrl: '/readme.md', markdownBinaryId: null });\n }\n return true;\n }\n\n async ngOnInit() {\n this.initForm();\n if (this.config.markdownBinaryId) {\n this.uploadChoice = 'uploadBinary';\n this.fileFromConfig = await this.markdownService.getFile(this.config.markdownBinaryId);\n this.formGroup.patchValue({\n droppedFile: [{ file: this.fileFromConfig, name: this.fileFromConfig.name }]\n });\n await this.updatePreviewFromFile(this.fileFromConfig);\n } else if (this.config.contentUrl) {\n this.previewMarkdown = await this.markdownService.getContentFromUrl(this.config.contentUrl);\n }\n\n this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(async value => {\n await this.updatePreview(value);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n onChange(value: 'uploadBinary' | 'uploadUrl') {\n this.uploadChoice = value;\n\n // Ensure dropped file has 'name' property for drop area to display filename\n const droppedFile = this.formGroup.value.droppedFile;\n if (value === 'uploadBinary' && droppedFile?.[0]?.file) {\n const normalizedFile = droppedFile.map(item => ({\n ...item,\n name: item.name || item.file?.name\n }));\n this.formGroup.controls['droppedFile'].setValue(normalizedFile);\n }\n }\n\n private async updatePreview(formValue: Partial<MarkdownWidgetFormValue>): Promise<void> {\n const choice = formValue.uploadChoice || this.uploadChoice;\n if (choice === 'uploadBinary') {\n const file = this.getFileFromFormValue(formValue);\n if (file) {\n await this.updatePreviewFromFile(file);\n } else {\n this.previewMarkdown = '';\n }\n } else if (choice === 'uploadUrl' && formValue.contentUrl) {\n this.previewMarkdown = await this.markdownService.getContentFromUrl(formValue.contentUrl);\n } else {\n this.previewMarkdown = '';\n }\n }\n\n private async updatePreviewFromFile(file: File): Promise<void> {\n try {\n this.previewMarkdown = await file.text();\n } catch {\n this.previewMarkdown = '';\n }\n }\n\n private getFileFromFormValue(formValue: Partial<MarkdownWidgetFormValue>): File | null {\n const binary = formValue?.droppedFile || [];\n return binary[0]?.file || null;\n }\n\n private initForm(): void {\n this.formGroup = this.formBuilder.group(\n {\n contentUrl: this.formBuilder.nonNullable.control('', [Validators.maxLength(2000)]),\n droppedFile: this.formBuilder.control<DroppedFileItem[] | null>(null, [\n Validators.minLength(1),\n Validators.maxLength(1),\n C8yValidators.filesValidator({ maximumFileSizeInKb: 1000 })\n ]),\n uploadChoice: this.formBuilder.nonNullable.control<'uploadBinary' | 'uploadUrl'>(\n this.config.markdownBinaryId ? 'uploadBinary' : 'uploadUrl'\n )\n },\n { validators: this.requireEitherBinaryOrUrl() }\n ) as MarkdownWidgetFormGroup;\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private requireEitherBinaryOrUrl(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const url = control.get(`contentUrl`);\n const uploadBinary = control.get(`droppedFile`);\n\n const urlDefined = url && url.value !== undefined && url.value !== null;\n const uploadBinaryDefined =\n uploadBinary && uploadBinary.value !== undefined && uploadBinary.value !== null;\n\n const errors = {};\n if (this.uploadChoice === 'uploadBinary' && !uploadBinaryDefined) {\n // sets error\n const error = { required: true };\n uploadBinary.setErrors(Object.assign({}, uploadBinary.errors || {}, error));\n Object.assign(errors, error);\n } else {\n // remove previous error\n this.removeErrors(uploadBinary, ['required']);\n }\n\n if (this.uploadChoice === 'uploadUrl' && (!urlDefined || url.value === '')) {\n // sets error\n const error = { required: true };\n url.setErrors(Object.assign({}, url.errors || {}, error));\n Object.assign(errors, error);\n } else {\n // remove previous error\n this.removeErrors(url, ['required']);\n }\n\n return Object.keys(errors).length ? errors : null;\n };\n }\n\n private removeErrors(control: AbstractControl, errors: string[]): boolean {\n if (!control || !control.errors) {\n return false;\n }\n let removedError = false;\n for (const error of errors) {\n if (control.errors[error]) {\n removedError = true;\n delete control.errors[error];\n }\n }\n if (removedError) {\n control.setErrors(\n Object.keys(control.errors).length ? Object.assign({}, control.errors) : null\n );\n }\n return removedError;\n }\n}\n","<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\">\n <div class=\"form-group\">\n <label\n class=\"c8y-radio radio-inline\"\n title=\"{{ 'Upload a binary' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadBinary\"\n #radio\n formControlName=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label\n class=\"c8y-radio radio-inline m-l-8\"\n title=\"{{ 'Provide a file path' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadUrl\"\n #radio\n formControlName=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>\n {{ 'Provide a file path' | translate }}\n </span>\n </label>\n </div>\n @switch (uploadChoice) {\n @case ('uploadBinary') {\n <c8y-form-group class=\"m-b-24\">\n <c8y-drop-area\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n formControlName=\"droppedFile\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n }\n @case ('uploadUrl') {\n <c8y-form-group class=\"m-b-24\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n type=\"text\"\n formControlName=\"contentUrl\"\n />\n </div>\n </c8y-form-group>\n }\n }\n </form>\n</fieldset>\n\n<ng-template #markdownPreview>\n @if (previewMarkdown) {\n <div\n class=\"p-16 p-t-0 markdown-content fit-h overflow-auto\"\n [innerHTML]=\"previewMarkdown | markdownToHtml | async\"\n ></div>\n } @else {\n <div class=\"fit-h d-flex d-col j-c-center a-i-center\">\n <c8y-ui-empty-state\n [icon]=\"'file-text'\"\n [title]=\"'No content to preview' | translate\"\n [subtitle]=\"'Upload a file or provide a URL to see the preview' | translate\"\n [horizontal]=\"false\"\n ></c8y-ui-empty-state>\n </div>\n }\n</ng-template>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { MarkdownToHtmlPipe } from '@c8y/ngx-components';\nimport { MarkdownWidgetConfig } from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n selector: 'c8y-markdown-widget-view',\n templateUrl: './markdown-widget-view.component.html',\n standalone: true,\n imports: [MarkdownToHtmlPipe, AsyncPipe]\n})\nexport class MarkdownWidgetViewComponent implements OnInit {\n @Input() config: MarkdownWidgetConfig;\n markdown: string;\n\n constructor(private markdownWidgetService: MarkdownWidgetService) {}\n\n async ngOnInit() {\n if (this.config.markdownBinaryId) {\n const file = await this.markdownWidgetService.getFile(this.config.markdownBinaryId);\n this.markdown = await file?.text();\n } else if (this.config.contentUrl) {\n this.markdown = await this.markdownWidgetService.getContentFromUrl(this.config.contentUrl);\n }\n }\n}\n","<div id=\"helpContent\" class=\"p-16 p-t-0 markdown-content\" [innerHTML]=\"markdown | markdownToHtml | async\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3.MarkdownWidgetService","i1.MarkdownWidgetService"],"mappings":";;;;;;;;;;;;;;MAaa,qBAAqB,CAAA;AAGhC,IAAA,WAAA,CACU,WAAyB,EACzB,SAA2B,EAC3B,MAA8B,EAC9B,KAAmB,EACnB,SAA2B,EAC3B,WAAwB,EACxB,eAAgC,EAAA;QANhC,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,eAAe,GAAf,eAAe;AATR,QAAA,IAAA,CAAA,OAAO,GAAG,EAAE,cAAc,EAAE,eAAe,EAAE;IAU3D;AAEH;;;;AAIG;IACH,MAAM,OAAO,CAAC,gBAA+B,EAAA;QAC3C,IAAI,CAAC,gBAAgB,EAAE;AACrB,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,IAAI;AACF,YAAA,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC;YAChF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAwC,CAAC;AACrF,YAAA,OAAO,IAAI;QACb;QAAE,OAAO,CAAC,EAAE;AACV,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CACjC,OAAO,CAAC,2DAA2D,CAAC,EACpE,EAAE,gBAAgB,EAAE,C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EAAA;;sBAGvC;;;AEbH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-implementations-markdown.mjs","sources":["../../widgets/implementations/markdown/markdown-widget.model.ts","../../widgets/implementations/markdown/markdown-widget.service.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.html","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.ts","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.html","../../widgets/implementations/markdown/c8y-ngx-components-widgets-implementations-markdown.ts"],"sourcesContent":["import { FormControl, FormGroup } from '@angular/forms';\n\nexport interface MarkdownWidgetConfig {\n markdownBinaryId: string | null;\n contentUrl: string | null;\n markdownContent: string | null;\n}\n\nexport const MarkdownSourceType = {\n WRITE: 'writeMarkdown',\n UPLOAD: 'uploadBinary',\n URL: 'uploadUrl'\n} as const;\n\nexport type MarkdownSourceType = (typeof MarkdownSourceType)[keyof typeof MarkdownSourceType];\n\nexport interface DroppedFileItem {\n file: File;\n name: string;\n}\n\nexport type MarkdownWidgetFormGroup = FormGroup<{\n contentUrl: FormControl<string>;\n droppedFile: FormControl<DroppedFileItem[] | null>;\n uploadChoice: FormControl<MarkdownSourceType>;\n}>;\n","import { Injectable } from '@angular/core';\nimport {\n FetchClient,\n IFetchOptions,\n IManagedObjectBinary,\n InventoryBinaryService,\n InventoryService\n} from '@c8y/client';\nimport { AlertService, AppStateService, FilesService } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Injectable({ providedIn: 'root' })\nexport class MarkdownWidgetService {\n private readonly headers = { 'Content-Type': 'text/markdown' };\n\n constructor(\n private fileService: FilesService,\n private inventory: InventoryService,\n private binary: InventoryBinaryService,\n private alert: AlertService,\n private translate: TranslateService,\n private fetchClient: FetchClient,\n private appStateService: AppStateService\n ) {}\n\n /**\n * Retrieves a markdown file from the inventory by its binary ID.\n * @param markdownBinaryId - The ID of the binary managed object.\n * @returns The file if found, otherwise null.\n */\n async getFile(markdownBinaryId: string | null): Promise<File> {\n if (!markdownBinaryId) {\n return null;\n }\n\n try {\n const { data: markdownBinaryMo } = await this.inventory.detail(markdownBinaryId);\n const file = await this.fileService.getFile(markdownBinaryMo as IManagedObjectBinary);\n return file;\n } catch (e) {\n const text = this.translate.instant(\n gettext('Unable to retrieve binary with ID: {{ markdownBinaryId }}'),\n { markdownBinaryId }\n );\n this.alert.danger(text, e?.data);\n }\n\n return null;\n }\n\n /**\n * Uploads a markdown file to the inventory as a binary.\n * @param file - The file to upload.\n * @returns The ID of the created binary managed object.\n */\n async uploadFile(file: File): Promise<string> {\n const { data: mo } = await this.binary.create(file);\n return mo.id;\n }\n\n /**\n * Fetches markdown content from a URL.\n * For internal URLs (e.g., `/readme.md`), uses FetchClient with the app's context path.\n * For external URLs, uses XMLHttpRequest to avoid CORS issues with auth headers.\n * @param url - The URL to fetch content from.\n * @returns The markdown content as a string, or empty string on error.\n */\n async getContentFromUrl(url: string): Promise<string> {\n if (url?.toLowerCase() === '/readme.md') {\n return this.getContentFromInternalUrl(url);\n }\n return this.getContentFromExternalUrl(url);\n }\n\n private async getContentFromInternalUrl(url: string): Promise<string> {\n try {\n const contextPath = this.appStateService.state.app.contextPath;\n const options: IFetchOptions = {\n method: 'GET',\n headers: this.headers\n };\n const response = await this.fetchClient.fetch(`/apps/${contextPath}${url}`, options);\n if (response.status === 200) {\n return response.text();\n }\n } catch {\n // ignore error, return empty string\n }\n return '';\n }\n\n private getContentFromExternalUrl(url: string): Promise<string> {\n return new Promise(resolve => {\n const req = new XMLHttpRequest();\n req.onreadystatechange = () => {\n if (req.readyState === 4) {\n if (req.status === 200) {\n resolve(req.response);\n } else {\n resolve('');\n }\n }\n };\n req.onerror = () => resolve('');\n req.open('GET', url);\n req.responseType = 'text';\n req.setRequestHeader('Accept', 'text/html');\n req.send();\n });\n }\n}\n","import { Component, inject, Input, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AlertService,\n C8yTranslatePipe,\n C8yValidators,\n DropAreaComponent,\n EmptyStateComponent,\n FormGroupComponent,\n IconDirective,\n MarkdownToHtmlPipe,\n OnBeforeSave\n} from '@c8y/ngx-components';\nimport {\n AbstractControl,\n FormBuilder,\n FormsModule,\n NgForm,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport {\n DroppedFileItem,\n MarkdownSourceType,\n MarkdownWidgetConfig,\n MarkdownWidgetFormGroup\n} from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport { AsyncPipe } from '@angular/common';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { EditorComponent } from '@c8y/ngx-components/editor';\n\n@Component({\n selector: 'c8y-markdown-widget-config',\n templateUrl: './markdown-widget-config.component.html',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n FormsModule,\n AsyncPipe,\n C8yTranslatePipe,\n MarkdownToHtmlPipe,\n FormGroupComponent,\n DropAreaComponent,\n EmptyStateComponent,\n IconDirective,\n EditorComponent\n ]\n})\nexport class MarkdownWidgetConfigComponent implements OnInit, OnDestroy, OnBeforeSave {\n @Input() config: MarkdownWidgetConfig;\n @ViewChild('markdownPreview')\n set markdownPreviewTemplate(template: TemplateRef<any>) {\n this.widgetConfigService.setPreview(template || null);\n }\n\n readonly MarkdownSourceType = MarkdownSourceType;\n\n formGroup: MarkdownWidgetFormGroup;\n fileFromConfig: File;\n uploadChoice: MarkdownSourceType = MarkdownSourceType.URL;\n previewMarkdown$ = new BehaviorSubject<string>('');\n editorContent = '';\n\n private widgetConfigService = inject(WidgetConfigService);\n private destroy$ = new Subject<void>();\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private alert: AlertService,\n private markdownService: MarkdownWidgetService\n ) {}\n\n async onBeforeSave(config?: MarkdownWidgetConfig): Promise<boolean> {\n if (this.uploadChoice === MarkdownSourceType.WRITE) {\n Object.assign(config, {\n markdownContent: this.editorContent,\n contentUrl: null,\n markdownBinaryId: null\n });\n return true;\n }\n\n if (this.formGroup.invalid) {\n return false;\n }\n\n if (this.uploadChoice === MarkdownSourceType.URL) {\n Object.assign(config, {\n contentUrl: this.formGroup.value.contentUrl,\n markdownBinaryId: null,\n markdownContent: null\n });\n return true;\n }\n\n const fileFromForm = this.getFileFromFormValue(this.formGroup.value);\n if (fileFromForm && fileFromForm !== this.fileFromConfig) {\n try {\n const markdownBinaryId = await this.markdownService.uploadFile(fileFromForm);\n Object.assign(config, { markdownBinaryId, contentUrl: null, markdownContent: null });\n return true;\n } catch (e) {\n this.alert.danger(gettext('Unable to upload Markdown file.'), e?.data);\n return false;\n }\n }\n if (!fileFromForm) {\n Object.assign(config, {\n contentUrl: '/readme.md',\n markdownBinaryId: null,\n markdownContent: null\n });\n }\n return true;\n }\n\n async ngOnInit() {\n // Determine initial mode from config\n if (this.config.markdownContent) {\n this.uploadChoice = MarkdownSourceType.WRITE;\n } else if (this.config.markdownBinaryId) {\n this.uploadChoice = MarkdownSourceType.UPLOAD;\n }\n\n this.initForm();\n\n // Load initial content based on mode\n switch (this.uploadChoice) {\n case MarkdownSourceType.WRITE:\n this.editorContent = this.config.markdownContent;\n this.previewMarkdown$.next(this.config.markdownContent);\n break;\n case MarkdownSourceType.UPLOAD:\n this.fileFromConfig = await this.markdownService.getFile(this.config.markdownBinaryId);\n this.formGroup.patchValue({\n droppedFile: [{ file: this.fileFromConfig, name: this.fileFromConfig.name }]\n });\n await this.updatePreviewFromFile(this.fileFromConfig);\n break;\n case MarkdownSourceType.URL:\n if (this.config.contentUrl) {\n this.previewMarkdown$.next(\n await this.markdownService.getContentFromUrl(this.config.contentUrl)\n );\n }\n break;\n }\n\n this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(async value => {\n await this.updatePreview(value);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n onChange(value: MarkdownSourceType) {\n this.uploadChoice = value;\n\n // Ensure dropped file has 'name' property for drop area to display filename\n const droppedFile = this.formGroup.value.droppedFile;\n if (value === MarkdownSourceType.UPLOAD && droppedFile?.[0]?.file) {\n const normalizedFile = droppedFile.map(item => ({\n ...item,\n name: item.name || item.file?.name\n }));\n this.formGroup.controls['droppedFile'].setValue(normalizedFile);\n }\n\n this.formGroup.updateValueAndValidity();\n }\n\n onEditorChange(content: string) {\n this.editorContent = content;\n this.previewMarkdown$.next(content);\n }\n\n private async updatePreview(formValue: Partial<MarkdownWidgetFormGroup['value']>): Promise<void> {\n const choice = formValue.uploadChoice || this.uploadChoice;\n switch (choice) {\n case MarkdownSourceType.WRITE:\n if (!this.editorContent) {\n this.editorContent = this.previewMarkdown$.getValue();\n }\n this.previewMarkdown$.next(this.editorContent);\n break;\n case MarkdownSourceType.UPLOAD:\n const file = this.getFileFromFormValue(formValue);\n file ? await this.updatePreviewFromFile(file) : this.previewMarkdown$.next('');\n break;\n case MarkdownSourceType.URL:\n if (formValue.contentUrl) {\n this.previewMarkdown$.next(\n await this.markdownService.getContentFromUrl(formValue.contentUrl)\n );\n } else {\n this.previewMarkdown$.next('');\n }\n break;\n }\n }\n\n private async updatePreviewFromFile(file: File): Promise<void> {\n try {\n this.previewMarkdown$.next(await file.text());\n } catch {\n this.previewMarkdown$.next('');\n }\n }\n\n private getFileFromFormValue(formValue: Partial<MarkdownWidgetFormGroup['value']>): File | null {\n const binary = formValue?.droppedFile || [];\n return binary[0]?.file || null;\n }\n\n private initForm(): void {\n this.formGroup = this.formBuilder.group(\n {\n contentUrl: this.formBuilder.nonNullable.control('', [Validators.maxLength(2000)]),\n droppedFile: this.formBuilder.control<DroppedFileItem[] | null>(null, [\n Validators.minLength(1),\n Validators.maxLength(1),\n C8yValidators.filesValidator({ maximumFileSizeInKb: 1000 })\n ]),\n uploadChoice: this.formBuilder.nonNullable.control<MarkdownSourceType>(this.uploadChoice)\n },\n { validators: this.requireValidSource() }\n ) as MarkdownWidgetFormGroup;\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private requireValidSource(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const url = control.get('contentUrl');\n const droppedFile = control.get('droppedFile');\n\n // Write mode - always valid, editor content handled separately\n if (this.uploadChoice === MarkdownSourceType.WRITE) {\n url.setErrors(null);\n droppedFile.setErrors(null);\n return null;\n }\n\n // Clear required errors on inactive controls, set on active if empty\n if (this.uploadChoice === MarkdownSourceType.URL) {\n this.clearRequiredError(droppedFile);\n if (!url.value) {\n url.setErrors({ ...url.errors, required: true });\n return { required: true };\n }\n this.clearRequiredError(url);\n }\n\n if (this.uploadChoice === MarkdownSourceType.UPLOAD) {\n this.clearRequiredError(url);\n if (!droppedFile.value) {\n droppedFile.setErrors({ ...droppedFile.errors, required: true });\n return { required: true };\n }\n this.clearRequiredError(droppedFile);\n }\n\n return null;\n };\n }\n\n private clearRequiredError(control: AbstractControl): void {\n if (control?.errors?.required) {\n const { required: _, ...rest } = control.errors;\n control.setErrors(Object.keys(rest).length ? rest : null);\n }\n }\n}\n","<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\">\n <div class=\"form-group\">\n <label\n class=\"c8y-radio radio-inline\"\n title=\"{{ 'Write Markdown' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.WRITE\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.WRITE)\"\n />\n <span></span>\n <span>{{ 'Write Markdown' | translate }}</span>\n </label>\n <label\n class=\"c8y-radio radio-inline m-l-8\"\n title=\"{{ 'Upload a binary' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.UPLOAD\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.UPLOAD)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label\n class=\"c8y-radio radio-inline m-l-8\"\n title=\"{{ 'Provide a file path' | translate }}\"\n >\n <input\n name=\"uploadChoice\"\n type=\"radio\"\n [value]=\"MarkdownSourceType.URL\"\n formControlName=\"uploadChoice\"\n (change)=\"onChange(MarkdownSourceType.URL)\"\n />\n <span></span>\n <span>{{ 'Provide a file path' | translate }}</span>\n </label>\n </div>\n @switch (uploadChoice) {\n @case (MarkdownSourceType.WRITE) {\n <c8y-editor\n class=\"d-block\"\n style=\"height: 300px\"\n [ngModel]=\"editorContent\"\n (ngModelChange)=\"onEditorChange($event)\"\n [ngModelOptions]=\"{ standalone: true }\"\n [editorOptions]=\"{\n language: 'markdown',\n tabSize: 2,\n insertSpaces: true,\n minimap: { enabled: false },\n wordWrap: 'on'\n }\"\n ></c8y-editor>\n }\n @case (MarkdownSourceType.UPLOAD) {\n <c8y-form-group class=\"m-b-24\">\n <c8y-drop-area\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n formControlName=\"droppedFile\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n }\n @case (MarkdownSourceType.URL) {\n <c8y-form-group class=\"m-b-24\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n type=\"text\"\n formControlName=\"contentUrl\"\n />\n </div>\n </c8y-form-group>\n }\n }\n </form>\n</fieldset>\n\n<ng-template #markdownPreview>\n @if (previewMarkdown$ | async; as previewMarkdown) {\n <div\n class=\"p-16 p-t-0 markdown-content fit-h overflow-auto\"\n [innerHTML]=\"previewMarkdown | markdownToHtml | async\"\n ></div>\n } @else {\n <div class=\"fit-h d-flex d-col j-c-center a-i-center\">\n <c8y-ui-empty-state\n [icon]=\"'file-text'\"\n [title]=\"'No content to preview' | translate\"\n [subtitle]=\"\n 'Write Markdown, upload a file, or provide a URL to see the preview' | translate\n \"\n [horizontal]=\"false\"\n ></c8y-ui-empty-state>\n </div>\n }\n</ng-template>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { MarkdownToHtmlPipe } from '@c8y/ngx-components';\nimport { MarkdownWidgetConfig } from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n selector: 'c8y-markdown-widget-view',\n templateUrl: './markdown-widget-view.component.html',\n standalone: true,\n imports: [MarkdownToHtmlPipe, AsyncPipe]\n})\nexport class MarkdownWidgetViewComponent implements OnInit {\n @Input() config: MarkdownWidgetConfig;\n markdown: string;\n\n constructor(private markdownWidgetService: MarkdownWidgetService) {}\n\n async ngOnInit() {\n if (this.config.markdownContent) {\n this.markdown = this.config.markdownContent;\n } else if (this.config.markdownBinaryId) {\n const file = await this.markdownWidgetService.getFile(this.config.markdownBinaryId);\n this.markdown = await file?.text();\n } else if (this.config.contentUrl) {\n this.markdown = await this.markdownWidgetService.getContentFromUrl(this.config.contentUrl);\n }\n }\n}\n","<div id=\"helpContent\" class=\"p-16 p-t-0 markdown-content\" [innerHTML]=\"markdown | markdownToHtml | async\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3.MarkdownWidgetService","i1.MarkdownWidgetService"],"mappings":";;;;;;;;;;;;;;;AAQO,MAAM,kBAAkB,GAAG;AAChC,IAAA,KAAK,EAAE,eAAe;AACtB,IAAA,MAAM,EAAE,cAAc;AACtB,IAAA,GAAG,EAAE;;;MCEM,qBAAqB,CAAA;AAGhC,IAAA,WAAA,CACU,WAAyB,EACzB,SAA2B,EAC3B,MAA8B,EAC9B,KAAmB,EACnB,SAA2B,EAC3B,WAAwB,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