@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// ─── Layout type ──────────────────────────────────────────────────────────────
|
|
4
|
+
exports.ClientLayoutType = void 0;
|
|
5
|
+
(function (ClientLayoutType) {
|
|
6
|
+
ClientLayoutType["OBJECT_FORM_DASHBOARD"] = "OBJECT_FORM_DASHBOARD";
|
|
7
|
+
ClientLayoutType["CLASS_DASHBOARD"] = "CLASS_DASHBOARD";
|
|
8
|
+
ClientLayoutType["GENERAL_DASHBOARD"] = "GENERAL_DASHBOARD";
|
|
9
|
+
ClientLayoutType["NAVIGATION_PANE"] = "NAVIGATION_PANE";
|
|
10
|
+
})(exports.ClientLayoutType || (exports.ClientLayoutType = {}));
|
|
11
|
+
// ─── Item types ───────────────────────────────────────────────────────────────
|
|
12
|
+
exports.ClientLayoutItemType = void 0;
|
|
13
|
+
(function (ClientLayoutItemType) {
|
|
14
|
+
// Form / data input
|
|
15
|
+
ClientLayoutItemType["FIELD"] = "FIELD";
|
|
16
|
+
ClientLayoutItemType["RELATION"] = "RELATION";
|
|
17
|
+
// Layout structure
|
|
18
|
+
ClientLayoutItemType["SECTION"] = "SECTION";
|
|
19
|
+
ClientLayoutItemType["GROUP"] = "GROUP";
|
|
20
|
+
// Read-only / display
|
|
21
|
+
ClientLayoutItemType["HEADER"] = "HEADER";
|
|
22
|
+
ClientLayoutItemType["TEXT"] = "TEXT";
|
|
23
|
+
// Navigation / actions
|
|
24
|
+
ClientLayoutItemType["NAVIGATE"] = "NAVIGATE";
|
|
25
|
+
ClientLayoutItemType["ACTION"] = "ACTION";
|
|
26
|
+
ClientLayoutItemType["SEARCH"] = "SEARCH";
|
|
27
|
+
// Dashboard views
|
|
28
|
+
ClientLayoutItemType["VIEW"] = "VIEW";
|
|
29
|
+
ClientLayoutItemType["RELATED_VIEW"] = "RELATED_VIEW";
|
|
30
|
+
ClientLayoutItemType["RELATED_OBJECT"] = "RELATED_OBJECT";
|
|
31
|
+
})(exports.ClientLayoutItemType || (exports.ClientLayoutItemType = {}));
|
|
32
|
+
// ─── Field data types ─────────────────────────────────────────────────────────
|
|
33
|
+
exports.ClientLayoutItemFieldDataType = void 0;
|
|
34
|
+
(function (ClientLayoutItemFieldDataType) {
|
|
35
|
+
ClientLayoutItemFieldDataType["TEXT"] = "TEXT";
|
|
36
|
+
ClientLayoutItemFieldDataType["TEXTBLOCK"] = "TEXTBLOCK";
|
|
37
|
+
ClientLayoutItemFieldDataType["INTEGER"] = "INTEGER";
|
|
38
|
+
ClientLayoutItemFieldDataType["DECIMAL"] = "DECIMAL";
|
|
39
|
+
ClientLayoutItemFieldDataType["PERCENTAGE"] = "PERCENTAGE";
|
|
40
|
+
ClientLayoutItemFieldDataType["CURRENCY"] = "CURRENCY";
|
|
41
|
+
ClientLayoutItemFieldDataType["BOOLEAN"] = "BOOLEAN";
|
|
42
|
+
ClientLayoutItemFieldDataType["DATE"] = "DATE";
|
|
43
|
+
ClientLayoutItemFieldDataType["DATETIME"] = "DATETIME";
|
|
44
|
+
ClientLayoutItemFieldDataType["TIME"] = "TIME";
|
|
45
|
+
ClientLayoutItemFieldDataType["EMAIL"] = "EMAIL";
|
|
46
|
+
ClientLayoutItemFieldDataType["HYPERLINK"] = "HYPERLINK";
|
|
47
|
+
ClientLayoutItemFieldDataType["LIST"] = "LIST";
|
|
48
|
+
ClientLayoutItemFieldDataType["FILE"] = "FILE";
|
|
49
|
+
ClientLayoutItemFieldDataType["IMAGE"] = "IMAGE";
|
|
50
|
+
ClientLayoutItemFieldDataType["LONGTEXT"] = "LONGTEXT";
|
|
51
|
+
ClientLayoutItemFieldDataType["JSON"] = "JSON";
|
|
52
|
+
ClientLayoutItemFieldDataType["SECRET"] = "SECRET";
|
|
53
|
+
})(exports.ClientLayoutItemFieldDataType || (exports.ClientLayoutItemFieldDataType = {}));
|
|
54
|
+
// ─── Relation display / edit behaviour ───────────────────────────────────────
|
|
55
|
+
exports.ClientLayoutItemRelationDisplayType = void 0;
|
|
56
|
+
(function (ClientLayoutItemRelationDisplayType) {
|
|
57
|
+
ClientLayoutItemRelationDisplayType["SEARCH"] = "SEARCH";
|
|
58
|
+
ClientLayoutItemRelationDisplayType["DROPDOWN"] = "DROPDOWN";
|
|
59
|
+
ClientLayoutItemRelationDisplayType["CHECKBOX"] = "CHECKBOX";
|
|
60
|
+
})(exports.ClientLayoutItemRelationDisplayType || (exports.ClientLayoutItemRelationDisplayType = {}));
|
|
61
|
+
exports.ClientLayoutItemRelationEditBehavior = void 0;
|
|
62
|
+
(function (ClientLayoutItemRelationEditBehavior) {
|
|
63
|
+
ClientLayoutItemRelationEditBehavior["SEARCH"] = "SEARCH";
|
|
64
|
+
ClientLayoutItemRelationEditBehavior["DROPDOWN"] = "DROPDOWN";
|
|
65
|
+
ClientLayoutItemRelationEditBehavior["CHECKBOX"] = "CHECKBOX";
|
|
66
|
+
})(exports.ClientLayoutItemRelationEditBehavior || (exports.ClientLayoutItemRelationEditBehavior = {}));
|
|
67
|
+
// ─── VIEW / RELATED_VIEW navigate behaviour ──────────────────────────────────
|
|
68
|
+
/** How navigating from a row/document in this VIEW or RELATED_VIEW should open
|
|
69
|
+
* its target: a full page navigation, or an overlay on top of the current page. */
|
|
70
|
+
exports.ClientLayoutNavigateBehaviour = void 0;
|
|
71
|
+
(function (ClientLayoutNavigateBehaviour) {
|
|
72
|
+
ClientLayoutNavigateBehaviour["PAGE"] = "PAGE";
|
|
73
|
+
ClientLayoutNavigateBehaviour["OVERLAY_PAGE"] = "OVERLAY_PAGE";
|
|
74
|
+
})(exports.ClientLayoutNavigateBehaviour || (exports.ClientLayoutNavigateBehaviour = {}));
|
|
75
|
+
/** Well-known archetype ids the client renders specially. */
|
|
76
|
+
const ARCHETYPE_DOCUMENT = 'commons.document';
|
|
77
|
+
/**
|
|
78
|
+
* Find a binding for `archetypeId` in a published `archetypes` list.
|
|
79
|
+
* Returns `undefined` when the archetype is absent — callers fall back to the
|
|
80
|
+
* generic table/field rendering.
|
|
81
|
+
*/
|
|
82
|
+
function resolveArchetype(archetypes, archetypeId) {
|
|
83
|
+
return (archetypes !== null && archetypes !== void 0 ? archetypes : []).find(a => a.archetype === archetypeId);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.ARCHETYPE_DOCUMENT = ARCHETYPE_DOCUMENT;
|
|
87
|
+
exports.resolveArchetype = resolveArchetype;
|
|
@@ -4,7 +4,7 @@ const NAMESPACE = 'mosterdcomponents';
|
|
|
4
4
|
const BUILD = /* mosterdcomponents */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
|
-
Stencil Client Platform v4.43.
|
|
7
|
+
Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
@@ -446,6 +446,31 @@ var convertToPrivate = (node) => {
|
|
|
446
446
|
return vnode;
|
|
447
447
|
};
|
|
448
448
|
|
|
449
|
+
// src/runtime/normalize-watchers.ts
|
|
450
|
+
var normalizeWatchers = (raw) => {
|
|
451
|
+
if (!raw) return void 0;
|
|
452
|
+
const keys = Object.keys(raw);
|
|
453
|
+
if (keys.length === 0) return void 0;
|
|
454
|
+
let hasLegacy = false;
|
|
455
|
+
for (const propName of keys) {
|
|
456
|
+
if (hasLegacy) break;
|
|
457
|
+
for (const h2 of raw[propName]) {
|
|
458
|
+
if (typeof h2 === "string") {
|
|
459
|
+
hasLegacy = true;
|
|
460
|
+
break;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (!hasLegacy) return raw;
|
|
465
|
+
const out = {};
|
|
466
|
+
for (const propName of keys) {
|
|
467
|
+
out[propName] = raw[propName].map(
|
|
468
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
return out;
|
|
472
|
+
};
|
|
473
|
+
|
|
449
474
|
// src/runtime/parse-property-value.ts
|
|
450
475
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
451
476
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -1167,7 +1192,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1167
1192
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
1168
1193
|
{
|
|
1169
1194
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
1170
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1195
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1171
1196
|
}
|
|
1172
1197
|
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
1173
1198
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
@@ -1293,11 +1318,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1293
1318
|
return;
|
|
1294
1319
|
}
|
|
1295
1320
|
const propFlags = members.find(([m]) => m === propName);
|
|
1296
|
-
|
|
1321
|
+
const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
|
|
1322
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1323
|
+
if (isBooleanTarget) {
|
|
1297
1324
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
1298
1325
|
}
|
|
1299
1326
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1300
|
-
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1327
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1301
1328
|
this[propName] = newValue;
|
|
1302
1329
|
}
|
|
1303
1330
|
});
|
|
@@ -1338,7 +1365,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1338
1365
|
}
|
|
1339
1366
|
if (!Cstr.isProxied) {
|
|
1340
1367
|
{
|
|
1341
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1368
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1342
1369
|
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1343
1370
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1344
1371
|
}
|
|
@@ -1491,7 +1518,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1491
1518
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1492
1519
|
lazyBundles.map((lazyBundle) => {
|
|
1493
1520
|
lazyBundle[1].map((compactMeta) => {
|
|
1494
|
-
var _a2, _b
|
|
1521
|
+
var _a2, _b;
|
|
1495
1522
|
const cmpMeta = {
|
|
1496
1523
|
$flags$: compactMeta[0],
|
|
1497
1524
|
$tagName$: compactMeta[1],
|
|
@@ -1502,9 +1529,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1502
1529
|
cmpMeta.$members$ = compactMeta[2];
|
|
1503
1530
|
}
|
|
1504
1531
|
{
|
|
1505
|
-
cmpMeta.$watchers$ = (
|
|
1506
|
-
cmpMeta.$serializers$ = (
|
|
1507
|
-
cmpMeta.$deserializers$ = (
|
|
1532
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
1533
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
1534
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
1508
1535
|
}
|
|
1509
1536
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
1510
1537
|
const HostElement = class extends HTMLElement {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,87 +1,62 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(function (ClientLayoutItemType) {
|
|
14
|
-
// Form / data input
|
|
15
|
-
ClientLayoutItemType["FIELD"] = "FIELD";
|
|
16
|
-
ClientLayoutItemType["RELATION"] = "RELATION";
|
|
17
|
-
// Layout structure
|
|
18
|
-
ClientLayoutItemType["SECTION"] = "SECTION";
|
|
19
|
-
ClientLayoutItemType["GROUP"] = "GROUP";
|
|
20
|
-
// Read-only / display
|
|
21
|
-
ClientLayoutItemType["HEADER"] = "HEADER";
|
|
22
|
-
ClientLayoutItemType["TEXT"] = "TEXT";
|
|
23
|
-
// Navigation / actions
|
|
24
|
-
ClientLayoutItemType["NAVIGATE"] = "NAVIGATE";
|
|
25
|
-
ClientLayoutItemType["ACTION"] = "ACTION";
|
|
26
|
-
ClientLayoutItemType["SEARCH"] = "SEARCH";
|
|
27
|
-
// Dashboard views
|
|
28
|
-
ClientLayoutItemType["VIEW"] = "VIEW";
|
|
29
|
-
ClientLayoutItemType["RELATED_VIEW"] = "RELATED_VIEW";
|
|
30
|
-
ClientLayoutItemType["RELATED_OBJECT"] = "RELATED_OBJECT";
|
|
31
|
-
})(exports.ClientLayoutItemType || (exports.ClientLayoutItemType = {}));
|
|
32
|
-
// ─── Field data types ─────────────────────────────────────────────────────────
|
|
33
|
-
exports.ClientLayoutItemFieldDataType = void 0;
|
|
34
|
-
(function (ClientLayoutItemFieldDataType) {
|
|
35
|
-
ClientLayoutItemFieldDataType["TEXT"] = "TEXT";
|
|
36
|
-
ClientLayoutItemFieldDataType["TEXTBLOCK"] = "TEXTBLOCK";
|
|
37
|
-
ClientLayoutItemFieldDataType["INTEGER"] = "INTEGER";
|
|
38
|
-
ClientLayoutItemFieldDataType["DECIMAL"] = "DECIMAL";
|
|
39
|
-
ClientLayoutItemFieldDataType["PERCENTAGE"] = "PERCENTAGE";
|
|
40
|
-
ClientLayoutItemFieldDataType["CURRENCY"] = "CURRENCY";
|
|
41
|
-
ClientLayoutItemFieldDataType["BOOLEAN"] = "BOOLEAN";
|
|
42
|
-
ClientLayoutItemFieldDataType["DATE"] = "DATE";
|
|
43
|
-
ClientLayoutItemFieldDataType["DATETIME"] = "DATETIME";
|
|
44
|
-
ClientLayoutItemFieldDataType["TIME"] = "TIME";
|
|
45
|
-
ClientLayoutItemFieldDataType["EMAIL"] = "EMAIL";
|
|
46
|
-
ClientLayoutItemFieldDataType["HYPERLINK"] = "HYPERLINK";
|
|
47
|
-
ClientLayoutItemFieldDataType["LIST"] = "LIST";
|
|
48
|
-
ClientLayoutItemFieldDataType["FILE"] = "FILE";
|
|
49
|
-
ClientLayoutItemFieldDataType["IMAGE"] = "IMAGE";
|
|
50
|
-
ClientLayoutItemFieldDataType["LONGTEXT"] = "LONGTEXT";
|
|
51
|
-
ClientLayoutItemFieldDataType["JSON"] = "JSON";
|
|
52
|
-
ClientLayoutItemFieldDataType["SECRET"] = "SECRET";
|
|
53
|
-
})(exports.ClientLayoutItemFieldDataType || (exports.ClientLayoutItemFieldDataType = {}));
|
|
54
|
-
// ─── Relation display / edit behaviour ───────────────────────────────────────
|
|
55
|
-
exports.ClientLayoutItemRelationDisplayType = void 0;
|
|
56
|
-
(function (ClientLayoutItemRelationDisplayType) {
|
|
57
|
-
ClientLayoutItemRelationDisplayType["SEARCH"] = "SEARCH";
|
|
58
|
-
ClientLayoutItemRelationDisplayType["DROPDOWN"] = "DROPDOWN";
|
|
59
|
-
ClientLayoutItemRelationDisplayType["CHECKBOX"] = "CHECKBOX";
|
|
60
|
-
})(exports.ClientLayoutItemRelationDisplayType || (exports.ClientLayoutItemRelationDisplayType = {}));
|
|
61
|
-
exports.ClientLayoutItemRelationEditBehavior = void 0;
|
|
62
|
-
(function (ClientLayoutItemRelationEditBehavior) {
|
|
63
|
-
ClientLayoutItemRelationEditBehavior["SEARCH"] = "SEARCH";
|
|
64
|
-
ClientLayoutItemRelationEditBehavior["DROPDOWN"] = "DROPDOWN";
|
|
65
|
-
ClientLayoutItemRelationEditBehavior["CHECKBOX"] = "CHECKBOX";
|
|
66
|
-
})(exports.ClientLayoutItemRelationEditBehavior || (exports.ClientLayoutItemRelationEditBehavior = {}));
|
|
67
|
-
// ─── VIEW / RELATED_VIEW navigate behaviour ──────────────────────────────────
|
|
68
|
-
/** How navigating from a row/document in this VIEW or RELATED_VIEW should open
|
|
69
|
-
* its target: a full page navigation, or an overlay on top of the current page. */
|
|
70
|
-
exports.ClientLayoutNavigateBehaviour = void 0;
|
|
71
|
-
(function (ClientLayoutNavigateBehaviour) {
|
|
72
|
-
ClientLayoutNavigateBehaviour["PAGE"] = "PAGE";
|
|
73
|
-
ClientLayoutNavigateBehaviour["OVERLAY_PAGE"] = "OVERLAY_PAGE";
|
|
74
|
-
})(exports.ClientLayoutNavigateBehaviour || (exports.ClientLayoutNavigateBehaviour = {}));
|
|
75
|
-
/** Well-known archetype ids the client renders specially. */
|
|
76
|
-
const ARCHETYPE_DOCUMENT = 'commons.document';
|
|
3
|
+
var clientLayout = require('./client-layout-RZ3Ix-4a.js');
|
|
4
|
+
|
|
5
|
+
/** Pure classification logic for deciding whether a file can be shown inline. */
|
|
6
|
+
const IMAGE_EXTENSIONS = new Set(['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg', 'bmp']);
|
|
7
|
+
function extensionOf(fileName) {
|
|
8
|
+
if (!fileName)
|
|
9
|
+
return null;
|
|
10
|
+
const match = /\.([a-z0-9]+)$/i.exec(fileName);
|
|
11
|
+
return match ? match[1].toLowerCase() : null;
|
|
12
|
+
}
|
|
77
13
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
14
|
+
* Decide how a file could be rendered given its declared mime type and/or file
|
|
15
|
+
* name. A declared mime type is authoritative when present (a mismatched file
|
|
16
|
+
* name extension is ignored); the file name extension is only consulted as a
|
|
17
|
+
* fallback when no mime type is known.
|
|
81
18
|
*/
|
|
82
|
-
function
|
|
83
|
-
|
|
19
|
+
function detectPreviewKind(mimeType, fileName) {
|
|
20
|
+
const mime = (mimeType !== null && mimeType !== void 0 ? mimeType : '').toLowerCase().trim();
|
|
21
|
+
if (mime) {
|
|
22
|
+
if (mime === 'application/pdf')
|
|
23
|
+
return 'pdf';
|
|
24
|
+
if (mime.startsWith('image/'))
|
|
25
|
+
return 'image';
|
|
26
|
+
return 'unsupported';
|
|
27
|
+
}
|
|
28
|
+
const ext = extensionOf(fileName);
|
|
29
|
+
if (ext === 'pdf')
|
|
30
|
+
return 'pdf';
|
|
31
|
+
if (ext && IMAGE_EXTENSIONS.has(ext))
|
|
32
|
+
return 'image';
|
|
33
|
+
return 'unsupported';
|
|
84
34
|
}
|
|
85
35
|
|
|
86
|
-
exports.ARCHETYPE_DOCUMENT = ARCHETYPE_DOCUMENT;
|
|
87
|
-
exports
|
|
36
|
+
exports.ARCHETYPE_DOCUMENT = clientLayout.ARCHETYPE_DOCUMENT;
|
|
37
|
+
Object.defineProperty(exports, "ClientLayoutItemFieldDataType", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return clientLayout.ClientLayoutItemFieldDataType; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "ClientLayoutItemRelationDisplayType", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return clientLayout.ClientLayoutItemRelationDisplayType; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "ClientLayoutItemRelationEditBehavior", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return clientLayout.ClientLayoutItemRelationEditBehavior; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "ClientLayoutItemType", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return clientLayout.ClientLayoutItemType; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "ClientLayoutNavigateBehaviour", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return clientLayout.ClientLayoutNavigateBehaviour; }
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, "ClientLayoutType", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () { return clientLayout.ClientLayoutType; }
|
|
60
|
+
});
|
|
61
|
+
exports.resolveArchetype = clientLayout.resolveArchetype;
|
|
62
|
+
exports.detectPreviewKind = detectPreviewKind;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DzRfoAPz.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["mrd-boolean-
|
|
9
|
+
return index.bootstrapLazy([["mrd-boolean-field_23.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"me":[16],"formValues":[32],"errors":[32],"submitted":[32],"setFieldValue":[64]},null,{"values":[{"valuesChanged":0}],"me":[{"meChanged":0}]}],[2,"mrd-layout-section",{"items":[16],"data":[16],"views":[16],"links":[16],"locale":[1],"archetypes":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"viewKey":[1,"view-key"],"height":[2],"locale":[1],"mode":[32],"canCreate":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]}],[2,"mrd-date-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-datetime-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"localValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"locale":[1],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"setFileReference":[64],"setCreatedHref":[64]}],[2,"mrd-email-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-file-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"fileName":[32],"isDragging":[32],"uploading":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-hyperlink-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"internalHref":[32],"internalName":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-image-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"previewUrl":[32],"fileName":[32],"isDragging":[32],"uploading":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-list-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"multiple":[4],"locale":[1],"listItems":[16],"error":[32],"selected":[32]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-number-field",{"name":[1],"label":[1],"value":[2],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"dataType":[1,"data-type"],"decimalPrecision":[2,"decimal-precision"],"displayValue":[32],"error":[32]}],[2,"mrd-relation-field",{"name":[1],"label":[1],"required":[4],"disabled":[4],"locale":[1],"relatedClass":[1,"related-class"],"mostSignificantClass":[1,"most-significant-class"],"displayType":[1,"display-type"],"editBehavior":[1,"edit-behavior"],"commonRelation":[1,"common-relation"],"multiple":[4],"dropdownValues":[16],"value":[1],"searchQuery":[32],"searchResults":[32],"allRecords":[32],"isLoading":[32],"selectedItems":[32],"showResults":[32],"error":[32],"highlightedIndex":[32],"setAllRecords":[64],"setSearchResults":[64],"setLoading":[64]},null,{"allRecords":[{"allRecordsChanged":0}],"value":[{"valueChanged":0}]}],[2,"mrd-secret-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-table",{"item":[16],"parentId":[1,"parent-id"],"rows":[16],"locale":[1],"totalElements":[2,"total-elements"],"pageSize":[2,"page-size"],"rowHeight":[2,"row-height"],"tableHeight":[2,"table-height"],"requestTimeoutMs":[2,"request-timeout-ms"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"sortField":[32],"sortDir":[32],"filterMode":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DzRfoAPz.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.43.
|
|
8
|
+
Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var patchBrowser = () => {
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["mrd-boolean-
|
|
22
|
+
return index.bootstrapLazy([["mrd-boolean-field_23.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"me":[16],"formValues":[32],"errors":[32],"submitted":[32],"setFieldValue":[64]},null,{"values":[{"valuesChanged":0}],"me":[{"meChanged":0}]}],[2,"mrd-layout-section",{"items":[16],"data":[16],"views":[16],"links":[16],"locale":[1],"archetypes":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"viewKey":[1,"view-key"],"height":[2],"locale":[1],"mode":[32],"canCreate":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]}],[2,"mrd-date-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-datetime-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"localValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"locale":[1],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"setFileReference":[64],"setCreatedHref":[64]}],[2,"mrd-email-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-file-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"fileName":[32],"isDragging":[32],"uploading":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-hyperlink-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"internalHref":[32],"internalName":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-image-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"previewUrl":[32],"fileName":[32],"isDragging":[32],"uploading":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-list-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"multiple":[4],"locale":[1],"listItems":[16],"error":[32],"selected":[32]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-number-field",{"name":[1],"label":[1],"value":[2],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"dataType":[1,"data-type"],"decimalPrecision":[2,"decimal-precision"],"displayValue":[32],"error":[32]}],[2,"mrd-relation-field",{"name":[1],"label":[1],"required":[4],"disabled":[4],"locale":[1],"relatedClass":[1,"related-class"],"mostSignificantClass":[1,"most-significant-class"],"displayType":[1,"display-type"],"editBehavior":[1,"edit-behavior"],"commonRelation":[1,"common-relation"],"multiple":[4],"dropdownValues":[16],"value":[1],"searchQuery":[32],"searchResults":[32],"allRecords":[32],"isLoading":[32],"selectedItems":[32],"showResults":[32],"error":[32],"highlightedIndex":[32],"setAllRecords":[64],"setSearchResults":[64],"setLoading":[64]},null,{"allRecords":[{"allRecordsChanged":0}],"value":[{"valueChanged":0}]}],[2,"mrd-secret-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-table",{"item":[16],"parentId":[1,"parent-id"],"rows":[16],"locale":[1],"totalElements":[2,"total-elements"],"pageSize":[2,"page-size"],"rowHeight":[2,"row-height"],"tableHeight":[2,"table-height"],"requestTimeoutMs":[2,"request-timeout-ms"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"sortField":[32],"sortDir":[32],"filterMode":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|