@mmlogic/components 0.4.3 → 0.5.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/dist/cjs/client-layout-RZ3Ix-4a.js +87 -0
- package/dist/cjs/{index-CAzwGt9u.js → index-DzRfoAPz.js} +36 -9
- package/dist/cjs/index.cjs.js +56 -81
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mosterdcomponents.cjs.js +3 -3
- package/dist/cjs/{mrd-boolean-field_24.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +146 -274
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/documents/mrd-document-container/mrd-document-container.css +0 -17
- package/dist/collection/components/documents/mrd-document-container/mrd-document-container.js +12 -4
- package/dist/collection/components/documents/mrd-document-list/mrd-document-list.css +9 -43
- package/dist/collection/components/documents/mrd-document-list/mrd-document-list.js +14 -6
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.css +3 -44
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.js +37 -85
- package/dist/collection/components/fields/mrd-boolean-field/mrd-boolean-field.css +0 -10
- package/dist/collection/components/fields/mrd-currency-field/mrd-currency-field.css +0 -7
- package/dist/collection/components/fields/mrd-file-field/mrd-file-field.css +0 -11
- package/dist/collection/components/fields/mrd-hyperlink-field/mrd-hyperlink-field.css +0 -3
- package/dist/collection/components/fields/mrd-image-field/mrd-image-field.css +6 -20
- package/dist/collection/components/fields/mrd-list-field/mrd-list-field.css +0 -4
- package/dist/collection/components/fields/mrd-longtext-field/mrd-longtext-field.css +0 -1
- package/dist/collection/components/fields/mrd-relation-field/mrd-relation-field.css +9 -35
- package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.css +0 -9
- package/dist/collection/components/form/mrd-field/mrd-field.css +0 -13
- package/dist/collection/components/form/mrd-form/mrd-form.css +0 -19
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.css +3 -58
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +25 -66
- package/dist/collection/components/table/mrd-table/mrd-table.css +38 -185
- package/dist/collection/components/table/mrd-table/mrd-table.js +1 -1
- package/dist/collection/dev/app.js +76 -40
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/document-attachments.js +20 -0
- package/dist/collection/{components/documents/mrd-file-preview → utils}/file-preview-kind.js +4 -4
- package/dist/collection/utils/i18n.js +0 -32
- package/dist/components/document-attachments.js +1 -0
- package/dist/components/field-helpers.js +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/mrd-document-container2.js +1 -1
- package/dist/components/mrd-document-list2.js +1 -1
- package/dist/components/mrd-document-view2.js +1 -1
- package/dist/components/mrd-email-field2.js +1 -1
- package/dist/components/mrd-form.js +1 -1
- package/dist/components/mrd-hyperlink-field2.js +1 -1
- package/dist/components/mrd-image-field2.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-number-field2.js +1 -1
- package/dist/components/mrd-relation-field2.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/client-layout-DCOAAH92.js +84 -0
- package/dist/esm/{index-DiSEJMA8.js → index-DiSe6vjv.js} +36 -9
- package/dist/esm/index.js +30 -80
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mosterdcomponents.js +4 -4
- package/dist/esm/{mrd-boolean-field_24.entry.js → mrd-boolean-field_23.entry.js} +56 -183
- package/dist/mosterdcomponents/index.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.css +7 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/p-DCOAAH92.js +1 -0
- package/dist/mosterdcomponents/p-DiSe6vjv.js +2 -0
- package/dist/mosterdcomponents/p-b56f9802.entry.js +1 -0
- package/dist/types/components/documents/mrd-document-container/mrd-document-container.d.ts +4 -2
- package/dist/types/components/documents/mrd-document-list/mrd-document-list.d.ts +6 -2
- package/dist/types/components/documents/mrd-document-view/mrd-document-view.d.ts +21 -27
- package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +12 -15
- package/dist/types/components.d.ts +49 -187
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/types/client-layout.d.ts +8 -0
- package/dist/types/utils/document-attachments.d.ts +8 -0
- package/dist/types/utils/file-preview-kind.d.ts +9 -0
- package/package.json +10 -12
- package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.css +0 -59
- package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.js +0 -212
- package/dist/components/mrd-file-preview.d.ts +0 -11
- package/dist/components/mrd-file-preview.js +0 -1
- package/dist/components/mrd-file-preview2.js +0 -1
- package/dist/mosterdcomponents/p-DiSEJMA8.js +0 -2
- package/dist/mosterdcomponents/p-e816d459.entry.js +0 -1
- package/dist/types/components/documents/mrd-file-preview/file-preview-kind.d.ts +0 -9
- package/dist/types/components/documents/mrd-file-preview/mrd-file-preview.d.ts +0 -41
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** Pure classification logic for mrd-file-preview — no Stencil dependency. */
|
|
2
|
-
export type FilePreviewKind = 'pdf' | 'image' | 'unsupported';
|
|
3
|
-
/**
|
|
4
|
-
* Decide how to render a file given its declared mime type and/or file name.
|
|
5
|
-
* A declared mime type is authoritative when present (a mismatched file name
|
|
6
|
-
* extension is ignored); the file name extension is only consulted as a
|
|
7
|
-
* fallback when no mime type is known.
|
|
8
|
-
*/
|
|
9
|
-
export declare function detectPreviewKind(mimeType?: string | null, fileName?: string | null): FilePreviewKind;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
/**
|
|
3
|
-
* Renders a signed URL inline as a PDF (native browser viewer, via `<iframe>`)
|
|
4
|
-
* or an image (`<img>`), picked from `mimeType`/`fileName`. Purely
|
|
5
|
-
* presentational: the signed URL is used directly as element `src` — a
|
|
6
|
-
* navigation, not a fetch/XHR, so no CORS handling is needed here. Fetching
|
|
7
|
-
* the signed URL itself is the host's responsibility, same as `mrdLoadImage` /
|
|
8
|
-
* `setImagePreview` on mrd-layout-section.
|
|
9
|
-
*/
|
|
10
|
-
export declare class MrdFilePreview {
|
|
11
|
-
/** Signed URL to render. */
|
|
12
|
-
src: string;
|
|
13
|
-
/** Declared mime type (e.g. 'application/pdf', 'image/png'), when known.
|
|
14
|
-
* Authoritative over `fileName` when present. */
|
|
15
|
-
mimeType: string;
|
|
16
|
-
/** Original file name — used for extension-based detection when `mimeType`
|
|
17
|
-
* is absent, and as alt/title text. */
|
|
18
|
-
fileName: string;
|
|
19
|
-
/** The file's own reference href (not the signed preview URL in `src`).
|
|
20
|
-
* When set, an unsupported type falls back to the same download button
|
|
21
|
-
* used elsewhere in the library, so hosts need no new wiring. */
|
|
22
|
-
href: string;
|
|
23
|
-
locale: string;
|
|
24
|
-
/** The image failed to load — most likely an expired signed URL. Host
|
|
25
|
-
* should fetch a fresh signed URL and update `src`.
|
|
26
|
-
* Note: this is only raised for images. Browsers don't reliably surface
|
|
27
|
-
* HTTP-level failures (e.g. a 403 on an expired URL) through an iframe's
|
|
28
|
-
* load/error events, so the same detection isn't available for PDFs. */
|
|
29
|
-
mrdPreviewReload: EventEmitter<void>;
|
|
30
|
-
/** Download the file. Same shape as mrd-document-view / mrd-layout-section's
|
|
31
|
-
* mrdDownload — host resolves `href` to a signed URL. */
|
|
32
|
-
mrdDownload: EventEmitter<{
|
|
33
|
-
href: string;
|
|
34
|
-
fileName: string;
|
|
35
|
-
}>;
|
|
36
|
-
private imageFailed;
|
|
37
|
-
srcChanged(): void;
|
|
38
|
-
private onImageError;
|
|
39
|
-
private retry;
|
|
40
|
-
render(): any;
|
|
41
|
-
}
|