@nanahoshi/mona-ui 0.36.1 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/api/editor.md +67 -0
- package/docs/api/file-upload.md +1 -1
- package/docs/api/i18n.md +16 -0
- package/docs/api/locales.md +14 -14
- package/docs/editor.md +238 -9
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +1348 -190
- package/fesm2022/nanahoshi-mona-ui-file-upload.mjs +28 -94
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +50 -1
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +83 -2
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +59 -1
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +23 -1
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +35 -1
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +35 -1
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +17 -1
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +35 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +17 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +17 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +47 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +35 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +47 -1
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +17 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +17 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +17 -1
- package/i18n/catalogs/en-US.messages.json +17 -1
- package/llms.txt +1 -1
- package/locales/ar-sa/ar-sa.messages.json +17 -1
- package/locales/de-de/de-de.messages.json +17 -1
- package/locales/es-es/es-es.messages.json +17 -1
- package/locales/fr-fr/fr-fr.messages.json +17 -1
- package/locales/id-id/id-id.messages.json +17 -1
- package/locales/it-it/it-it.messages.json +17 -1
- package/locales/ja-jp/ja-jp.messages.json +17 -1
- package/locales/ko-kr/ko-kr.messages.json +17 -1
- package/locales/pl-pl/pl-pl.messages.json +17 -1
- package/locales/pt-br/pt-br.messages.json +17 -1
- package/locales/ru-ru/ru-ru.messages.json +17 -1
- package/locales/tr-tr/tr-tr.messages.json +17 -1
- package/locales/zh-cn/zh-cn.messages.json +17 -1
- package/locales/zh-tw/zh-tw.messages.json +17 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-editor.d.ts +124 -2
- package/types/nanahoshi-mona-ui-file-upload.d.ts +1 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +32 -0
- package/types/nanahoshi-mona-ui-internal.d.ts +37 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +16 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +16 -0
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { DOCUMENT } from "@angular/common";
|
|
2
|
-
import { HttpEventType, HttpResponse, HttpResponseBase } from "@angular/common/http";
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
import { Component, DestroyRef, ElementRef, Injector, afterNextRender, booleanAttribute, computed, effect, inject, input, model, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
5
4
|
import { LucideCircleAlert, LucideCircleCheck, LucideCloudUpload, LucideFile, LucideRotateCw, LucideX } from "@lucide/angular";
|
|
6
5
|
import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
7
6
|
import { MonaI18nService, formatNumber } from "@nanahoshi/mona-ui/i18n";
|
|
8
|
-
import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
7
|
+
import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, matchesAccept, parseAccept, runUpload, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
9
8
|
import { ProgressBarComponent } from "@nanahoshi/mona-ui/progress-bar";
|
|
10
|
-
import { isObservable } from "rxjs";
|
|
11
9
|
import { twMerge } from "tailwind-merge";
|
|
12
10
|
import { cva } from "class-variance-authority";
|
|
13
11
|
function localizeNumber(value, options) {
|
|
@@ -117,19 +115,6 @@ const FILE_SIZE_UNITS = [
|
|
|
117
115
|
"gigabyte",
|
|
118
116
|
"terabyte"
|
|
119
117
|
];
|
|
120
|
-
function parseAccept(accept) {
|
|
121
|
-
return (accept ?? "").split(",").map((token) => token.trim().toLowerCase()).filter((token) => token.length > 0);
|
|
122
|
-
}
|
|
123
|
-
function matchesAccept(file, accept) {
|
|
124
|
-
if (accept.length === 0) return true;
|
|
125
|
-
const name = file.name.toLowerCase();
|
|
126
|
-
const type = file.type.toLowerCase();
|
|
127
|
-
return accept.some((token) => {
|
|
128
|
-
if (token.startsWith(".")) return name.endsWith(token);
|
|
129
|
-
if (token.endsWith("/*")) return type.startsWith(token.slice(0, -1));
|
|
130
|
-
return type === token;
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
118
|
function checkFile(file, rules) {
|
|
134
119
|
if (!matchesAccept(file, rules.accept)) return "type";
|
|
135
120
|
if (rules.maxFileSize != null && file.size > rules.maxFileSize) return "maxFileSize";
|
|
@@ -165,22 +150,6 @@ function describeAccept(accept, localeId) {
|
|
|
165
150
|
}
|
|
166
151
|
}
|
|
167
152
|
const ANNOUNCEMENT_REPEAT_DELAY = 100;
|
|
168
|
-
function isHttpEventWithoutResult(value) {
|
|
169
|
-
if (value instanceof HttpResponseBase) return !(value instanceof HttpResponse);
|
|
170
|
-
if (value == null || typeof value !== "object") return false;
|
|
171
|
-
const type = value.type;
|
|
172
|
-
if (type === HttpEventType.Sent) return Object.keys(value).length === 1;
|
|
173
|
-
return (type === HttpEventType.UploadProgress || type === HttpEventType.DownloadProgress) && typeof value.loaded === "number";
|
|
174
|
-
}
|
|
175
|
-
function httpUploadProgress(value) {
|
|
176
|
-
if (value == null || typeof value !== "object") return null;
|
|
177
|
-
const event = value;
|
|
178
|
-
if (event.type !== HttpEventType.UploadProgress || typeof event.loaded !== "number") return null;
|
|
179
|
-
return {
|
|
180
|
-
loaded: event.loaded,
|
|
181
|
-
total: typeof event.total === "number" ? event.total : void 0
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
153
|
var FileUploadComponent = class FileUploadComponent {
|
|
185
154
|
#destroyRef;
|
|
186
155
|
#document;
|
|
@@ -596,74 +565,39 @@ var FileUploadComponent = class FileUploadComponent {
|
|
|
596
565
|
const entry = this.#entries().find((other) => other.key === key);
|
|
597
566
|
if (handler == null || entry == null || entry.item.status === "uploading" || entry.item.status === "rejected") return;
|
|
598
567
|
const file = entry.item.file;
|
|
599
|
-
|
|
600
|
-
let finished = false;
|
|
601
|
-
let subscription = null;
|
|
602
|
-
const abort = () => {
|
|
603
|
-
finished = true;
|
|
604
|
-
controller.abort();
|
|
605
|
-
subscription?.unsubscribe();
|
|
606
|
-
};
|
|
607
|
-
const context = {
|
|
608
|
-
progress: (loaded, total = file.size) => {
|
|
609
|
-
if (!finished && Number.isFinite(loaded) && total > 0) this.#patchEntry(key, { progress: Math.min(1, Math.max(0, loaded / total)) });
|
|
610
|
-
},
|
|
611
|
-
signal: controller.signal
|
|
612
|
-
};
|
|
613
|
-
const succeed = (response) => {
|
|
614
|
-
if (finished) return;
|
|
615
|
-
finished = true;
|
|
616
|
-
const item = this.#patchEntry(key, {
|
|
617
|
-
progress: 1,
|
|
618
|
-
response,
|
|
619
|
-
status: "uploaded"
|
|
620
|
-
}, null);
|
|
621
|
-
this.#writeValue();
|
|
622
|
-
if (item) {
|
|
623
|
-
this.uploadSuccess.emit(item);
|
|
624
|
-
this.#announce(this.messages().fileUploaded(file.name));
|
|
625
|
-
}
|
|
626
|
-
};
|
|
627
|
-
const fail = (error) => {
|
|
628
|
-
if (finished) return;
|
|
629
|
-
finished = true;
|
|
630
|
-
const item = this.#patchEntry(key, {
|
|
631
|
-
error,
|
|
632
|
-
progress: null,
|
|
633
|
-
status: "failed"
|
|
634
|
-
}, null);
|
|
635
|
-
if (item) {
|
|
636
|
-
this.uploadError.emit(item);
|
|
637
|
-
this.#announce(this.messages().fileFailed(file.name));
|
|
638
|
-
}
|
|
639
|
-
};
|
|
568
|
+
let abort = null;
|
|
640
569
|
this.#patchEntry(key, {
|
|
641
570
|
error: null,
|
|
642
571
|
progress: null,
|
|
643
572
|
response: null,
|
|
644
573
|
status: "uploading"
|
|
645
|
-
}, abort);
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
complete: () => succeed(response),
|
|
657
|
-
error: (error) => fail(error),
|
|
658
|
-
next: (value) => {
|
|
659
|
-
const progress = httpUploadProgress(value);
|
|
660
|
-
if (progress) context.progress(progress.loaded, progress.total);
|
|
661
|
-
else if (value instanceof HttpResponse) response = value.body;
|
|
662
|
-
else if (!isHttpEventWithoutResult(value)) response = value;
|
|
574
|
+
}, () => abort?.());
|
|
575
|
+
abort = runUpload(handler, file, {
|
|
576
|
+
failure: (error) => {
|
|
577
|
+
const item = this.#patchEntry(key, {
|
|
578
|
+
error,
|
|
579
|
+
progress: null,
|
|
580
|
+
status: "failed"
|
|
581
|
+
}, null);
|
|
582
|
+
if (item) {
|
|
583
|
+
this.uploadError.emit(item);
|
|
584
|
+
this.#announce(this.messages().fileFailed(file.name));
|
|
663
585
|
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
|
|
586
|
+
},
|
|
587
|
+
progress: (fraction) => this.#patchEntry(key, { progress: fraction }),
|
|
588
|
+
success: (response) => {
|
|
589
|
+
const item = this.#patchEntry(key, {
|
|
590
|
+
progress: 1,
|
|
591
|
+
response,
|
|
592
|
+
status: "uploaded"
|
|
593
|
+
}, null);
|
|
594
|
+
this.#writeValue();
|
|
595
|
+
if (item) {
|
|
596
|
+
this.uploadSuccess.emit(item);
|
|
597
|
+
this.#announce(this.messages().fileUploaded(file.name));
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
});
|
|
667
601
|
}
|
|
668
602
|
#valueFiles(entries) {
|
|
669
603
|
const status = this.upload() != null ? "uploaded" : "selected";
|
|
@@ -514,6 +514,22 @@ const MONA_MESSAGE_PARAMETERS = {
|
|
|
514
514
|
backgroundColor: null,
|
|
515
515
|
bold: null,
|
|
516
516
|
cancel: null,
|
|
517
|
+
characterCount: [{
|
|
518
|
+
name: "count",
|
|
519
|
+
type: "number"
|
|
520
|
+
}],
|
|
521
|
+
characterLimitHint: [{
|
|
522
|
+
name: "limit",
|
|
523
|
+
type: "number"
|
|
524
|
+
}],
|
|
525
|
+
charactersLeft: [{
|
|
526
|
+
name: "count",
|
|
527
|
+
type: "number"
|
|
528
|
+
}],
|
|
529
|
+
charactersOver: [{
|
|
530
|
+
name: "count",
|
|
531
|
+
type: "number"
|
|
532
|
+
}],
|
|
517
533
|
codeBlock: null,
|
|
518
534
|
color: null,
|
|
519
535
|
contentLabel: null,
|
|
@@ -521,6 +537,7 @@ const MONA_MESSAGE_PARAMETERS = {
|
|
|
521
537
|
deleteColumn: null,
|
|
522
538
|
deleteRow: null,
|
|
523
539
|
deleteTable: null,
|
|
540
|
+
editImage: null,
|
|
524
541
|
editLink: null,
|
|
525
542
|
enterUrl: null,
|
|
526
543
|
fontSize: null,
|
|
@@ -531,6 +548,26 @@ const MONA_MESSAGE_PARAMETERS = {
|
|
|
531
548
|
}],
|
|
532
549
|
heightPx: null,
|
|
533
550
|
historyGroup: null,
|
|
551
|
+
imageFile: null,
|
|
552
|
+
imageInserted: [{
|
|
553
|
+
name: "name",
|
|
554
|
+
type: "string"
|
|
555
|
+
}],
|
|
556
|
+
imageTooLarge: [{
|
|
557
|
+
name: "name",
|
|
558
|
+
type: "string"
|
|
559
|
+
}, {
|
|
560
|
+
name: "size",
|
|
561
|
+
type: "string"
|
|
562
|
+
}],
|
|
563
|
+
imageUploadFailed: [{
|
|
564
|
+
name: "name",
|
|
565
|
+
type: "string"
|
|
566
|
+
}],
|
|
567
|
+
imageUploading: [{
|
|
568
|
+
name: "name",
|
|
569
|
+
type: "string"
|
|
570
|
+
}],
|
|
534
571
|
imageUrl: null,
|
|
535
572
|
indent: null,
|
|
536
573
|
indentGroup: null,
|
|
@@ -546,12 +583,20 @@ const MONA_MESSAGE_PARAMETERS = {
|
|
|
546
583
|
justify: null,
|
|
547
584
|
linkGroup: null,
|
|
548
585
|
listGroup: null,
|
|
586
|
+
mentionNoResults: null,
|
|
587
|
+
mentionResults: [{
|
|
588
|
+
name: "count",
|
|
589
|
+
type: "number"
|
|
590
|
+
}],
|
|
591
|
+
mentionSearching: null,
|
|
592
|
+
mentionSuggestions: null,
|
|
549
593
|
mergeCells: null,
|
|
550
594
|
outdent: null,
|
|
551
595
|
paragraph: null,
|
|
552
596
|
quotation: null,
|
|
553
597
|
redo: null,
|
|
554
598
|
removeLink: null,
|
|
599
|
+
save: null,
|
|
555
600
|
selectFontFamily: null,
|
|
556
601
|
selectFontSize: null,
|
|
557
602
|
splitCell: null,
|
|
@@ -571,7 +616,11 @@ const MONA_MESSAGE_PARAMETERS = {
|
|
|
571
616
|
toolbar: null,
|
|
572
617
|
underline: null,
|
|
573
618
|
undo: null,
|
|
574
|
-
widthPx: null
|
|
619
|
+
widthPx: null,
|
|
620
|
+
wordCount: [{
|
|
621
|
+
name: "count",
|
|
622
|
+
type: "number"
|
|
623
|
+
}]
|
|
575
624
|
},
|
|
576
625
|
fileUpload: {
|
|
577
626
|
browse: null,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { DOCUMENT, DestroyRef, Directive, ElementRef, InjectionToken, Renderer2, afterEveryRender, computed, effect, inject, input, signal, untracked } from "@angular/core";
|
|
3
|
-
import { Observable, debounceTime, filter, map, merge, scan, take, timer } from "rxjs";
|
|
3
|
+
import { Observable, debounceTime, filter, isObservable, map, merge, scan, take, timer } from "rxjs";
|
|
4
|
+
import { HttpEventType, HttpResponse, HttpResponseBase } from "@angular/common/http";
|
|
4
5
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
5
6
|
var AttributeBinderDirective = class AttributeBinderDirective {
|
|
6
7
|
#element;
|
|
@@ -302,6 +303,19 @@ function injectEffectiveDisabled(disabled) {
|
|
|
302
303
|
const fieldsetDisabled = inject(MONA_FIELDSET_DISABLED, { optional: true });
|
|
303
304
|
return computed(() => disabled() || (fieldsetDisabled?.() ?? false));
|
|
304
305
|
}
|
|
306
|
+
function parseAccept(accept) {
|
|
307
|
+
return (accept ?? "").split(",").map((token) => token.trim().toLowerCase()).filter((token) => token.length > 0);
|
|
308
|
+
}
|
|
309
|
+
function matchesAccept(file, accept) {
|
|
310
|
+
if (accept.length === 0) return true;
|
|
311
|
+
const name = file.name.toLowerCase();
|
|
312
|
+
const type = file.type.toLowerCase();
|
|
313
|
+
return accept.some((token) => {
|
|
314
|
+
if (token.startsWith(".")) return name.endsWith(token);
|
|
315
|
+
if (token.endsWith("/*")) return type.startsWith(token.slice(0, -1));
|
|
316
|
+
return type === token;
|
|
317
|
+
});
|
|
318
|
+
}
|
|
305
319
|
const MONA_LABEL = new InjectionToken("MONA_LABEL");
|
|
306
320
|
const MONA_FORM_FIELD = new InjectionToken("MONA_FORM_FIELD");
|
|
307
321
|
const FIELD_ASSOCIATION_BOUNDARY = [{
|
|
@@ -532,6 +546,73 @@ var RovingToolbar = class {
|
|
|
532
546
|
return candidates.filter((candidate) => !candidates.some((other) => other !== candidate && other.contains(candidate)));
|
|
533
547
|
}
|
|
534
548
|
};
|
|
549
|
+
function isHttpEventWithoutResult(value) {
|
|
550
|
+
if (value instanceof HttpResponseBase) return !(value instanceof HttpResponse);
|
|
551
|
+
if (value == null || typeof value !== "object") return false;
|
|
552
|
+
const type = value.type;
|
|
553
|
+
if (type === HttpEventType.Sent) return Object.keys(value).length === 1;
|
|
554
|
+
return (type === HttpEventType.UploadProgress || type === HttpEventType.DownloadProgress) && typeof value.loaded === "number";
|
|
555
|
+
}
|
|
556
|
+
function httpUploadProgress(value) {
|
|
557
|
+
if (value == null || typeof value !== "object") return null;
|
|
558
|
+
const event = value;
|
|
559
|
+
if (event.type !== HttpEventType.UploadProgress || typeof event.loaded !== "number") return null;
|
|
560
|
+
return {
|
|
561
|
+
loaded: event.loaded,
|
|
562
|
+
total: typeof event.total === "number" ? event.total : void 0
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
function runUpload(handler, file, callbacks) {
|
|
566
|
+
const controller = new AbortController();
|
|
567
|
+
let finished = false;
|
|
568
|
+
let subscription = null;
|
|
569
|
+
const abort = () => {
|
|
570
|
+
if (finished) return;
|
|
571
|
+
finished = true;
|
|
572
|
+
controller.abort();
|
|
573
|
+
subscription?.unsubscribe();
|
|
574
|
+
};
|
|
575
|
+
const succeed = (response) => {
|
|
576
|
+
if (!finished) {
|
|
577
|
+
finished = true;
|
|
578
|
+
callbacks.success(response);
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
const fail = (error) => {
|
|
582
|
+
if (!finished) {
|
|
583
|
+
finished = true;
|
|
584
|
+
callbacks.failure(error);
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
const context = {
|
|
588
|
+
progress: (loaded, total = file.size) => {
|
|
589
|
+
if (!finished && Number.isFinite(loaded) && total > 0) callbacks.progress(Math.min(1, Math.max(0, loaded / total)));
|
|
590
|
+
},
|
|
591
|
+
signal: controller.signal
|
|
592
|
+
};
|
|
593
|
+
let result;
|
|
594
|
+
try {
|
|
595
|
+
result = handler(file, context);
|
|
596
|
+
} catch (error) {
|
|
597
|
+
fail(error);
|
|
598
|
+
return abort;
|
|
599
|
+
}
|
|
600
|
+
if (isObservable(result)) {
|
|
601
|
+
let response = void 0;
|
|
602
|
+
subscription = result.subscribe({
|
|
603
|
+
complete: () => succeed(response),
|
|
604
|
+
error: (error) => fail(error),
|
|
605
|
+
next: (value) => {
|
|
606
|
+
const progress = httpUploadProgress(value);
|
|
607
|
+
if (progress) context.progress(progress.loaded, progress.total);
|
|
608
|
+
else if (value instanceof HttpResponse) response = value.body;
|
|
609
|
+
else if (!isHttpEventWithoutResult(value)) response = value;
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
if (finished) subscription.unsubscribe();
|
|
613
|
+
} else Promise.resolve(result).then(succeed, fail);
|
|
614
|
+
return abort;
|
|
615
|
+
}
|
|
535
616
|
const rxTimeout = (destroyRef, fn, delay = 0) => {
|
|
536
617
|
timer(delay).pipe(takeUntilDestroyed(destroyRef), take(1)).subscribe(() => fn());
|
|
537
618
|
};
|
|
@@ -874,6 +955,6 @@ const setupTypeahead = (typeaheadKey$) => {
|
|
|
874
955
|
})));
|
|
875
956
|
return merge(keypress$, resetTrigger$).pipe(scan((buffer, action) => action.type === "reset" ? "" : buffer + action.value.toLowerCase(), ""), filter((buffer) => buffer.length > 0));
|
|
876
957
|
};
|
|
877
|
-
export { AttributeBinderDirective, FIELD_ASSOCIATION_BOUNDARY, HOVER_GRACE, HoverIntent, MONA_FIELDSET_DISABLED, MONA_FORM_FIELD, MONA_LABEL, NavigationKeys, RovingToolbar, TYPEAHEAD_RESET_DELAY, addAriaReference, colorKey, createElementControlId, createPageScrollBlockStrategy, focusCanReturn, focusElement, formatAlpha, hex2rgba, hsla2hsva, hsva2rgba, inertOutside, injectEffectiveDisabled, injectLabelAssociation, injectLabelledByText, isNavigationKey, isTypeaheadKey, isValidHex, listenForHover, navigationKeysList, onDisconnect, overlaySidePositions, parseColor, positionGlobalOverlay, removeAriaReference, resolveOverlaySide, restoreOverlayScroll, rgba2hex, rgba2hsla, rgba2hsva, rxFromResize, rxTimeout, setupTypeahead, sideOfPosition, themeControlBackdropClasses, themeControlSurfaceClasses, themeOverlayBackdropClasses, themeOverlaySurfaceClasses, themeRaisedBackdropClasses, themeRaisedSurfaceClasses, themeSelectionBarClasses, themeSelectionBorderClasses, toCssValue };
|
|
958
|
+
export { AttributeBinderDirective, FIELD_ASSOCIATION_BOUNDARY, HOVER_GRACE, HoverIntent, MONA_FIELDSET_DISABLED, MONA_FORM_FIELD, MONA_LABEL, NavigationKeys, RovingToolbar, TYPEAHEAD_RESET_DELAY, addAriaReference, colorKey, createElementControlId, createPageScrollBlockStrategy, focusCanReturn, focusElement, formatAlpha, hex2rgba, hsla2hsva, hsva2rgba, inertOutside, injectEffectiveDisabled, injectLabelAssociation, injectLabelledByText, isNavigationKey, isTypeaheadKey, isValidHex, listenForHover, matchesAccept, navigationKeysList, onDisconnect, overlaySidePositions, parseAccept, parseColor, positionGlobalOverlay, removeAriaReference, resolveOverlaySide, restoreOverlayScroll, rgba2hex, rgba2hsla, rgba2hsva, runUpload, rxFromResize, rxTimeout, setupTypeahead, sideOfPosition, themeControlBackdropClasses, themeControlSurfaceClasses, themeOverlayBackdropClasses, themeOverlaySurfaceClasses, themeRaisedBackdropClasses, themeRaisedSurfaceClasses, themeSelectionBarClasses, themeSelectionBorderClasses, toCssValue };
|
|
878
959
|
|
|
879
960
|
//# sourceMappingURL=nanahoshi-mona-ui-internal.mjs.map
|
|
@@ -255,6 +255,38 @@ const MONA_AR_SA_LOCALE = {
|
|
|
255
255
|
backgroundColor: "لون الخلفية",
|
|
256
256
|
bold: "عريض",
|
|
257
257
|
cancel: "إلغاء",
|
|
258
|
+
characterCount: (count) => plural(PLURAL_RULES.select(count), {
|
|
259
|
+
zero: () => "لا أحرف",
|
|
260
|
+
one: () => "حرف واحد",
|
|
261
|
+
two: () => "حرفان",
|
|
262
|
+
few: () => `${localizeNumber(count)} أحرف`,
|
|
263
|
+
many: () => `${localizeNumber(count)} حرفًا`,
|
|
264
|
+
other: () => `${localizeNumber(count)} حرف`
|
|
265
|
+
}),
|
|
266
|
+
characterLimitHint: (limit) => `يمكنك إدخال ${plural(PLURAL_RULES.select(limit), {
|
|
267
|
+
zero: () => `${localizeNumber(limit)} حرف`,
|
|
268
|
+
one: () => "حرف واحد",
|
|
269
|
+
two: () => "حرفين",
|
|
270
|
+
few: () => `${localizeNumber(limit)} أحرف`,
|
|
271
|
+
many: () => `${localizeNumber(limit)} حرفًا`,
|
|
272
|
+
other: () => `${localizeNumber(limit)} حرف`
|
|
273
|
+
})} كحد أقصى.`,
|
|
274
|
+
charactersLeft: (count) => plural(PLURAL_RULES.select(count), {
|
|
275
|
+
zero: () => "لم يتبقَّ أي حرف",
|
|
276
|
+
one: () => "تبقّى حرف واحد",
|
|
277
|
+
two: () => "تبقّى حرفان",
|
|
278
|
+
few: () => `تبقّت ${localizeNumber(count)} أحرف`,
|
|
279
|
+
many: () => `تبقّى ${localizeNumber(count)} حرفًا`,
|
|
280
|
+
other: () => `تبقّى ${localizeNumber(count)} حرف`
|
|
281
|
+
}),
|
|
282
|
+
charactersOver: (count) => plural(PLURAL_RULES.select(count), {
|
|
283
|
+
zero: () => "لا أحرف زائدة",
|
|
284
|
+
one: () => "حرف واحد زائد",
|
|
285
|
+
two: () => "حرفان زائدان",
|
|
286
|
+
few: () => `${localizeNumber(count)} أحرف زائدة`,
|
|
287
|
+
many: () => `${localizeNumber(count)} حرفًا زائدًا`,
|
|
288
|
+
other: () => `${localizeNumber(count)} حرف زائد`
|
|
289
|
+
}),
|
|
258
290
|
codeBlock: "كتلة تعليمات برمجية",
|
|
259
291
|
color: "لون",
|
|
260
292
|
contentLabel: "محرر النص المنسق",
|
|
@@ -262,6 +294,7 @@ const MONA_AR_SA_LOCALE = {
|
|
|
262
294
|
deleteColumn: "حذف العمود",
|
|
263
295
|
deleteRow: "حذف الصف",
|
|
264
296
|
deleteTable: "حذف الجدول",
|
|
297
|
+
editImage: "تعديل الصورة",
|
|
265
298
|
editLink: "تعديل الرابط",
|
|
266
299
|
enterUrl: "إدخال عنوان URL",
|
|
267
300
|
fontSize: "حجم الخط",
|
|
@@ -269,6 +302,11 @@ const MONA_AR_SA_LOCALE = {
|
|
|
269
302
|
heading: (level) => `العنوان ${localizeNumber(level)}`,
|
|
270
303
|
heightPx: "الارتفاع (px)",
|
|
271
304
|
historyGroup: "السجل",
|
|
305
|
+
imageFile: "ملف الصورة",
|
|
306
|
+
imageInserted: (name) => `تم إدراج ${name}.`,
|
|
307
|
+
imageTooLarge: (name, size) => `لم تتم إضافة ${name}. حجم الملف أكبر من ${size}.`,
|
|
308
|
+
imageUploadFailed: (name) => `تعذّر رفع ${name}.`,
|
|
309
|
+
imageUploading: (name) => `جارٍ رفع ${name}`,
|
|
272
310
|
imageUrl: "عنوان URL للصورة",
|
|
273
311
|
indent: "زيادة المسافة البادئة",
|
|
274
312
|
indentGroup: "المسافة البادئة",
|
|
@@ -284,12 +322,24 @@ const MONA_AR_SA_LOCALE = {
|
|
|
284
322
|
justify: "ضبط",
|
|
285
323
|
linkGroup: "الرابط",
|
|
286
324
|
listGroup: "القوائم",
|
|
325
|
+
mentionNoResults: "لا توجد نتائج مطابقة",
|
|
326
|
+
mentionResults: (count) => plural(PLURAL_RULES.select(count), {
|
|
327
|
+
zero: () => "لا توجد اقتراحات",
|
|
328
|
+
one: () => "اقتراح واحد",
|
|
329
|
+
two: () => "اقتراحان",
|
|
330
|
+
few: () => `${localizeNumber(count)} اقتراحات`,
|
|
331
|
+
many: () => `${localizeNumber(count)} اقتراحًا`,
|
|
332
|
+
other: () => `${localizeNumber(count)} اقتراح`
|
|
333
|
+
}),
|
|
334
|
+
mentionSearching: "جارٍ البحث…",
|
|
335
|
+
mentionSuggestions: "اقتراحات",
|
|
287
336
|
mergeCells: "دمج الخلايا المحددة",
|
|
288
337
|
outdent: "تقليل المسافة البادئة",
|
|
289
338
|
paragraph: "فقرة",
|
|
290
339
|
quotation: "اقتباس",
|
|
291
340
|
redo: "إعادة",
|
|
292
341
|
removeLink: "إزالة الرابط",
|
|
342
|
+
save: "حفظ",
|
|
293
343
|
selectFontFamily: "اختيار الخط",
|
|
294
344
|
selectFontSize: "اختيار حجم الخط",
|
|
295
345
|
splitCell: "تقسيم الخلية",
|
|
@@ -303,7 +353,15 @@ const MONA_AR_SA_LOCALE = {
|
|
|
303
353
|
toolbar: "التنسيق",
|
|
304
354
|
underline: "تسطير",
|
|
305
355
|
undo: "تراجع",
|
|
306
|
-
widthPx: "العرض (px)"
|
|
356
|
+
widthPx: "العرض (px)",
|
|
357
|
+
wordCount: (count) => plural(PLURAL_RULES.select(count), {
|
|
358
|
+
zero: () => "لا كلمات",
|
|
359
|
+
one: () => "كلمة واحدة",
|
|
360
|
+
two: () => "كلمتان",
|
|
361
|
+
few: () => `${localizeNumber(count)} كلمات`,
|
|
362
|
+
many: () => `${localizeNumber(count)} كلمةً`,
|
|
363
|
+
other: () => `${localizeNumber(count)} كلمة`
|
|
364
|
+
})
|
|
307
365
|
},
|
|
308
366
|
fileUpload: {
|
|
309
367
|
browse: "استعراض الملفات",
|
|
@@ -239,6 +239,10 @@ const MONA_DE_DE_LOCALE = {
|
|
|
239
239
|
backgroundColor: "Hintergrundfarbe",
|
|
240
240
|
bold: "Fett",
|
|
241
241
|
cancel: "Abbrechen",
|
|
242
|
+
characterCount: (count) => `${localizeNumber(count)} Zeichen`,
|
|
243
|
+
characterLimitHint: (limit) => `Sie können bis zu ${localizeNumber(limit)} Zeichen eingeben.`,
|
|
244
|
+
charactersLeft: (count) => `${localizeNumber(count)} Zeichen übrig`,
|
|
245
|
+
charactersOver: (count) => `${localizeNumber(count)} Zeichen zu viel`,
|
|
242
246
|
codeBlock: "Codeblock",
|
|
243
247
|
color: "Farbe",
|
|
244
248
|
contentLabel: "Rich-Text-Editor",
|
|
@@ -246,6 +250,7 @@ const MONA_DE_DE_LOCALE = {
|
|
|
246
250
|
deleteColumn: "Spalte löschen",
|
|
247
251
|
deleteRow: "Zeile löschen",
|
|
248
252
|
deleteTable: "Tabelle löschen",
|
|
253
|
+
editImage: "Bild bearbeiten",
|
|
249
254
|
editLink: "Link bearbeiten",
|
|
250
255
|
enterUrl: "URL eingeben",
|
|
251
256
|
fontSize: "Schriftgröße",
|
|
@@ -253,6 +258,11 @@ const MONA_DE_DE_LOCALE = {
|
|
|
253
258
|
heading: (level) => `Überschrift ${localizeNumber(level)}`,
|
|
254
259
|
heightPx: "Höhe (px)",
|
|
255
260
|
historyGroup: "Verlauf",
|
|
261
|
+
imageFile: "Bilddatei",
|
|
262
|
+
imageInserted: (name) => `${name} eingefügt.`,
|
|
263
|
+
imageTooLarge: (name, size) => `${name} wurde nicht hinzugefügt. Die Datei ist größer als ${size}.`,
|
|
264
|
+
imageUploadFailed: (name) => `${name} konnte nicht hochgeladen werden.`,
|
|
265
|
+
imageUploading: (name) => `${name} wird hochgeladen`,
|
|
256
266
|
imageUrl: "Bild-URL",
|
|
257
267
|
indent: "Einzug vergrößern",
|
|
258
268
|
indentGroup: "Einzug",
|
|
@@ -268,12 +278,20 @@ const MONA_DE_DE_LOCALE = {
|
|
|
268
278
|
justify: "Blocksatz",
|
|
269
279
|
linkGroup: "Verknüpfung",
|
|
270
280
|
listGroup: "Listen",
|
|
281
|
+
mentionNoResults: "Keine Treffer",
|
|
282
|
+
mentionResults: (count) => plural(PLURAL_RULES.select(count), {
|
|
283
|
+
one: () => `${localizeNumber(count)} Vorschlag`,
|
|
284
|
+
other: () => `${localizeNumber(count)} Vorschläge`
|
|
285
|
+
}),
|
|
286
|
+
mentionSearching: "Suche läuft…",
|
|
287
|
+
mentionSuggestions: "Vorschläge",
|
|
271
288
|
mergeCells: "Ausgewählte Zellen verbinden",
|
|
272
289
|
outdent: "Einzug verkleinern",
|
|
273
290
|
paragraph: "Absatz",
|
|
274
291
|
quotation: "Zitat",
|
|
275
292
|
redo: "Wiederholen",
|
|
276
293
|
removeLink: "Link entfernen",
|
|
294
|
+
save: "Speichern",
|
|
277
295
|
selectFontFamily: "Schriftart auswählen",
|
|
278
296
|
selectFontSize: "Schriftgröße auswählen",
|
|
279
297
|
splitCell: "Zelle teilen",
|
|
@@ -287,7 +305,11 @@ const MONA_DE_DE_LOCALE = {
|
|
|
287
305
|
toolbar: "Formatierung",
|
|
288
306
|
underline: "Unterstrichen",
|
|
289
307
|
undo: "Rückgängig",
|
|
290
|
-
widthPx: "Breite (px)"
|
|
308
|
+
widthPx: "Breite (px)",
|
|
309
|
+
wordCount: (count) => plural(PLURAL_RULES.select(count), {
|
|
310
|
+
one: () => `${localizeNumber(count)} Wort`,
|
|
311
|
+
other: () => `${localizeNumber(count)} Wörter`
|
|
312
|
+
})
|
|
291
313
|
},
|
|
292
314
|
fileUpload: {
|
|
293
315
|
browse: "Dateien durchsuchen",
|
|
@@ -239,6 +239,22 @@ const MONA_ES_ES_LOCALE = {
|
|
|
239
239
|
backgroundColor: "Color de fondo",
|
|
240
240
|
bold: "Negrita",
|
|
241
241
|
cancel: "Cancelar",
|
|
242
|
+
characterCount: (count) => plural(PLURAL_RULES.select(count), {
|
|
243
|
+
one: () => `${localizeNumber(count)} carácter`,
|
|
244
|
+
other: () => `${localizeNumber(count)} caracteres`
|
|
245
|
+
}),
|
|
246
|
+
characterLimitHint: (limit) => `Puede escribir hasta ${plural(PLURAL_RULES.select(limit), {
|
|
247
|
+
one: () => `${localizeNumber(limit)} carácter`,
|
|
248
|
+
other: () => `${localizeNumber(limit)} caracteres`
|
|
249
|
+
})}.`,
|
|
250
|
+
charactersLeft: (count) => plural(PLURAL_RULES.select(count), {
|
|
251
|
+
one: () => `Queda ${localizeNumber(count)} carácter`,
|
|
252
|
+
other: () => `Quedan ${localizeNumber(count)} caracteres`
|
|
253
|
+
}),
|
|
254
|
+
charactersOver: (count) => plural(PLURAL_RULES.select(count), {
|
|
255
|
+
one: () => `${localizeNumber(count)} carácter de más`,
|
|
256
|
+
other: () => `${localizeNumber(count)} caracteres de más`
|
|
257
|
+
}),
|
|
242
258
|
codeBlock: "Bloque de código",
|
|
243
259
|
color: "Color",
|
|
244
260
|
contentLabel: "Editor de texto enriquecido",
|
|
@@ -246,6 +262,7 @@ const MONA_ES_ES_LOCALE = {
|
|
|
246
262
|
deleteColumn: "Eliminar columna",
|
|
247
263
|
deleteRow: "Eliminar fila",
|
|
248
264
|
deleteTable: "Eliminar tabla",
|
|
265
|
+
editImage: "Editar imagen",
|
|
249
266
|
editLink: "Editar enlace",
|
|
250
267
|
enterUrl: "Introducir la URL",
|
|
251
268
|
fontSize: "Tamaño de fuente",
|
|
@@ -253,6 +270,11 @@ const MONA_ES_ES_LOCALE = {
|
|
|
253
270
|
heading: (level) => `Encabezado ${localizeNumber(level)}`,
|
|
254
271
|
heightPx: "Altura (px)",
|
|
255
272
|
historyGroup: "Historial",
|
|
273
|
+
imageFile: "Archivo de imagen",
|
|
274
|
+
imageInserted: (name) => `Se ha insertado ${name}.`,
|
|
275
|
+
imageTooLarge: (name, size) => `No se ha añadido ${name}. El archivo supera ${size}.`,
|
|
276
|
+
imageUploadFailed: (name) => `No se ha podido subir ${name}.`,
|
|
277
|
+
imageUploading: (name) => `Subiendo ${name}`,
|
|
256
278
|
imageUrl: "URL de la imagen",
|
|
257
279
|
indent: "Aumentar sangría",
|
|
258
280
|
indentGroup: "Sangría",
|
|
@@ -268,12 +290,20 @@ const MONA_ES_ES_LOCALE = {
|
|
|
268
290
|
justify: "Justificar",
|
|
269
291
|
linkGroup: "Enlace",
|
|
270
292
|
listGroup: "Listas",
|
|
293
|
+
mentionNoResults: "No hay coincidencias",
|
|
294
|
+
mentionResults: (count) => plural(PLURAL_RULES.select(count), {
|
|
295
|
+
one: () => `${localizeNumber(count)} sugerencia`,
|
|
296
|
+
other: () => `${localizeNumber(count)} sugerencias`
|
|
297
|
+
}),
|
|
298
|
+
mentionSearching: "Buscando…",
|
|
299
|
+
mentionSuggestions: "Sugerencias",
|
|
271
300
|
mergeCells: "Combinar celdas seleccionadas",
|
|
272
301
|
outdent: "Reducir sangría",
|
|
273
302
|
paragraph: "Párrafo",
|
|
274
303
|
quotation: "Cita",
|
|
275
304
|
redo: "Rehacer",
|
|
276
305
|
removeLink: "Quitar enlace",
|
|
306
|
+
save: "Guardar",
|
|
277
307
|
selectFontFamily: "Seleccionar familia de fuentes",
|
|
278
308
|
selectFontSize: "Seleccionar tamaño de fuente",
|
|
279
309
|
splitCell: "Dividir celda",
|
|
@@ -287,7 +317,11 @@ const MONA_ES_ES_LOCALE = {
|
|
|
287
317
|
toolbar: "Formato",
|
|
288
318
|
underline: "Subrayado",
|
|
289
319
|
undo: "Deshacer",
|
|
290
|
-
widthPx: "Anchura (px)"
|
|
320
|
+
widthPx: "Anchura (px)",
|
|
321
|
+
wordCount: (count) => plural(PLURAL_RULES.select(count), {
|
|
322
|
+
one: () => `${localizeNumber(count)} palabra`,
|
|
323
|
+
other: () => `${localizeNumber(count)} palabras`
|
|
324
|
+
})
|
|
291
325
|
},
|
|
292
326
|
fileUpload: {
|
|
293
327
|
browse: "Examinar archivos",
|
|
@@ -239,6 +239,22 @@ const MONA_FR_FR_LOCALE = {
|
|
|
239
239
|
backgroundColor: "Couleur d’arrière-plan",
|
|
240
240
|
bold: "Gras",
|
|
241
241
|
cancel: "Annuler",
|
|
242
|
+
characterCount: (count) => plural(PLURAL_RULES.select(count), {
|
|
243
|
+
one: () => `${localizeNumber(count)} caractère`,
|
|
244
|
+
other: () => `${localizeNumber(count)} caractères`
|
|
245
|
+
}),
|
|
246
|
+
characterLimitHint: (limit) => `Vous pouvez saisir jusqu’à ${plural(PLURAL_RULES.select(limit), {
|
|
247
|
+
one: () => `${localizeNumber(limit)} caractère`,
|
|
248
|
+
other: () => `${localizeNumber(limit)} caractères`
|
|
249
|
+
})}.`,
|
|
250
|
+
charactersLeft: (count) => plural(PLURAL_RULES.select(count), {
|
|
251
|
+
one: () => `${localizeNumber(count)} caractère restant`,
|
|
252
|
+
other: () => `${localizeNumber(count)} caractères restants`
|
|
253
|
+
}),
|
|
254
|
+
charactersOver: (count) => plural(PLURAL_RULES.select(count), {
|
|
255
|
+
one: () => `${localizeNumber(count)} caractère en trop`,
|
|
256
|
+
other: () => `${localizeNumber(count)} caractères en trop`
|
|
257
|
+
}),
|
|
242
258
|
codeBlock: "Bloc de code",
|
|
243
259
|
color: "Couleur",
|
|
244
260
|
contentLabel: "Éditeur de texte enrichi",
|
|
@@ -246,6 +262,7 @@ const MONA_FR_FR_LOCALE = {
|
|
|
246
262
|
deleteColumn: "Supprimer la colonne",
|
|
247
263
|
deleteRow: "Supprimer la ligne",
|
|
248
264
|
deleteTable: "Supprimer le tableau",
|
|
265
|
+
editImage: "Modifier l’image",
|
|
249
266
|
editLink: "Modifier le lien",
|
|
250
267
|
enterUrl: "Saisir l’URL",
|
|
251
268
|
fontSize: "Taille de police",
|
|
@@ -253,6 +270,11 @@ const MONA_FR_FR_LOCALE = {
|
|
|
253
270
|
heading: (level) => `Titre ${localizeNumber(level)}`,
|
|
254
271
|
heightPx: "Hauteur (px)",
|
|
255
272
|
historyGroup: "Historique",
|
|
273
|
+
imageFile: "Fichier image",
|
|
274
|
+
imageInserted: (name) => `${name} a été inséré.`,
|
|
275
|
+
imageTooLarge: (name, size) => `${name} n’a pas été ajouté. Le fichier dépasse ${size}.`,
|
|
276
|
+
imageUploadFailed: (name) => `Impossible de téléverser ${name}.`,
|
|
277
|
+
imageUploading: (name) => `Téléversement de ${name}`,
|
|
256
278
|
imageUrl: "URL de l’image",
|
|
257
279
|
indent: "Augmenter le retrait",
|
|
258
280
|
indentGroup: "Retrait",
|
|
@@ -268,12 +290,20 @@ const MONA_FR_FR_LOCALE = {
|
|
|
268
290
|
justify: "Justifier le texte",
|
|
269
291
|
linkGroup: "Lien",
|
|
270
292
|
listGroup: "Listes",
|
|
293
|
+
mentionNoResults: "Aucun résultat",
|
|
294
|
+
mentionResults: (count) => plural(PLURAL_RULES.select(count), {
|
|
295
|
+
one: () => `${localizeNumber(count)} proposition`,
|
|
296
|
+
other: () => `${localizeNumber(count)} propositions`
|
|
297
|
+
}),
|
|
298
|
+
mentionSearching: "Recherche…",
|
|
299
|
+
mentionSuggestions: "Propositions",
|
|
271
300
|
mergeCells: "Fusionner les cellules sélectionnées",
|
|
272
301
|
outdent: "Diminuer le retrait",
|
|
273
302
|
paragraph: "Paragraphe",
|
|
274
303
|
quotation: "Citation",
|
|
275
304
|
redo: "Rétablir",
|
|
276
305
|
removeLink: "Supprimer le lien",
|
|
306
|
+
save: "Enregistrer",
|
|
277
307
|
selectFontFamily: "Sélectionner la police",
|
|
278
308
|
selectFontSize: "Sélectionner la taille de police",
|
|
279
309
|
splitCell: "Scinder la cellule",
|
|
@@ -287,7 +317,11 @@ const MONA_FR_FR_LOCALE = {
|
|
|
287
317
|
toolbar: "Mise en forme",
|
|
288
318
|
underline: "Souligné",
|
|
289
319
|
undo: "Annuler",
|
|
290
|
-
widthPx: "Largeur (px)"
|
|
320
|
+
widthPx: "Largeur (px)",
|
|
321
|
+
wordCount: (count) => plural(PLURAL_RULES.select(count), {
|
|
322
|
+
one: () => `${localizeNumber(count)} mot`,
|
|
323
|
+
other: () => `${localizeNumber(count)} mots`
|
|
324
|
+
})
|
|
291
325
|
},
|
|
292
326
|
fileUpload: {
|
|
293
327
|
browse: "Parcourir les fichiers",
|