@acorex/core 21.0.3-next.3 → 21.0.3-next.31
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/fesm2022/acorex-core-components.mjs +3 -3
- package/fesm2022/acorex-core-components.mjs.map +1 -1
- package/fesm2022/acorex-core-config.mjs +3 -3
- package/fesm2022/acorex-core-config.mjs.map +1 -1
- package/fesm2022/acorex-core-constants.mjs.map +1 -1
- package/fesm2022/acorex-core-date-time.mjs +25 -25
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs +3 -3
- package/fesm2022/acorex-core-events.mjs.map +1 -1
- package/fesm2022/acorex-core-file.mjs +196 -68
- package/fesm2022/acorex-core-file.mjs.map +1 -1
- package/fesm2022/acorex-core-format.mjs +19 -19
- package/fesm2022/acorex-core-format.mjs.map +1 -1
- package/fesm2022/acorex-core-full-screen.mjs +4 -4
- package/fesm2022/acorex-core-full-screen.mjs.map +1 -1
- package/fesm2022/acorex-core-icon.mjs +3 -3
- package/fesm2022/acorex-core-icon.mjs.map +1 -1
- package/fesm2022/acorex-core-image.mjs +3 -3
- package/fesm2022/acorex-core-image.mjs.map +1 -1
- package/fesm2022/acorex-core-locale.mjs +12 -12
- package/fesm2022/acorex-core-locale.mjs.map +1 -1
- package/fesm2022/acorex-core-memoize.mjs.map +1 -1
- package/fesm2022/acorex-core-network.mjs +4 -4
- package/fesm2022/acorex-core-network.mjs.map +1 -1
- package/fesm2022/acorex-core-pipes.mjs +3 -3
- package/fesm2022/acorex-core-pipes.mjs.map +1 -1
- package/fesm2022/acorex-core-platform.mjs +4 -4
- package/fesm2022/acorex-core-platform.mjs.map +1 -1
- package/fesm2022/acorex-core-storage.mjs +9 -9
- package/fesm2022/acorex-core-storage.mjs.map +1 -1
- package/fesm2022/acorex-core-translation.mjs +16 -16
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs +7 -9
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/fesm2022/acorex-core-validation.mjs +40 -40
- package/fesm2022/acorex-core-validation.mjs.map +1 -1
- package/fesm2022/acorex-core-z-index.mjs +3 -3
- package/fesm2022/acorex-core-z-index.mjs.map +1 -1
- package/fesm2022/acorex-core.mjs.map +1 -1
- package/{types/acorex-core-file.d.ts → file/index.d.ts} +74 -21
- package/{types/acorex-core-format.d.ts → format/index.d.ts} +2 -2
- package/package.json +27 -28
- package/{types/acorex-core-utils.d.ts → utils/index.d.ts} +2 -10
- package/{types/acorex-core-validation.d.ts → validation/index.d.ts} +10 -10
- /package/{types/acorex-core-components.d.ts → components/index.d.ts} +0 -0
- /package/{types/acorex-core-config.d.ts → config/index.d.ts} +0 -0
- /package/{types/acorex-core-constants.d.ts → constants/index.d.ts} +0 -0
- /package/{types/acorex-core-date-time.d.ts → date-time/index.d.ts} +0 -0
- /package/{types/acorex-core-events.d.ts → events/index.d.ts} +0 -0
- /package/{types/acorex-core-full-screen.d.ts → full-screen/index.d.ts} +0 -0
- /package/{types/acorex-core-icon.d.ts → icon/index.d.ts} +0 -0
- /package/{types/acorex-core-image.d.ts → image/index.d.ts} +0 -0
- /package/{types/acorex-core.d.ts → index.d.ts} +0 -0
- /package/{types/acorex-core-locale.d.ts → locale/index.d.ts} +0 -0
- /package/{types/acorex-core-memoize.d.ts → memoize/index.d.ts} +0 -0
- /package/{types/acorex-core-network.d.ts → network/index.d.ts} +0 -0
- /package/{types/acorex-core-pipes.d.ts → pipes/index.d.ts} +0 -0
- /package/{types/acorex-core-platform.d.ts → platform/index.d.ts} +0 -0
- /package/{types/acorex-core-storage.d.ts → storage/index.d.ts} +0 -0
- /package/{types/acorex-core-translation.d.ts → translation/index.d.ts} +0 -0
- /package/{types/acorex-core-z-index.d.ts → z-index/index.d.ts} +0 -0
|
@@ -44,10 +44,10 @@ class AXEventService {
|
|
|
44
44
|
d.events = [];
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
48
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXEventService, providedIn: 'root' }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXEventService, decorators: [{
|
|
51
51
|
type: Injectable,
|
|
52
52
|
args: [{ providedIn: 'root' }]
|
|
53
53
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-core-events.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"acorex-core-events.mjs","sources":["../tmp-esm2022/events/lib/event.service.js","../tmp-esm2022/events/acorex-core-events.js"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nexport var AXSystemEvents;\n(function (AXSystemEvents) {\n AXSystemEvents[\"AXLocaleChanged\"] = \"AX_LOCALE_CHANGED\";\n AXSystemEvents[\"AXLocaleLoaded\"] = \"AX_LOCALE_LOADED\";\n //\n AXSystemEvents[\"AXCalendarChanged\"] = \"AX_CALENDAR_CHANGED\";\n //\n AXSystemEvents[\"AXLanguageChanged\"] = \"AX_LANGUAGE_CHANGED\";\n AXSystemEvents[\"AXLanguageLoaded\"] = \"AX_LANGUAGE_LOADED\";\n})(AXSystemEvents || (AXSystemEvents = {}));\nexport class AXEventService {\n constructor() {\n this.eventSubject = new Subject();\n // Observable property\n this.onEvent = this.eventSubject.asObservable();\n this.list = [];\n }\n emitEvent(event) {\n this.eventSubject.next(event);\n }\n broadcast(key, options) {\n const d = this.list.find((c) => c.key === key);\n if (d) {\n d.events.forEach((c) => {\n c(options);\n });\n }\n }\n on(key, callback) {\n let d = this.list.find((c) => c.key === key);\n if (!d) {\n d = { key, events: [] };\n this.list.push(d);\n }\n d.events.push(callback);\n }\n destroy(key, callback) {\n const d = this.list.find((c) => c.key === key);\n if (d) {\n d.events = [];\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXEventService, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXEventService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvZXZlbnRzL3NyYy9saWIvZXZlbnQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBYyxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7O0FBRTNDLE1BQU0sQ0FBTixJQUFZLGNBUVg7QUFSRCxXQUFZLGNBQWM7SUFDeEIsdURBQXFDLENBQUE7SUFDckMscURBQW1DLENBQUE7SUFDbkMsRUFBRTtJQUNGLDJEQUF5QyxDQUFBO0lBQ3pDLEVBQUU7SUFDRiwyREFBeUMs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ZiAoIWQpIHtcbiAgICAgIGQgPSB7IGtleSwgZXZlbnRzOiBbXSB9O1xuICAgICAgdGhpcy5saXN0LnB1c2goZCk7XG4gICAgfVxuICAgIGQuZXZlbnRzLnB1c2goY2FsbGJhY2spO1xuICB9XG5cbiAgcHVibGljIGRlc3Ryb3koa2V5OiBzdHJpbmcsIGNhbGxiYWNrOiAob3B0aW9ucz86IGFueSkgPT4gdm9pZCk6IHZvaWQge1xuICAgIGNvbnN0IGQgPSB0aGlzLmxpc3QuZmluZCgoYykgPT4gYy5rZXkgPT09IGtleSk7XG4gICAgaWYgKGQpIHtcbiAgICAgIGQuZXZlbnRzID0gW107XG4gICAgfVxuICB9XG59XG4iXX0=","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtZXZlbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29yZS9ldmVudHMvc3JjL2Fjb3JleC1jb3JlLWV2ZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ=="],"names":[],"mappings":";;;;AAGU,IAAC;AACX,CAAC,UAAU,cAAc,EAAE;AAC3B,IAAI,cAAc,CAAC,iBAAiB,CAAC,GAAG,mBAAmB;AAC3D,IAAI,cAAc,CAAC,gBAAgB,CAAC,GAAG,kBAAkB;AACzD;AACA,IAAI,cAAc,CAAC,mBAAmB,CAAC,GAAG,qBAAqB;AAC/D;AACA,IAAI,cAAc,CAAC,mBAAmB,CAAC,GAAG,qBAA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AC/B,IAAI;AACJ,IAAI,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE;AAC3B,QAAQ,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;AACtD,QAAQ,IAAI,CAAC,EAAE;AACf,YAAY,CAAC,CAAC,MAAM,GAAG,EAAE;AACzB,QAAQ;AACR,IAAI;AACJ,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;AACjL,IAAI,SAAS,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,qBAAqB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;AACxJ;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;AACxH,YAAY,IAAI,EAAE,UAAU;AAC5B,YAAY,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE;AACzC,SAAS,CAAC,EAAE,CAAC;;ACnDb;AACA;AACA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, InjectionToken, inject, NgModule, DOCUMENT, isDevMode } from '@angular/core';
|
|
2
|
+
import { Injectable, runInInjectionContext, InjectionToken, inject, NgModule, DOCUMENT, isDevMode } from '@angular/core';
|
|
3
3
|
import * as i2 from '@acorex/core/validation';
|
|
4
4
|
import { AXValidationService, AXValidationRegistryService, AXValidationModule } from '@acorex/core/validation';
|
|
5
5
|
import * as i1 from '@acorex/core/format';
|
|
@@ -31,10 +31,10 @@ class AXFileSizeFormatter {
|
|
|
31
31
|
const i = Math.floor(Math.log(size) / Math.log(k));
|
|
32
32
|
return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
33
33
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
35
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileSizeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
35
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileSizeFormatter }); }
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileSizeFormatter, decorators: [{
|
|
38
38
|
type: Injectable
|
|
39
39
|
}] });
|
|
40
40
|
|
|
@@ -57,6 +57,38 @@ function formatFileSizeBytes(bytes) {
|
|
|
57
57
|
return `${value.toFixed(digits)} ${units[i]}`;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/** Metadata key for catalog usage context. */
|
|
61
|
+
const AX_FILE_TYPE_METADATA_PURPOSE = 'purpose';
|
|
62
|
+
|
|
63
|
+
const CONVERSATION_NAME_PREFIX = 'conversation-';
|
|
64
|
+
function getFileTypePurposes(type) {
|
|
65
|
+
const raw = type.metadata?.[AX_FILE_TYPE_METADATA_PURPOSE];
|
|
66
|
+
if (Array.isArray(raw)) {
|
|
67
|
+
const values = raw.filter((entry) => typeof entry === 'string' && entry.trim().length > 0);
|
|
68
|
+
if (values.length) {
|
|
69
|
+
return values;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (type.name.startsWith(CONVERSATION_NAME_PREFIX)) {
|
|
73
|
+
return ['conversation'];
|
|
74
|
+
}
|
|
75
|
+
return ['system'];
|
|
76
|
+
}
|
|
77
|
+
function fileTypeMatchesPurpose(type, purpose) {
|
|
78
|
+
const allowed = Array.isArray(purpose) ? purpose : [purpose];
|
|
79
|
+
return getFileTypePurposes(type).some((entry) => allowed.includes(entry));
|
|
80
|
+
}
|
|
81
|
+
function filterFileTypesByPurpose(types, purpose) {
|
|
82
|
+
if (!purpose) {
|
|
83
|
+
return types;
|
|
84
|
+
}
|
|
85
|
+
return types.filter((type) => fileTypeMatchesPurpose(type, purpose));
|
|
86
|
+
}
|
|
87
|
+
function createFileTypeMetadata(purpose) {
|
|
88
|
+
const values = (Array.isArray(purpose) ? purpose : [purpose]).filter((entry) => typeof entry === 'string' && entry.trim().length > 0);
|
|
89
|
+
return { [AX_FILE_TYPE_METADATA_PURPOSE]: values };
|
|
90
|
+
}
|
|
91
|
+
|
|
60
92
|
/** Resolves clipboard/plain text from a copy result. */
|
|
61
93
|
function resolveFileCopyText(result) {
|
|
62
94
|
if (result == null) {
|
|
@@ -70,18 +102,6 @@ function resolveFileCopyText(result) {
|
|
|
70
102
|
return trimmed && trimmed.length > 0 ? trimmed : null;
|
|
71
103
|
}
|
|
72
104
|
|
|
73
|
-
/** Contributes {@link AXFileType} entries (multi provider). */
|
|
74
|
-
class AXFileTypeInfoProvider {
|
|
75
|
-
}
|
|
76
|
-
const AX_FILE_TYPE_INFO_PROVIDER = new InjectionToken('AX_FILE_TYPE_INFO_PROVIDER');
|
|
77
|
-
function provideFileTypeInfoProvider(provider) {
|
|
78
|
-
return {
|
|
79
|
-
provide: AX_FILE_TYPE_INFO_PROVIDER,
|
|
80
|
-
useClass: provider,
|
|
81
|
-
multi: true,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
105
|
/** Merges type-level validations with extension overrides (extension wins per field). */
|
|
86
106
|
function mergeFileValidations(base, override) {
|
|
87
107
|
if (!override) {
|
|
@@ -94,7 +114,7 @@ function mergeFileValidations(base, override) {
|
|
|
94
114
|
rules: override.rules ?? base.rules,
|
|
95
115
|
};
|
|
96
116
|
}
|
|
97
|
-
/** Resolved validations for a type + optional extension. */
|
|
117
|
+
/** Resolved validations for a type + optional extension entry. */
|
|
98
118
|
function resolveFileValidations(type, extension) {
|
|
99
119
|
return mergeFileValidations(type.validations ?? {}, extension?.validations);
|
|
100
120
|
}
|
|
@@ -120,13 +140,125 @@ function getFileExtension(fileName) {
|
|
|
120
140
|
const parts = fileName.trim().split('.');
|
|
121
141
|
return parts.length > 1 ? (parts.pop()?.toLowerCase() ?? '') : '';
|
|
122
142
|
}
|
|
143
|
+
|
|
144
|
+
/** Matches a MIME type against a catalog pattern (`image/*`, exact type, …). */
|
|
145
|
+
function matchesFileMime(mime, pattern) {
|
|
146
|
+
const normalizedMime = mime.trim().toLowerCase();
|
|
147
|
+
const normalizedPattern = pattern.trim().toLowerCase();
|
|
148
|
+
if (!normalizedPattern || normalizedPattern === '*/*' || normalizedPattern === '*') {
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
if (normalizedPattern.endsWith('/*')) {
|
|
152
|
+
const category = normalizedPattern.slice(0, -2);
|
|
153
|
+
return normalizedMime.startsWith(`${category}/`) || (normalizedMime === '' && category === 'application');
|
|
154
|
+
}
|
|
155
|
+
return normalizedMime === normalizedPattern;
|
|
156
|
+
}
|
|
157
|
+
/** Finds an extension entry by its `name` (without dot). */
|
|
158
|
+
function findFileTypeExtensionByName(type, extensionName) {
|
|
159
|
+
const ext = extensionName.replace(/^\./, '').trim().toLowerCase();
|
|
160
|
+
if (!ext || !type.extensions?.length) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
return type.extensions.find((entry) => entry.name.toLowerCase() === ext);
|
|
164
|
+
}
|
|
165
|
+
/** Finds an extension entry whose validations include the given MIME type. */
|
|
166
|
+
function findFileTypeExtensionForMime(type, mimeType) {
|
|
167
|
+
const mime = mimeType.trim().toLowerCase();
|
|
168
|
+
if (!mime || !type.extensions?.length) {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
return type.extensions.find((entry) => entry.validations?.mimeTypes?.some((pattern) => matchesFileMime(mime, pattern)));
|
|
172
|
+
}
|
|
123
173
|
/** Matching extension entry for a file within a type, if any. */
|
|
124
174
|
function findFileTypeExtension(file, type) {
|
|
125
|
-
|
|
126
|
-
|
|
175
|
+
return resolveFileTypeExtension(type, { file });
|
|
176
|
+
}
|
|
177
|
+
/** Resolves the best-matching extension entry for a file or hint. */
|
|
178
|
+
function resolveFileTypeExtension(type, hint) {
|
|
179
|
+
if (!hint) {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
if (hint.file) {
|
|
183
|
+
const byFileName = findFileTypeExtensionByName(type, getFileExtension(hint.file.name));
|
|
184
|
+
if (byFileName) {
|
|
185
|
+
return byFileName;
|
|
186
|
+
}
|
|
187
|
+
if (hint.file.type) {
|
|
188
|
+
const byFileMime = findFileTypeExtensionForMime(type, hint.file.type);
|
|
189
|
+
if (byFileMime) {
|
|
190
|
+
return byFileMime;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (hint.extensionName) {
|
|
195
|
+
const byName = findFileTypeExtensionByName(type, hint.extensionName);
|
|
196
|
+
if (byName) {
|
|
197
|
+
return byName;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (hint.mimeType) {
|
|
201
|
+
return findFileTypeExtensionForMime(type, hint.mimeType);
|
|
202
|
+
}
|
|
203
|
+
return undefined;
|
|
204
|
+
}
|
|
205
|
+
function resolveFileTypeCopy(type, extension) {
|
|
206
|
+
return extension?.copy ?? type.copy;
|
|
207
|
+
}
|
|
208
|
+
function resolveFileTypeOpen(type, extension) {
|
|
209
|
+
return extension?.open ?? type.open;
|
|
210
|
+
}
|
|
211
|
+
function resolveFileTypePaste(type, extension) {
|
|
212
|
+
return extension?.paste ?? type.paste;
|
|
213
|
+
}
|
|
214
|
+
function resolveFileTypeUtility(type, extension, name) {
|
|
215
|
+
const fromExtension = extension?.utilities?.[name];
|
|
216
|
+
if (fromExtension) {
|
|
217
|
+
return fromExtension;
|
|
218
|
+
}
|
|
219
|
+
return type.utilities?.[name];
|
|
220
|
+
}
|
|
221
|
+
/** Runs `copy` from extension first, then parent type. */
|
|
222
|
+
async function runFileTypeCopy(type, payload, extension) {
|
|
223
|
+
const copy = resolveFileTypeCopy(type, extension);
|
|
224
|
+
if (!copy) {
|
|
127
225
|
return undefined;
|
|
128
226
|
}
|
|
129
|
-
return
|
|
227
|
+
return copy(payload);
|
|
228
|
+
}
|
|
229
|
+
/** Runs a utility from extension first, then parent type. */
|
|
230
|
+
function runFileTypeUtility(type, ctx, extension, name, ...args) {
|
|
231
|
+
const utility = resolveFileTypeUtility(type, extension, name);
|
|
232
|
+
if (!utility) {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
return utility(ctx, ...args);
|
|
236
|
+
}
|
|
237
|
+
/** Runs a catalog utility with optional file-based extension resolution. */
|
|
238
|
+
function runFileTypeUtilityForFile(type, ctx, file, name, ...args) {
|
|
239
|
+
const extension = file ? findFileTypeExtension(file, type) : undefined;
|
|
240
|
+
return runFileTypeUtility(type, ctx, extension, name, ...args);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/** Runs `open` from extension first, then parent type, in the caller's injection context. */
|
|
244
|
+
function runFileTypeOpen(type, ctx, payload, extension) {
|
|
245
|
+
const open = resolveFileTypeOpen(type, extension);
|
|
246
|
+
if (!open) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
return runInInjectionContext(ctx.injector, () => open(ctx, payload));
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** Contributes {@link AXFileType} entries (multi provider). */
|
|
253
|
+
class AXFileTypeInfoProvider {
|
|
254
|
+
}
|
|
255
|
+
const AX_FILE_TYPE_INFO_PROVIDER = new InjectionToken('AX_FILE_TYPE_INFO_PROVIDER');
|
|
256
|
+
function provideFileTypeInfoProvider(provider) {
|
|
257
|
+
return {
|
|
258
|
+
provide: AX_FILE_TYPE_INFO_PROVIDER,
|
|
259
|
+
useClass: provider,
|
|
260
|
+
multi: true,
|
|
261
|
+
};
|
|
130
262
|
}
|
|
131
263
|
|
|
132
264
|
/** Maps {@link AXFileValidations} to executable validation entries. */
|
|
@@ -229,8 +361,9 @@ class AXFileTypeRegistryService {
|
|
|
229
361
|
this.cache = [...byName.values()];
|
|
230
362
|
return this.cache;
|
|
231
363
|
}
|
|
232
|
-
async getTypes() {
|
|
233
|
-
|
|
364
|
+
async getTypes(query) {
|
|
365
|
+
const types = await this.resolveTypes();
|
|
366
|
+
return filterFileTypesByPurpose(types, query?.purpose);
|
|
234
367
|
}
|
|
235
368
|
async get(name) {
|
|
236
369
|
const types = await this.resolveTypes();
|
|
@@ -264,7 +397,7 @@ class AXFileTypeRegistryService {
|
|
|
264
397
|
if (!patterns.length) {
|
|
265
398
|
return false;
|
|
266
399
|
}
|
|
267
|
-
return patterns.some((pattern) =>
|
|
400
|
+
return patterns.some((pattern) => matchesFileMime(mime, pattern));
|
|
268
401
|
});
|
|
269
402
|
}
|
|
270
403
|
async validate(file, typeName) {
|
|
@@ -308,20 +441,10 @@ class AXFileTypeRegistryService {
|
|
|
308
441
|
}
|
|
309
442
|
return { accepted, rejected };
|
|
310
443
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return true;
|
|
314
|
-
}
|
|
315
|
-
if (pattern.endsWith('/*')) {
|
|
316
|
-
const category = pattern.slice(0, -2);
|
|
317
|
-
return mime.startsWith(`${category}/`) || (mime === '' && category === 'application');
|
|
318
|
-
}
|
|
319
|
-
return mime === pattern;
|
|
320
|
-
}
|
|
321
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFileTypeRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
322
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFileTypeRegistryService, providedIn: 'root' }); }
|
|
444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileTypeRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
445
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileTypeRegistryService, providedIn: 'root' }); }
|
|
323
446
|
}
|
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileTypeRegistryService, decorators: [{
|
|
325
448
|
type: Injectable,
|
|
326
449
|
args: [{ providedIn: 'root' }]
|
|
327
450
|
}] });
|
|
@@ -329,6 +452,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
329
452
|
const MB$4 = 1024 * 1024;
|
|
330
453
|
const AX_AUDIO_FILE_TYPE = {
|
|
331
454
|
name: 'audio',
|
|
455
|
+
metadata: createFileTypeMetadata('system'),
|
|
332
456
|
title: 'Audio',
|
|
333
457
|
icon: 'fa-light fa-music ax-text-amber-500',
|
|
334
458
|
validations: {
|
|
@@ -347,10 +471,10 @@ class AXAudioFileTypeProvider extends AXFileTypeInfoProvider {
|
|
|
347
471
|
items() {
|
|
348
472
|
return Promise.resolve([AX_AUDIO_FILE_TYPE]);
|
|
349
473
|
}
|
|
350
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
351
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
474
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXAudioFileTypeProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
475
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXAudioFileTypeProvider }); }
|
|
352
476
|
}
|
|
353
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXAudioFileTypeProvider, decorators: [{
|
|
354
478
|
type: Injectable
|
|
355
479
|
}] });
|
|
356
480
|
|
|
@@ -358,6 +482,7 @@ const MB$3 = 1024 * 1024;
|
|
|
358
482
|
/** Extension-only: no type `validations` — only listed extensions are allowed. */
|
|
359
483
|
const AX_DOCUMENT_FILE_TYPE = {
|
|
360
484
|
name: 'document',
|
|
485
|
+
metadata: createFileTypeMetadata('system'),
|
|
361
486
|
title: 'Document',
|
|
362
487
|
icon: 'fa-light fa-file-lines ax-text-red-500',
|
|
363
488
|
extensions: [{ name: 'pdf', title: 'PDF', validations: { mimeTypes: ['application/pdf'], maxSize: 5 * MB$3 } }],
|
|
@@ -366,16 +491,17 @@ class AXDocumentFileTypeProvider extends AXFileTypeInfoProvider {
|
|
|
366
491
|
items() {
|
|
367
492
|
return Promise.resolve([AX_DOCUMENT_FILE_TYPE]);
|
|
368
493
|
}
|
|
369
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
370
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
494
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDocumentFileTypeProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
495
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDocumentFileTypeProvider }); }
|
|
371
496
|
}
|
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDocumentFileTypeProvider, decorators: [{
|
|
373
498
|
type: Injectable
|
|
374
499
|
}] });
|
|
375
500
|
|
|
376
501
|
const MB$2 = 1024 * 1024;
|
|
377
502
|
const AX_FILE_FILE_TYPE = {
|
|
378
503
|
name: 'file',
|
|
504
|
+
metadata: createFileTypeMetadata('system'),
|
|
379
505
|
title: 'File',
|
|
380
506
|
icon: 'fa-light fa-file ax-text-neutral-500',
|
|
381
507
|
validations: {
|
|
@@ -395,16 +521,17 @@ class AXFileFileTypeProvider extends AXFileTypeInfoProvider {
|
|
|
395
521
|
items() {
|
|
396
522
|
return Promise.resolve([AX_FILE_FILE_TYPE]);
|
|
397
523
|
}
|
|
398
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
399
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
524
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileFileTypeProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
525
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileFileTypeProvider }); }
|
|
400
526
|
}
|
|
401
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileFileTypeProvider, decorators: [{
|
|
402
528
|
type: Injectable
|
|
403
529
|
}] });
|
|
404
530
|
|
|
405
531
|
const MB$1 = 1024 * 1024;
|
|
406
532
|
const AX_IMAGE_FILE_TYPE = {
|
|
407
533
|
name: 'image',
|
|
534
|
+
metadata: createFileTypeMetadata('system'),
|
|
408
535
|
title: 'Image',
|
|
409
536
|
icon: 'fa-light fa-image ax-text-purple-500',
|
|
410
537
|
validations: {
|
|
@@ -425,16 +552,17 @@ class AXImageFileTypeProvider extends AXFileTypeInfoProvider {
|
|
|
425
552
|
items() {
|
|
426
553
|
return Promise.resolve([AX_IMAGE_FILE_TYPE]);
|
|
427
554
|
}
|
|
428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
429
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
555
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXImageFileTypeProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
556
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXImageFileTypeProvider }); }
|
|
430
557
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXImageFileTypeProvider, decorators: [{
|
|
432
559
|
type: Injectable
|
|
433
560
|
}] });
|
|
434
561
|
|
|
435
562
|
const MB = 1024 * 1024;
|
|
436
563
|
const AX_VIDEO_FILE_TYPE = {
|
|
437
564
|
name: 'video',
|
|
565
|
+
metadata: createFileTypeMetadata('system'),
|
|
438
566
|
title: 'Video',
|
|
439
567
|
icon: 'fa-light fa-video ax-text-blue-500',
|
|
440
568
|
validations: {
|
|
@@ -452,10 +580,10 @@ class AXVideoFileTypeProvider extends AXFileTypeInfoProvider {
|
|
|
452
580
|
items() {
|
|
453
581
|
return Promise.resolve([AX_VIDEO_FILE_TYPE]);
|
|
454
582
|
}
|
|
455
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
456
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
583
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXVideoFileTypeProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
584
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXVideoFileTypeProvider }); }
|
|
457
585
|
}
|
|
458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXVideoFileTypeProvider, decorators: [{
|
|
459
587
|
type: Injectable
|
|
460
588
|
}] });
|
|
461
589
|
|
|
@@ -500,10 +628,10 @@ class AXFileMimeTypeValidationRule {
|
|
|
500
628
|
}
|
|
501
629
|
return mime === pattern;
|
|
502
630
|
}
|
|
503
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
504
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
631
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMimeTypeValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
632
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMimeTypeValidationRule }); }
|
|
505
633
|
}
|
|
506
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
634
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMimeTypeValidationRule, decorators: [{
|
|
507
635
|
type: Injectable
|
|
508
636
|
}] });
|
|
509
637
|
|
|
@@ -525,10 +653,10 @@ class AXFileMinSizeValidationRule {
|
|
|
525
653
|
minSize: options.minSize,
|
|
526
654
|
};
|
|
527
655
|
}
|
|
528
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
529
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
656
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMinSizeValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
657
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMinSizeValidationRule }); }
|
|
530
658
|
}
|
|
531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMinSizeValidationRule, decorators: [{
|
|
532
660
|
type: Injectable
|
|
533
661
|
}] });
|
|
534
662
|
|
|
@@ -551,10 +679,10 @@ class AXFileMaxSizeValidationRule {
|
|
|
551
679
|
maxSize: options.maxSize,
|
|
552
680
|
};
|
|
553
681
|
}
|
|
554
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
555
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
682
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMaxSizeValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
683
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMaxSizeValidationRule }); }
|
|
556
684
|
}
|
|
557
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileMaxSizeValidationRule, decorators: [{
|
|
558
686
|
type: Injectable
|
|
559
687
|
}] });
|
|
560
688
|
|
|
@@ -598,12 +726,12 @@ class AXFileModule {
|
|
|
598
726
|
static forChild(config) {
|
|
599
727
|
return AXFileModule.forRoot(config);
|
|
600
728
|
}
|
|
601
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
602
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
603
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
729
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
730
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: AXFileModule, imports: [i1.AXFormatModule, i2.AXValidationModule] }); }
|
|
731
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileModule, providers: [AXFileSizeFormatter], imports: [AXFormatModule.forChild({ formatters: [AXFileSizeFormatter] }),
|
|
604
732
|
AXValidationModule.forChild({ rules: [...AX_FILE_VALIDATION_RULES] })] }); }
|
|
605
733
|
}
|
|
606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileModule, decorators: [{
|
|
607
735
|
type: NgModule,
|
|
608
736
|
args: [{
|
|
609
737
|
imports: [
|
|
@@ -724,10 +852,10 @@ class AXFileService {
|
|
|
724
852
|
input.click();
|
|
725
853
|
});
|
|
726
854
|
}
|
|
727
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
728
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
855
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
856
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileService, providedIn: 'root' }); }
|
|
729
857
|
}
|
|
730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileService, decorators: [{
|
|
731
859
|
type: Injectable,
|
|
732
860
|
args: [{ providedIn: 'root' }]
|
|
733
861
|
}] });
|
|
@@ -736,5 +864,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
736
864
|
* Generated bundle index. Do not edit.
|
|
737
865
|
*/
|
|
738
866
|
|
|
739
|
-
export { AXAudioFileTypeProvider, AXDocumentFileTypeProvider, AXFileFileTypeProvider, AXFileMaxSizeValidationRule, AXFileMimeTypeValidationRule, AXFileMinSizeValidationRule, AXFileModule, AXFileService, AXFileSizeFormatter, AXFileTypeInfoProvider, AXFileTypeRegistryService, AXImageFileTypeProvider, AXVideoFileTypeProvider, AX_AUDIO_FILE_TYPE, AX_BUILTIN_FILE_TYPE_PROVIDERS, AX_DOCUMENT_FILE_TYPE, AX_FILE_FILE_TYPE, AX_FILE_TYPE_INFO_PROVIDER, AX_FILE_VALIDATION_RULES, AX_IMAGE_FILE_TYPE, AX_VIDEO_FILE_TYPE, fileValidationsToRules, findFileTypeExtension, formatFileSizeBytes, getFileExtension, isEmptyFileValidations, isExtensionsOnlyType, mergeFileValidations, provideBuiltinFileTypeProviders, provideDefaultFileTypeProviders, provideFileTypeInfoProvider, provideFileTypeSystem, provideFileValidationRules, resolveFileCopyText, resolveFileValidations, validateFileAgainstType, validateFileWithValidations };
|
|
867
|
+
export { AXAudioFileTypeProvider, AXDocumentFileTypeProvider, AXFileFileTypeProvider, AXFileMaxSizeValidationRule, AXFileMimeTypeValidationRule, AXFileMinSizeValidationRule, AXFileModule, AXFileService, AXFileSizeFormatter, AXFileTypeInfoProvider, AXFileTypeRegistryService, AXImageFileTypeProvider, AXVideoFileTypeProvider, AX_AUDIO_FILE_TYPE, AX_BUILTIN_FILE_TYPE_PROVIDERS, AX_DOCUMENT_FILE_TYPE, AX_FILE_FILE_TYPE, AX_FILE_TYPE_INFO_PROVIDER, AX_FILE_TYPE_METADATA_PURPOSE, AX_FILE_VALIDATION_RULES, AX_IMAGE_FILE_TYPE, AX_VIDEO_FILE_TYPE, createFileTypeMetadata, fileTypeMatchesPurpose, fileValidationsToRules, filterFileTypesByPurpose, findFileTypeExtension, findFileTypeExtensionByName, findFileTypeExtensionForMime, formatFileSizeBytes, getFileExtension, getFileTypePurposes, isEmptyFileValidations, isExtensionsOnlyType, matchesFileMime, mergeFileValidations, provideBuiltinFileTypeProviders, provideDefaultFileTypeProviders, provideFileTypeInfoProvider, provideFileTypeSystem, provideFileValidationRules, resolveFileCopyText, resolveFileTypeCopy, resolveFileTypeExtension, resolveFileTypeOpen, resolveFileTypePaste, resolveFileTypeUtility, resolveFileValidations, runFileTypeCopy, runFileTypeOpen, runFileTypeUtility, runFileTypeUtilityForFile, validateFileAgainstType, validateFileWithValidations };
|
|
740
868
|
//# sourceMappingURL=acorex-core-file.mjs.map
|