@mmlogic/components 0.5.17 → 0.5.18
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/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/mrd-boolean-field_28.cjs.entry.js +98 -13
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +77 -11
- package/dist/collection/components/table/mrd-table/mrd-table.js +94 -8
- package/dist/collection/dev/api.js +3 -1
- package/dist/collection/dev/app.js +42 -3
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/mrd-boolean-field_28.entry.js +98 -13
- package/dist/mosterdcomponents/cell-renderer-CMUxFREW.js.map +1 -0
- package/dist/mosterdcomponents/client-layout-BJkVeSq6.js.map +1 -0
- package/dist/mosterdcomponents/document-attachments-BufPmMRv.js.map +1 -0
- package/dist/mosterdcomponents/field-helpers-BWAp5fD8.js.map +1 -0
- package/dist/mosterdcomponents/file-upload-common-DDWuC9-3.js.map +1 -0
- package/dist/mosterdcomponents/format-gcecItcD.js.map +1 -0
- package/dist/mosterdcomponents/i18n-OzbszktW.js.map +1 -0
- package/dist/mosterdcomponents/index-1ayBojyN.js.map +1 -0
- package/dist/mosterdcomponents/index-CkcFwdPc.js.map +1 -0
- package/dist/mosterdcomponents/index.esm.js.map +1 -0
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +1 -0
- package/dist/mosterdcomponents/p-29d6dcbc.entry.js +3 -0
- package/dist/mosterdcomponents/purify.es-_duHfPgC.js.map +1 -0
- package/dist/mosterdcomponents/query-params-3TXd5CUO.js.map +1 -0
- package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +1 -0
- package/dist/mosterdcomponents/table-query-DJq1uKqJ.js.map +1 -0
- package/dist/mosterdcomponents/validation-B_0Lx9DE.js.map +1 -0
- package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +24 -2
- package/dist/types/components/table/mrd-table/mrd-table.d.ts +33 -3
- package/dist/types/components.d.ts +34 -4
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-f72668e9.entry.js +0 -3
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
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-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_28.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"showDelete":[4,"show-delete"],"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],"readOnly":[4,"read-only"],"me":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"canCreateMap":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewCanCreate":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}],"items":[{"itemsChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32],"multiValues":[32],"multiError":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-memo-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"containerRelated":[4,"container-related"],"showContainerLink":[4,"show-container-link"],"viewKey":[1,"view-key"],"locale":[1],"labelsListItems":[16],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"me":[16],"mode":[32],"dialogOpen":[32],"editingHref":[32],"dialogBody":[32],"dialogTitle":[32],"dialogLabels":[32],"dialogImportant":[32],"dialogTouched":[32],"deleteConfirmOpen":[32],"refresh":[64]},null,{"dialogOpen":[{"dialogOpenChanged":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],"readOnly":[4,"read-only"],"mayCreate":[4,"may-create"],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-memo-view",{"archetype":[16],"data":[16],"locale":[1],"labelsListItems":[16]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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],"readOnly":[4,"read-only"],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[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"],"multiple":[4],"entries":[32],"isDragging":[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"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-memo-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"pageSize":[2,"page-size"],"locale":[1],"readOnly":[4,"read-only"],"labelsListItems":[16],"showContainerLink":[4,"show-container-link"],"rows":[32],"loading":[32],"exhausted":[32],"started":[32],"expandedHrefs":[32],"init":[64],"setPage":[64],"patchRow":[64],"removeRow":[64]}],[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]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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-time-field",{"name":[1],"label":[1],"value":[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"],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"searchOpen":[32],"searchQuery":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"selfCanCreate":[32],"init":[64],"setPage":[64],"setAggregations":[64],"setCanCreate":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}],"parentId":[{"parentIdChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[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-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],"autofocus":[4],"error":[32],"editorReady":[32]},null,{"value":[{"valueChanged":0}]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["mrd-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_28.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"showDelete":[4,"show-delete"],"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],"readOnly":[4,"read-only"],"accessControlEnabled":[4,"access-control-enabled"],"me":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"canCreateMap":[32],"allowedTypesMap":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewCanCreate":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}],"items":[{"itemsChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32],"multiValues":[32],"multiError":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-memo-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"containerRelated":[4,"container-related"],"showContainerLink":[4,"show-container-link"],"viewKey":[1,"view-key"],"locale":[1],"labelsListItems":[16],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"me":[16],"mode":[32],"dialogOpen":[32],"editingHref":[32],"dialogBody":[32],"dialogTitle":[32],"dialogLabels":[32],"dialogImportant":[32],"dialogTouched":[32],"deleteConfirmOpen":[32],"refresh":[64]},null,{"dialogOpen":[{"dialogOpenChanged":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],"readOnly":[4,"read-only"],"mayCreate":[4,"may-create"],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-memo-view",{"archetype":[16],"data":[16],"locale":[1],"labelsListItems":[16]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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],"readOnly":[4,"read-only"],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[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"],"multiple":[4],"entries":[32],"isDragging":[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"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-memo-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"pageSize":[2,"page-size"],"locale":[1],"readOnly":[4,"read-only"],"labelsListItems":[16],"showContainerLink":[4,"show-container-link"],"rows":[32],"loading":[32],"exhausted":[32],"started":[32],"expandedHrefs":[32],"init":[64],"setPage":[64],"patchRow":[64],"removeRow":[64]}],[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]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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-time-field",{"name":[1],"label":[1],"value":[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"],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"allowedTypes":[16],"accessControlEnabled":[4,"access-control-enabled"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"searchOpen":[32],"searchQuery":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"selfCanCreate":[32],"selfAllowedTypes":[32],"init":[64],"setPage":[64],"setAggregations":[64],"setCanCreate":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}],"parentId":[{"parentIdChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[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-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],"autofocus":[4],"error":[32],"editorReady":[32]},null,{"value":[{"valueChanged":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["mrd-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_28.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"showDelete":[4,"show-delete"],"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],"readOnly":[4,"read-only"],"me":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"canCreateMap":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewCanCreate":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}],"items":[{"itemsChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32],"multiValues":[32],"multiError":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-memo-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"containerRelated":[4,"container-related"],"showContainerLink":[4,"show-container-link"],"viewKey":[1,"view-key"],"locale":[1],"labelsListItems":[16],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"me":[16],"mode":[32],"dialogOpen":[32],"editingHref":[32],"dialogBody":[32],"dialogTitle":[32],"dialogLabels":[32],"dialogImportant":[32],"dialogTouched":[32],"deleteConfirmOpen":[32],"refresh":[64]},null,{"dialogOpen":[{"dialogOpenChanged":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],"readOnly":[4,"read-only"],"mayCreate":[4,"may-create"],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-memo-view",{"archetype":[16],"data":[16],"locale":[1],"labelsListItems":[16]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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],"readOnly":[4,"read-only"],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[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"],"multiple":[4],"entries":[32],"isDragging":[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"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-memo-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"pageSize":[2,"page-size"],"locale":[1],"readOnly":[4,"read-only"],"labelsListItems":[16],"showContainerLink":[4,"show-container-link"],"rows":[32],"loading":[32],"exhausted":[32],"started":[32],"expandedHrefs":[32],"init":[64],"setPage":[64],"patchRow":[64],"removeRow":[64]}],[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]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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-time-field",{"name":[1],"label":[1],"value":[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"],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"searchOpen":[32],"searchQuery":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"selfCanCreate":[32],"init":[64],"setPage":[64],"setAggregations":[64],"setCanCreate":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}],"parentId":[{"parentIdChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[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-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],"autofocus":[4],"error":[32],"editorReady":[32]},null,{"value":[{"valueChanged":0}]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["mrd-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_28.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"showDelete":[4,"show-delete"],"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],"readOnly":[4,"read-only"],"accessControlEnabled":[4,"access-control-enabled"],"me":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"canCreateMap":[32],"allowedTypesMap":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewCanCreate":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}],"items":[{"itemsChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32],"multiValues":[32],"multiError":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-memo-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"containerRelated":[4,"container-related"],"showContainerLink":[4,"show-container-link"],"viewKey":[1,"view-key"],"locale":[1],"labelsListItems":[16],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"me":[16],"mode":[32],"dialogOpen":[32],"editingHref":[32],"dialogBody":[32],"dialogTitle":[32],"dialogLabels":[32],"dialogImportant":[32],"dialogTouched":[32],"deleteConfirmOpen":[32],"refresh":[64]},null,{"dialogOpen":[{"dialogOpenChanged":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],"readOnly":[4,"read-only"],"mayCreate":[4,"may-create"],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-memo-view",{"archetype":[16],"data":[16],"locale":[1],"labelsListItems":[16]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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],"readOnly":[4,"read-only"],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[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"],"multiple":[4],"entries":[32],"isDragging":[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"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-memo-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"pageSize":[2,"page-size"],"locale":[1],"readOnly":[4,"read-only"],"labelsListItems":[16],"showContainerLink":[4,"show-container-link"],"rows":[32],"loading":[32],"exhausted":[32],"started":[32],"expandedHrefs":[32],"init":[64],"setPage":[64],"patchRow":[64],"removeRow":[64]}],[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]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[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-time-field",{"name":[1],"label":[1],"value":[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"],"readOnly":[4,"read-only"],"canCreate":[4,"can-create"],"allowedTypes":[16],"accessControlEnabled":[4,"access-control-enabled"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"searchOpen":[32],"searchQuery":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"selfCanCreate":[32],"selfAllowedTypes":[32],"init":[64],"setPage":[64],"setAggregations":[64],"setCanCreate":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}],"parentId":[{"parentIdChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[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-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],"autofocus":[4],"error":[32],"editorReady":[32]},null,{"value":[{"valueChanged":0}]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -5471,6 +5471,12 @@ const MrdLayoutSection = class {
|
|
|
5471
5471
|
* create ("+") action and the documents view's New folder / Upload are disabled
|
|
5472
5472
|
* with a tooltip explaining why, so it's clear at a glance the user can't mutate data. */
|
|
5473
5473
|
this.readOnly = false;
|
|
5474
|
+
/** When false, skips the mrdViewCheckCapabilities round trip for every VIEW/RELATED_VIEW
|
|
5475
|
+
* binding and hands mrd-table/mrd-memo-container/mrd-document-container their create
|
|
5476
|
+
* affordance as allowed immediately — for a tenant with no access control configured,
|
|
5477
|
+
* the answer would always be mayCreate: true anyway (FINDING-0171 / TASK-0322). Default
|
|
5478
|
+
* `true` keeps today's ask-and-hide behaviour unchanged. */
|
|
5479
|
+
this.accessControlEnabled = true;
|
|
5474
5480
|
/** The active account's linked person record (userProfile.links.person), if any.
|
|
5475
5481
|
* Threaded to mrd-memo-container so a top-level memo VIEW (no parent record to
|
|
5476
5482
|
* attach a new memo to) can still offer "New memo" by falling back to the
|
|
@@ -5487,6 +5493,12 @@ const MrdLayoutSection = class {
|
|
|
5487
5493
|
* means "not answered yet" and is treated as false (hidden), same default as mrd-table's
|
|
5488
5494
|
* own standalone behaviour (TASK-0299). */
|
|
5489
5495
|
this.canCreateMap = {};
|
|
5496
|
+
/** Companion to canCreateMap — concrete types the mrdViewCheckCapabilities answer allows,
|
|
5497
|
+
* when the API reports them; passed to mrd-table's `allowedTypes` prop to narrow its
|
|
5498
|
+
* create-type picker down to types a create POST would actually accept (FINDING-0176 /
|
|
5499
|
+
* TASK-0314). A missing entry means "not answered yet / not reported" — mrd-table then
|
|
5500
|
+
* leaves `item.createTypes` unfiltered, same as before this existed. */
|
|
5501
|
+
this.allowedTypesMap = {};
|
|
5490
5502
|
this.historyClickOutside = null;
|
|
5491
5503
|
/** Signature last asked per view key (see emitCapabilitiesChecks()) — avoids re-emitting
|
|
5492
5504
|
* mrdViewCheckCapabilities on every data/items update when the binding hasn't changed. */
|
|
@@ -5591,6 +5603,8 @@ const MrdLayoutSection = class {
|
|
|
5591
5603
|
* change re-asks and hides again, without re-asking on every unrelated data/items update. */
|
|
5592
5604
|
emitCapabilitiesChecks() {
|
|
5593
5605
|
var _a, _b, _c, _d;
|
|
5606
|
+
if (!this.accessControlEnabled)
|
|
5607
|
+
return;
|
|
5594
5608
|
const parentId = this.computeParentId();
|
|
5595
5609
|
for (const item of flattenItems(this.items)) {
|
|
5596
5610
|
if (item.type !== clientLayout.ClientLayoutItemType.VIEW && item.type !== clientLayout.ClientLayoutItemType.RELATED_VIEW)
|
|
@@ -5603,6 +5617,16 @@ const MrdLayoutSection = class {
|
|
|
5603
5617
|
const refType = isRelatedView ? ((_c = item.fromClass) !== null && _c !== void 0 ? _c : '') : undefined;
|
|
5604
5618
|
const refId = isRelatedView ? parentId : undefined;
|
|
5605
5619
|
const filterClass = (_d = item.filterClass) !== null && _d !== void 0 ? _d : undefined;
|
|
5620
|
+
// A host binding `items` and `data` as separate properties (e.g. Angular's
|
|
5621
|
+
// `[items]="…" [data]="…"` on <mrd-layout-section>) can apply them in either
|
|
5622
|
+
// order — itemsChanged() can fire while `data` still holds its default `{}`,
|
|
5623
|
+
// before the real record (and its self href) has landed. Asking here would
|
|
5624
|
+
// emit refId: '' for a RELATED_VIEW, which a host's `refType && refId` check
|
|
5625
|
+
// reads as "no parent" and answers via the plain, unscoped capabilities route
|
|
5626
|
+
// instead of the parent-scoped one (FINDING-0175 / TASK-0316). Skip without
|
|
5627
|
+
// marking capabilitiesAsked, so the real ask fires once dataChanged() lands.
|
|
5628
|
+
if (isRelatedView && !refId)
|
|
5629
|
+
continue;
|
|
5606
5630
|
const signature = JSON.stringify([type, refType, refId, filterClass]);
|
|
5607
5631
|
if (this.capabilitiesAsked.get(key) === signature)
|
|
5608
5632
|
continue;
|
|
@@ -5612,6 +5636,11 @@ const MrdLayoutSection = class {
|
|
|
5612
5636
|
delete next[key];
|
|
5613
5637
|
this.canCreateMap = next;
|
|
5614
5638
|
}
|
|
5639
|
+
if (key in this.allowedTypesMap) {
|
|
5640
|
+
const next = Object.assign({}, this.allowedTypesMap);
|
|
5641
|
+
delete next[key];
|
|
5642
|
+
this.allowedTypesMap = next;
|
|
5643
|
+
}
|
|
5615
5644
|
this.mrdViewCheckCapabilities.emit(Object.assign(Object.assign({ name: key, type }, (refType !== undefined ? { refType, refId } : {})), (filterClass ? { filterClass } : {})));
|
|
5616
5645
|
}
|
|
5617
5646
|
}
|
|
@@ -5661,8 +5690,22 @@ const MrdLayoutSection = class {
|
|
|
5661
5690
|
* canCreateMap and passed down as a plain prop to whichever body is mounted for that key
|
|
5662
5691
|
* (mrd-table, mrd-memo-container or mrd-document-container) — no DOM lookup needed, unlike
|
|
5663
5692
|
* setViewPage/setViewAggregations, since the prop flows through the next render. */
|
|
5664
|
-
async setViewCanCreate(name, value) {
|
|
5693
|
+
async setViewCanCreate(name, value, allowedTypes) {
|
|
5665
5694
|
this.canCreateMap = Object.assign(Object.assign({}, this.canCreateMap), { [name]: value });
|
|
5695
|
+
this.allowedTypesMap = Object.assign(Object.assign({}, this.allowedTypesMap), { [name]: allowedTypes });
|
|
5696
|
+
}
|
|
5697
|
+
/** `canCreateMap[key]` when access control is configured (default); always allowed
|
|
5698
|
+
* when `accessControlEnabled` is false, since emitCapabilitiesChecks() never asked
|
|
5699
|
+
* and canCreateMap[key] would otherwise stay permanently unanswered. */
|
|
5700
|
+
effectiveCanCreate(key) {
|
|
5701
|
+
var _a;
|
|
5702
|
+
return this.accessControlEnabled ? ((_a = this.canCreateMap[key]) !== null && _a !== void 0 ? _a : false) : true;
|
|
5703
|
+
}
|
|
5704
|
+
/** `allowedTypesMap[key]` when access control is configured; `undefined` (don't filter)
|
|
5705
|
+
* when disabled, since emitCapabilitiesChecks() never asked and the map entry would
|
|
5706
|
+
* otherwise stay permanently unanswered — see effectiveCanCreate(). */
|
|
5707
|
+
effectiveAllowedTypes(key) {
|
|
5708
|
+
return this.accessControlEnabled ? this.allowedTypesMap[key] : undefined;
|
|
5666
5709
|
}
|
|
5667
5710
|
/** Inject distinct values into an embedded mrd-document-list for a document view. */
|
|
5668
5711
|
async setViewDistinct(name, nodeId, values) {
|
|
@@ -5787,8 +5830,7 @@ const MrdLayoutSection = class {
|
|
|
5787
5830
|
* swaps between the folder tree and the flat table. Events are re-emitted to
|
|
5788
5831
|
* the host with the view key, exactly as the raw list/table events were. */
|
|
5789
5832
|
renderDocumentContainer(item, key, parentId, archetype, containerHref) {
|
|
5790
|
-
|
|
5791
|
-
return (index.h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, viewKey: key, locale: this.locale, readOnly: this.readOnly, mayCreate: (_a = this.canCreateMap[key]) !== null && _a !== void 0 ? _a : false, onMrdLoadDistinct: (e) => {
|
|
5833
|
+
return (index.h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, viewKey: key, locale: this.locale, readOnly: this.readOnly, mayCreate: this.effectiveCanCreate(key), onMrdLoadDistinct: (e) => {
|
|
5792
5834
|
e.stopPropagation();
|
|
5793
5835
|
this.mrdLoadViewDistinct.emit(Object.assign({ name: key }, e.detail));
|
|
5794
5836
|
}, onMrdLoadPage: (e) => {
|
|
@@ -5823,9 +5865,9 @@ const MrdLayoutSection = class {
|
|
|
5823
5865
|
/** Memo collection view: owns the view-switch + "New memo" and swaps between
|
|
5824
5866
|
* the card list and the flat table, mirroring renderDocumentContainer(). */
|
|
5825
5867
|
renderMemoContainer(item, key, parentId, archetype, containerHref, containerRelated, showContainerLink) {
|
|
5826
|
-
var _a, _b, _c, _d
|
|
5868
|
+
var _a, _b, _c, _d;
|
|
5827
5869
|
const labelsListItems = (_d = (_c = (_b = (_a = item.view) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b.find(v => { var _a; return v.name === ((_a = archetype.slots) === null || _a === void 0 ? void 0 : _a.labels); })) === null || _c === void 0 ? void 0 : _c.listItems) !== null && _d !== void 0 ? _d : null;
|
|
5828
|
-
return (index.h("mrd-memo-container", { "data-view": key, item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, containerRelated: containerRelated, showContainerLink: showContainerLink, viewKey: key, locale: this.locale, readOnly: this.readOnly, canCreate:
|
|
5870
|
+
return (index.h("mrd-memo-container", { "data-view": key, item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, containerRelated: containerRelated, showContainerLink: showContainerLink, viewKey: key, locale: this.locale, readOnly: this.readOnly, canCreate: this.effectiveCanCreate(key), me: this.me, labelsListItems: labelsListItems, onMrdNavigate: (e) => {
|
|
5829
5871
|
var _a;
|
|
5830
5872
|
e.stopPropagation();
|
|
5831
5873
|
this.mrdNavigate.emit(Object.assign(Object.assign({}, e.detail), { navigateBehaviour: (_a = item.navigateBehaviour) !== null && _a !== void 0 ? _a : clientLayout.ClientLayoutNavigateBehaviour.PAGE }));
|
|
@@ -5852,8 +5894,7 @@ const MrdLayoutSection = class {
|
|
|
5852
5894
|
} }));
|
|
5853
5895
|
}
|
|
5854
5896
|
renderTable(item, key, parentId) {
|
|
5855
|
-
|
|
5856
|
-
return (index.h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, readOnly: this.readOnly, canCreate: (_a = this.canCreateMap[key]) !== null && _a !== void 0 ? _a : false, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
|
|
5897
|
+
return (index.h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, readOnly: this.readOnly, canCreate: this.effectiveCanCreate(key), allowedTypes: this.effectiveAllowedTypes(key), accessControlEnabled: this.accessControlEnabled, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
|
|
5857
5898
|
var _a;
|
|
5858
5899
|
e.stopPropagation();
|
|
5859
5900
|
this.mrdLoadViewAggregations.emit(Object.assign({ name: key, dataClass: (_a = item.dataClass) !== null && _a !== void 0 ? _a : key }, e.detail));
|
|
@@ -5991,7 +6032,7 @@ const MrdLayoutSection = class {
|
|
|
5991
6032
|
const emailArchetype = !docArchetype && !invoiceArchetype ? clientLayout.resolveArchetype(this.archetypes, clientLayout.ARCHETYPE_EMAIL) : undefined;
|
|
5992
6033
|
const memoArchetype = !docArchetype && !invoiceArchetype && !emailArchetype ? clientLayout.resolveArchetype(this.archetypes, clientLayout.ARCHETYPE_MEMO) : undefined;
|
|
5993
6034
|
const anyArchetype = docArchetype || invoiceArchetype || emailArchetype || memoArchetype;
|
|
5994
|
-
return (index.h(index.Host, { key: '
|
|
6035
|
+
return (index.h(index.Host, { key: '97351c57865614662e888b3c0278a61d866a74e1' }, index.h("div", { key: '43e8f0fda8fcd3300b879d05ac692ce331c896d5', class: "mrd-layout-section" }, docArchetype && this.renderDocumentObject(docArchetype), invoiceArchetype && this.renderInvoiceObject(invoiceArchetype), emailArchetype && this.renderEmailObject(emailArchetype), memoArchetype && this.renderMemoObject(memoArchetype), !anyArchetype && this.items.map((item, i) => this.renderItem(item, this.items, i))), this.renderImageModal()));
|
|
5995
6036
|
}
|
|
5996
6037
|
get el() { return index.getElement(this); }
|
|
5997
6038
|
static get watchers() { return {
|
|
@@ -7657,6 +7698,12 @@ const MrdTable = class {
|
|
|
7657
7698
|
* explaining why) so a viewer-role user can see at a glance that this dashboard
|
|
7658
7699
|
* is read-only. Sorting, filtering and export stay available — those don't mutate data. */
|
|
7659
7700
|
this.readOnly = false;
|
|
7701
|
+
/** When false, skips the standalone mrdCheckCapabilities round trip entirely and renders
|
|
7702
|
+
* the create action immediately as allowed — for a tenant that has no access control
|
|
7703
|
+
* configured, the answer would always be true anyway (FINDING-0171 / TASK-0322). Ignored
|
|
7704
|
+
* while `canCreate` is set explicitly (the host already controls the answer directly in
|
|
7705
|
+
* that mode). Default `true` keeps today's ask-and-hide behaviour unchanged. */
|
|
7706
|
+
this.accessControlEnabled = true;
|
|
7660
7707
|
// ── Internal state ─────────────────────────────────────────────────────────
|
|
7661
7708
|
/** Index into allViews[] for the currently displayed view. 0 = primary, 1+ = alternatives. */
|
|
7662
7709
|
this.activeViewIdx = 0;
|
|
@@ -7705,6 +7752,9 @@ const MrdTable = class {
|
|
|
7705
7752
|
* hidden (TASK-0299) until the host answers mrdCheckCapabilities via setCanCreate(). Ignored
|
|
7706
7753
|
* when the host controls `canCreate` directly; see effectiveCanCreate(). */
|
|
7707
7754
|
this.selfCanCreate = false;
|
|
7755
|
+
/** Self-asked companion to selfCanCreate — the concrete types setCanCreate() reported allowed,
|
|
7756
|
+
* or `undefined` while unanswered / when the host's mrdCheckCapabilities answer omitted it. */
|
|
7757
|
+
this.selfAllowedTypes = undefined;
|
|
7708
7758
|
this.handleScroll = (e) => {
|
|
7709
7759
|
const scroller = e.currentTarget;
|
|
7710
7760
|
const { renderStart, renderEnd } = computeWindow(scroller.scrollTop, this.rowHeight, this.tableHeight, this.baseTotal);
|
|
@@ -7878,8 +7928,9 @@ const MrdTable = class {
|
|
|
7878
7928
|
* prop is set, since the host controls it directly in that mode). Call it any time after
|
|
7879
7929
|
* the event fires; a stale answer for an old binding is discarded automatically
|
|
7880
7930
|
* (selfCanCreate is reset to false before every new mrdCheckCapabilities emission). */
|
|
7881
|
-
async setCanCreate(value) {
|
|
7931
|
+
async setCanCreate(value, allowedTypes) {
|
|
7882
7932
|
this.selfCanCreate = value;
|
|
7933
|
+
this.selfAllowedTypes = allowedTypes;
|
|
7883
7934
|
}
|
|
7884
7935
|
// ── Lifecycle ──────────────────────────────────────────────────────────────
|
|
7885
7936
|
disconnectedCallback() {
|
|
@@ -8249,11 +8300,22 @@ const MrdTable = class {
|
|
|
8249
8300
|
var _a, _b;
|
|
8250
8301
|
if (this.canCreate !== undefined)
|
|
8251
8302
|
return;
|
|
8303
|
+
if (!this.accessControlEnabled)
|
|
8304
|
+
return;
|
|
8252
8305
|
this.selfCanCreate = false;
|
|
8306
|
+
this.selfAllowedTypes = undefined;
|
|
8253
8307
|
const v = this.allViews[this.activeViewIdx];
|
|
8254
8308
|
if (!(v === null || v === void 0 ? void 0 : v.dataClass))
|
|
8255
8309
|
return;
|
|
8256
8310
|
const isRelatedView = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.type) === 'RELATED_VIEW';
|
|
8311
|
+
// A host binding `item` and `parentId` as separate properties (e.g. Angular) can apply
|
|
8312
|
+
// them in either order — this can run while `parentId` still holds its default `''`,
|
|
8313
|
+
// before the real parent record has landed. Asking here would emit refId: '' for a
|
|
8314
|
+
// RELATED_VIEW, which a host's `refType && refId` check reads as "no parent" and answers
|
|
8315
|
+
// via the plain, unscoped capabilities route instead of the parent-scoped one
|
|
8316
|
+
// (FINDING-0175 / TASK-0316). Skip; parentIdChanged() re-asks once it lands.
|
|
8317
|
+
if (isRelatedView && !this.parentId)
|
|
8318
|
+
return;
|
|
8257
8319
|
this.mrdCheckCapabilities.emit(Object.assign(Object.assign({ type: v.dataClass }, (isRelatedView ? { refType: (_b = v.fromClass) !== null && _b !== void 0 ? _b : '', refId: this.parentId } : {})), (v.filterClass ? { filterClass: v.filterClass } : {})));
|
|
8258
8320
|
}
|
|
8259
8321
|
/** Build query params for a page request from current sort, view filters, filterClass and active column filters.
|
|
@@ -8290,9 +8352,33 @@ const MrdTable = class {
|
|
|
8290
8352
|
var _a, _b, _c;
|
|
8291
8353
|
return ((_c = (_b = (_a = this.allViews[this.activeViewIdx]) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.values) !== null && _c !== void 0 ? _c : []);
|
|
8292
8354
|
}
|
|
8293
|
-
/** `canCreate` when the host controls it directly
|
|
8355
|
+
/** `canCreate` when the host controls it directly; else, when access control is disabled,
|
|
8356
|
+
* always allowed; else the table's own self-asked answer. */
|
|
8294
8357
|
get effectiveCanCreate() {
|
|
8295
|
-
|
|
8358
|
+
if (this.canCreate !== undefined)
|
|
8359
|
+
return this.canCreate;
|
|
8360
|
+
if (!this.accessControlEnabled)
|
|
8361
|
+
return true;
|
|
8362
|
+
return this.selfCanCreate;
|
|
8363
|
+
}
|
|
8364
|
+
/** `allowedTypes` when the host controls it directly, else the table's own self-asked
|
|
8365
|
+
* answer. `undefined` means "unknown — don't filter", not "nothing allowed". */
|
|
8366
|
+
get effectiveAllowedTypes() {
|
|
8367
|
+
if (this.allowedTypes !== undefined)
|
|
8368
|
+
return this.allowedTypes;
|
|
8369
|
+
return this.selfAllowedTypes;
|
|
8370
|
+
}
|
|
8371
|
+
/** `item.createTypes` intersected with effectiveAllowedTypes when that is known, so the
|
|
8372
|
+
* create-type picker only offers concrete types a create POST would actually accept
|
|
8373
|
+
* (FINDING-0176 / TASK-0314). Unfiltered when the answer isn't known (undefined) — an
|
|
8374
|
+
* older host/API that never reports allowedTypes keeps today's unfiltered behaviour. */
|
|
8375
|
+
get effectiveCreateTypes() {
|
|
8376
|
+
var _a;
|
|
8377
|
+
const all = (_a = this.item) === null || _a === void 0 ? void 0 : _a.createTypes;
|
|
8378
|
+
const allowed = this.effectiveAllowedTypes;
|
|
8379
|
+
if (!all || allowed == null)
|
|
8380
|
+
return all;
|
|
8381
|
+
return all.filter(ct => allowed.includes(ct.type));
|
|
8296
8382
|
}
|
|
8297
8383
|
get tableActions() {
|
|
8298
8384
|
var _a, _b;
|
|
@@ -8730,8 +8816,7 @@ const MrdTable = class {
|
|
|
8730
8816
|
}
|
|
8731
8817
|
// ── Render: toolbar ────────────────────────────────────────────────────────
|
|
8732
8818
|
renderToolbar() {
|
|
8733
|
-
|
|
8734
|
-
return (index.h(Toolbar, { locale: this.locale, filterCount: this.activeFilters.size, actions: this.tableActions, views: this.allViews, activeViewIdx: this.activeViewIdx, viewPopoverOpen: this.viewPopoverOpen, createPickerOpen: this.createPickerOpen, createTypes: (_a = this.item) === null || _a === void 0 ? void 0 : _a.createTypes, readOnly: this.readOnly, searchEnabled: this.searchEnabled, searchOpen: this.searchOpen, searchQuery: this.searchQuery, cb: {
|
|
8819
|
+
return (index.h(Toolbar, { locale: this.locale, filterCount: this.activeFilters.size, actions: this.tableActions, views: this.allViews, activeViewIdx: this.activeViewIdx, viewPopoverOpen: this.viewPopoverOpen, createPickerOpen: this.createPickerOpen, createTypes: this.effectiveCreateTypes, readOnly: this.readOnly, searchEnabled: this.searchEnabled, searchOpen: this.searchOpen, searchQuery: this.searchQuery, cb: {
|
|
8735
8820
|
onClearAllFilters: () => this.clearAllFilters(),
|
|
8736
8821
|
onViewSwitch: idx => this.handleViewSwitch(idx),
|
|
8737
8822
|
onToggleViewPopover: e => this.toggleViewPopover(e),
|
|
@@ -21,6 +21,12 @@ export class MrdLayoutSection {
|
|
|
21
21
|
* create ("+") action and the documents view's New folder / Upload are disabled
|
|
22
22
|
* with a tooltip explaining why, so it's clear at a glance the user can't mutate data. */
|
|
23
23
|
this.readOnly = false;
|
|
24
|
+
/** When false, skips the mrdViewCheckCapabilities round trip for every VIEW/RELATED_VIEW
|
|
25
|
+
* binding and hands mrd-table/mrd-memo-container/mrd-document-container their create
|
|
26
|
+
* affordance as allowed immediately — for a tenant with no access control configured,
|
|
27
|
+
* the answer would always be mayCreate: true anyway (FINDING-0171 / TASK-0322). Default
|
|
28
|
+
* `true` keeps today's ask-and-hide behaviour unchanged. */
|
|
29
|
+
this.accessControlEnabled = true;
|
|
24
30
|
/** The active account's linked person record (userProfile.links.person), if any.
|
|
25
31
|
* Threaded to mrd-memo-container so a top-level memo VIEW (no parent record to
|
|
26
32
|
* attach a new memo to) can still offer "New memo" by falling back to the
|
|
@@ -37,6 +43,12 @@ export class MrdLayoutSection {
|
|
|
37
43
|
* means "not answered yet" and is treated as false (hidden), same default as mrd-table's
|
|
38
44
|
* own standalone behaviour (TASK-0299). */
|
|
39
45
|
this.canCreateMap = {};
|
|
46
|
+
/** Companion to canCreateMap — concrete types the mrdViewCheckCapabilities answer allows,
|
|
47
|
+
* when the API reports them; passed to mrd-table's `allowedTypes` prop to narrow its
|
|
48
|
+
* create-type picker down to types a create POST would actually accept (FINDING-0176 /
|
|
49
|
+
* TASK-0314). A missing entry means "not answered yet / not reported" — mrd-table then
|
|
50
|
+
* leaves `item.createTypes` unfiltered, same as before this existed. */
|
|
51
|
+
this.allowedTypesMap = {};
|
|
40
52
|
this.historyClickOutside = null;
|
|
41
53
|
/** Signature last asked per view key (see emitCapabilitiesChecks()) — avoids re-emitting
|
|
42
54
|
* mrdViewCheckCapabilities on every data/items update when the binding hasn't changed. */
|
|
@@ -141,6 +153,8 @@ export class MrdLayoutSection {
|
|
|
141
153
|
* change re-asks and hides again, without re-asking on every unrelated data/items update. */
|
|
142
154
|
emitCapabilitiesChecks() {
|
|
143
155
|
var _a, _b, _c, _d;
|
|
156
|
+
if (!this.accessControlEnabled)
|
|
157
|
+
return;
|
|
144
158
|
const parentId = this.computeParentId();
|
|
145
159
|
for (const item of flattenItems(this.items)) {
|
|
146
160
|
if (item.type !== ClientLayoutItemType.VIEW && item.type !== ClientLayoutItemType.RELATED_VIEW)
|
|
@@ -153,6 +167,16 @@ export class MrdLayoutSection {
|
|
|
153
167
|
const refType = isRelatedView ? ((_c = item.fromClass) !== null && _c !== void 0 ? _c : '') : undefined;
|
|
154
168
|
const refId = isRelatedView ? parentId : undefined;
|
|
155
169
|
const filterClass = (_d = item.filterClass) !== null && _d !== void 0 ? _d : undefined;
|
|
170
|
+
// A host binding `items` and `data` as separate properties (e.g. Angular's
|
|
171
|
+
// `[items]="…" [data]="…"` on <mrd-layout-section>) can apply them in either
|
|
172
|
+
// order — itemsChanged() can fire while `data` still holds its default `{}`,
|
|
173
|
+
// before the real record (and its self href) has landed. Asking here would
|
|
174
|
+
// emit refId: '' for a RELATED_VIEW, which a host's `refType && refId` check
|
|
175
|
+
// reads as "no parent" and answers via the plain, unscoped capabilities route
|
|
176
|
+
// instead of the parent-scoped one (FINDING-0175 / TASK-0316). Skip without
|
|
177
|
+
// marking capabilitiesAsked, so the real ask fires once dataChanged() lands.
|
|
178
|
+
if (isRelatedView && !refId)
|
|
179
|
+
continue;
|
|
156
180
|
const signature = JSON.stringify([type, refType, refId, filterClass]);
|
|
157
181
|
if (this.capabilitiesAsked.get(key) === signature)
|
|
158
182
|
continue;
|
|
@@ -162,6 +186,11 @@ export class MrdLayoutSection {
|
|
|
162
186
|
delete next[key];
|
|
163
187
|
this.canCreateMap = next;
|
|
164
188
|
}
|
|
189
|
+
if (key in this.allowedTypesMap) {
|
|
190
|
+
const next = Object.assign({}, this.allowedTypesMap);
|
|
191
|
+
delete next[key];
|
|
192
|
+
this.allowedTypesMap = next;
|
|
193
|
+
}
|
|
165
194
|
this.mrdViewCheckCapabilities.emit(Object.assign(Object.assign({ name: key, type }, (refType !== undefined ? { refType, refId } : {})), (filterClass ? { filterClass } : {})));
|
|
166
195
|
}
|
|
167
196
|
}
|
|
@@ -211,8 +240,22 @@ export class MrdLayoutSection {
|
|
|
211
240
|
* canCreateMap and passed down as a plain prop to whichever body is mounted for that key
|
|
212
241
|
* (mrd-table, mrd-memo-container or mrd-document-container) — no DOM lookup needed, unlike
|
|
213
242
|
* setViewPage/setViewAggregations, since the prop flows through the next render. */
|
|
214
|
-
async setViewCanCreate(name, value) {
|
|
243
|
+
async setViewCanCreate(name, value, allowedTypes) {
|
|
215
244
|
this.canCreateMap = Object.assign(Object.assign({}, this.canCreateMap), { [name]: value });
|
|
245
|
+
this.allowedTypesMap = Object.assign(Object.assign({}, this.allowedTypesMap), { [name]: allowedTypes });
|
|
246
|
+
}
|
|
247
|
+
/** `canCreateMap[key]` when access control is configured (default); always allowed
|
|
248
|
+
* when `accessControlEnabled` is false, since emitCapabilitiesChecks() never asked
|
|
249
|
+
* and canCreateMap[key] would otherwise stay permanently unanswered. */
|
|
250
|
+
effectiveCanCreate(key) {
|
|
251
|
+
var _a;
|
|
252
|
+
return this.accessControlEnabled ? ((_a = this.canCreateMap[key]) !== null && _a !== void 0 ? _a : false) : true;
|
|
253
|
+
}
|
|
254
|
+
/** `allowedTypesMap[key]` when access control is configured; `undefined` (don't filter)
|
|
255
|
+
* when disabled, since emitCapabilitiesChecks() never asked and the map entry would
|
|
256
|
+
* otherwise stay permanently unanswered — see effectiveCanCreate(). */
|
|
257
|
+
effectiveAllowedTypes(key) {
|
|
258
|
+
return this.accessControlEnabled ? this.allowedTypesMap[key] : undefined;
|
|
216
259
|
}
|
|
217
260
|
/** Inject distinct values into an embedded mrd-document-list for a document view. */
|
|
218
261
|
async setViewDistinct(name, nodeId, values) {
|
|
@@ -337,8 +380,7 @@ export class MrdLayoutSection {
|
|
|
337
380
|
* swaps between the folder tree and the flat table. Events are re-emitted to
|
|
338
381
|
* the host with the view key, exactly as the raw list/table events were. */
|
|
339
382
|
renderDocumentContainer(item, key, parentId, archetype, containerHref) {
|
|
340
|
-
|
|
341
|
-
return (h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, viewKey: key, locale: this.locale, readOnly: this.readOnly, mayCreate: (_a = this.canCreateMap[key]) !== null && _a !== void 0 ? _a : false, onMrdLoadDistinct: (e) => {
|
|
383
|
+
return (h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, viewKey: key, locale: this.locale, readOnly: this.readOnly, mayCreate: this.effectiveCanCreate(key), onMrdLoadDistinct: (e) => {
|
|
342
384
|
e.stopPropagation();
|
|
343
385
|
this.mrdLoadViewDistinct.emit(Object.assign({ name: key }, e.detail));
|
|
344
386
|
}, onMrdLoadPage: (e) => {
|
|
@@ -373,9 +415,9 @@ export class MrdLayoutSection {
|
|
|
373
415
|
/** Memo collection view: owns the view-switch + "New memo" and swaps between
|
|
374
416
|
* the card list and the flat table, mirroring renderDocumentContainer(). */
|
|
375
417
|
renderMemoContainer(item, key, parentId, archetype, containerHref, containerRelated, showContainerLink) {
|
|
376
|
-
var _a, _b, _c, _d
|
|
418
|
+
var _a, _b, _c, _d;
|
|
377
419
|
const labelsListItems = (_d = (_c = (_b = (_a = item.view) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b.find(v => { var _a; return v.name === ((_a = archetype.slots) === null || _a === void 0 ? void 0 : _a.labels); })) === null || _c === void 0 ? void 0 : _c.listItems) !== null && _d !== void 0 ? _d : null;
|
|
378
|
-
return (h("mrd-memo-container", { "data-view": key, item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, containerRelated: containerRelated, showContainerLink: showContainerLink, viewKey: key, locale: this.locale, readOnly: this.readOnly, canCreate:
|
|
420
|
+
return (h("mrd-memo-container", { "data-view": key, item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, containerRelated: containerRelated, showContainerLink: showContainerLink, viewKey: key, locale: this.locale, readOnly: this.readOnly, canCreate: this.effectiveCanCreate(key), me: this.me, labelsListItems: labelsListItems, onMrdNavigate: (e) => {
|
|
379
421
|
var _a;
|
|
380
422
|
e.stopPropagation();
|
|
381
423
|
this.mrdNavigate.emit(Object.assign(Object.assign({}, e.detail), { navigateBehaviour: (_a = item.navigateBehaviour) !== null && _a !== void 0 ? _a : ClientLayoutNavigateBehaviour.PAGE }));
|
|
@@ -402,8 +444,7 @@ export class MrdLayoutSection {
|
|
|
402
444
|
} }));
|
|
403
445
|
}
|
|
404
446
|
renderTable(item, key, parentId) {
|
|
405
|
-
|
|
406
|
-
return (h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, readOnly: this.readOnly, canCreate: (_a = this.canCreateMap[key]) !== null && _a !== void 0 ? _a : false, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
|
|
447
|
+
return (h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, readOnly: this.readOnly, canCreate: this.effectiveCanCreate(key), allowedTypes: this.effectiveAllowedTypes(key), accessControlEnabled: this.accessControlEnabled, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
|
|
407
448
|
var _a;
|
|
408
449
|
e.stopPropagation();
|
|
409
450
|
this.mrdLoadViewAggregations.emit(Object.assign({ name: key, dataClass: (_a = item.dataClass) !== null && _a !== void 0 ? _a : key }, e.detail));
|
|
@@ -541,7 +582,7 @@ export class MrdLayoutSection {
|
|
|
541
582
|
const emailArchetype = !docArchetype && !invoiceArchetype ? resolveArchetype(this.archetypes, ARCHETYPE_EMAIL) : undefined;
|
|
542
583
|
const memoArchetype = !docArchetype && !invoiceArchetype && !emailArchetype ? resolveArchetype(this.archetypes, ARCHETYPE_MEMO) : undefined;
|
|
543
584
|
const anyArchetype = docArchetype || invoiceArchetype || emailArchetype || memoArchetype;
|
|
544
|
-
return (h(Host, { key: '
|
|
585
|
+
return (h(Host, { key: '97351c57865614662e888b3c0278a61d866a74e1' }, h("div", { key: '43e8f0fda8fcd3300b879d05ac692ce331c896d5', class: "mrd-layout-section" }, docArchetype && this.renderDocumentObject(docArchetype), invoiceArchetype && this.renderInvoiceObject(invoiceArchetype), emailArchetype && this.renderEmailObject(emailArchetype), memoArchetype && this.renderMemoObject(memoArchetype), !anyArchetype && this.items.map((item, i) => this.renderItem(item, this.items, i))), this.renderImageModal()));
|
|
545
586
|
}
|
|
546
587
|
static get is() { return "mrd-layout-section"; }
|
|
547
588
|
static get encapsulation() { return "scoped"; }
|
|
@@ -722,6 +763,26 @@ export class MrdLayoutSection {
|
|
|
722
763
|
"attribute": "read-only",
|
|
723
764
|
"defaultValue": "false"
|
|
724
765
|
},
|
|
766
|
+
"accessControlEnabled": {
|
|
767
|
+
"type": "boolean",
|
|
768
|
+
"mutable": false,
|
|
769
|
+
"complexType": {
|
|
770
|
+
"original": "boolean",
|
|
771
|
+
"resolved": "boolean",
|
|
772
|
+
"references": {}
|
|
773
|
+
},
|
|
774
|
+
"required": false,
|
|
775
|
+
"optional": false,
|
|
776
|
+
"docs": {
|
|
777
|
+
"tags": [],
|
|
778
|
+
"text": "When false, skips the mrdViewCheckCapabilities round trip for every VIEW/RELATED_VIEW\nbinding and hands mrd-table/mrd-memo-container/mrd-document-container their create\naffordance as allowed immediately \u2014 for a tenant with no access control configured,\nthe answer would always be mayCreate: true anyway (FINDING-0171 / TASK-0322). Default\n`true` keeps today's ask-and-hide behaviour unchanged."
|
|
779
|
+
},
|
|
780
|
+
"getter": false,
|
|
781
|
+
"setter": false,
|
|
782
|
+
"reflect": false,
|
|
783
|
+
"attribute": "access-control-enabled",
|
|
784
|
+
"defaultValue": "true"
|
|
785
|
+
},
|
|
725
786
|
"me": {
|
|
726
787
|
"type": "unknown",
|
|
727
788
|
"mutable": false,
|
|
@@ -756,7 +817,8 @@ export class MrdLayoutSection {
|
|
|
756
817
|
"imagePreviewUrl": {},
|
|
757
818
|
"imagePreviews": {},
|
|
758
819
|
"openHistoryField": {},
|
|
759
|
-
"canCreateMap": {}
|
|
820
|
+
"canCreateMap": {},
|
|
821
|
+
"allowedTypesMap": {}
|
|
760
822
|
};
|
|
761
823
|
}
|
|
762
824
|
static get events() {
|
|
@@ -935,7 +997,7 @@ export class MrdLayoutSection {
|
|
|
935
997
|
"composed": true,
|
|
936
998
|
"docs": {
|
|
937
999
|
"tags": [],
|
|
938
|
-
"text": "Emitted once per VIEW/RELATED_VIEW binding \u2014 computed here directly, not relayed from a\nchild (see emitCapabilitiesChecks()), so it covers mrd-table, mrd-memo-container and\nmrd-document-container uniformly. `name` is the view key (viewKeyFor(item)) \u2014 pass it\nback to setViewCanCreate() to answer it."
|
|
1000
|
+
"text": "Emitted once per VIEW/RELATED_VIEW binding \u2014 computed here directly, not relayed from a\nchild (see emitCapabilitiesChecks()), so it covers mrd-table, mrd-memo-container and\nmrd-document-container uniformly. `name` is the view key (viewKeyFor(item)) \u2014 pass it\nback to setViewCanCreate() to answer it. setViewCanCreate()'s optional third argument\nnarrows a table's `item.createTypes` picker to the concrete types the answer allows,\nwhen the API's capabilities response reports them (FINDING-0176 / TASK-0314)."
|
|
939
1001
|
},
|
|
940
1002
|
"complexType": {
|
|
941
1003
|
"original": "{ name: string; type: string; refType?: string; refId?: string; filterClass?: string }",
|
|
@@ -1136,7 +1198,7 @@ export class MrdLayoutSection {
|
|
|
1136
1198
|
},
|
|
1137
1199
|
"setViewCanCreate": {
|
|
1138
1200
|
"complexType": {
|
|
1139
|
-
"signature": "(name: string, value: boolean) => Promise<void>",
|
|
1201
|
+
"signature": "(name: string, value: boolean, allowedTypes?: string[]) => Promise<void>",
|
|
1140
1202
|
"parameters": [{
|
|
1141
1203
|
"name": "name",
|
|
1142
1204
|
"type": "string",
|
|
@@ -1145,6 +1207,10 @@ export class MrdLayoutSection {
|
|
|
1145
1207
|
"name": "value",
|
|
1146
1208
|
"type": "boolean",
|
|
1147
1209
|
"docs": ""
|
|
1210
|
+
}, {
|
|
1211
|
+
"name": "allowedTypes",
|
|
1212
|
+
"type": "string[] | undefined",
|
|
1213
|
+
"docs": ""
|
|
1148
1214
|
}],
|
|
1149
1215
|
"references": {
|
|
1150
1216
|
"Promise": {
|