@praxisui/files-upload 8.0.0-beta.11 → 8.0.0-beta.13
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/README.md +7 -0
- package/fesm2022/praxisui-files-upload.mjs +61 -31
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -290,6 +290,13 @@ and the upload `strategy`. The direct, bulk and presign paths remain fixed as
|
|
|
290
290
|
`baseUrl/upload`, `baseUrl/bulk` and `baseUrl/upload/presign?filename=...` so hosts
|
|
291
291
|
do not create parallel endpoint semantics outside `FilesApiClient`.
|
|
292
292
|
|
|
293
|
+
Every manifest operation declares its own editable target resolver, ambiguity policy,
|
|
294
|
+
preconditions, validators, affected paths, effects and typed submission impact. Upload
|
|
295
|
+
limits and accepted types are marked as submission-affecting; endpoint and security
|
|
296
|
+
policy edits are marked as remote-binding changes and require confirmation; error
|
|
297
|
+
messages are config-only; display changes are visual-only. These categories are the
|
|
298
|
+
same metadata projected into `praxis-component-registry-ingestion.json`.
|
|
299
|
+
|
|
293
300
|
## Error handling
|
|
294
301
|
|
|
295
302
|
`ErrorMapperService` translates backend error codes from `errors[0]` into user-facing messages and exposes rate limit information.
|
|
@@ -6565,18 +6565,6 @@ const FILES_UPLOAD_AI_CAPABILITIES = {
|
|
|
6565
6565
|
],
|
|
6566
6566
|
};
|
|
6567
6567
|
|
|
6568
|
-
const conflictPolicyEnum = ['ERROR', 'SKIP', 'OVERWRITE', 'MAKE_UNIQUE', 'RENAME'];
|
|
6569
|
-
const displayModeEnum = ['full', 'compact'];
|
|
6570
|
-
const strategyEnum = ['direct', 'presign', 'auto'];
|
|
6571
|
-
const endpointInputSchema = {
|
|
6572
|
-
type: 'object',
|
|
6573
|
-
required: ['baseUrl'],
|
|
6574
|
-
properties: {
|
|
6575
|
-
baseUrl: { type: 'string' },
|
|
6576
|
-
strategy: { enum: strategyEnum },
|
|
6577
|
-
allowCrossOriginPresignedTarget: { type: 'boolean' },
|
|
6578
|
-
},
|
|
6579
|
-
};
|
|
6580
6568
|
const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
6581
6569
|
schemaVersion: '1.0.0',
|
|
6582
6570
|
componentId: 'praxis-files-upload',
|
|
@@ -6588,7 +6576,7 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6588
6576
|
{ name: 'filesUploadId', type: 'string', description: 'Stable upload id used for config persistence and telemetry correlation.' },
|
|
6589
6577
|
{ name: 'componentInstanceId', type: 'string', description: 'Optional instance discriminator when the same upload id appears more than once.' },
|
|
6590
6578
|
{ name: 'baseUrl', type: 'string', description: 'Canonical files API base URL. Direct upload uses baseUrl/upload, bulk uses baseUrl/bulk and presign uses baseUrl/upload/presign.' },
|
|
6591
|
-
{ name: 'displayMode', type: "'full' | 'compact'", allowedValues:
|
|
6579
|
+
{ name: 'displayMode', type: "'full' | 'compact'", allowedValues: ['full', 'compact'], description: 'Runtime display mode input.' },
|
|
6592
6580
|
{ name: 'context', type: 'Record<string, unknown>', description: 'Host context available to metadata and event consumers.' },
|
|
6593
6581
|
{ name: 'enableCustomization', type: 'boolean', description: 'Enables the Settings Panel configuration editor.' },
|
|
6594
6582
|
],
|
|
@@ -6623,9 +6611,11 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6623
6611
|
{ kind: 'set-value', path: 'options.allowedExtensions' },
|
|
6624
6612
|
{ kind: 'set-value', path: 'options.acceptMimeTypes' },
|
|
6625
6613
|
],
|
|
6614
|
+
destructive: false,
|
|
6615
|
+
requiresConfirmation: false,
|
|
6626
6616
|
validators: ['file-type-list-explicit', 'file-type-entry-valid', 'backend-accept-options-consistent', 'editor-runtime-round-trip'],
|
|
6627
6617
|
affectedPaths: ['ui.accept', 'options.allowedExtensions', 'options.acceptMimeTypes'],
|
|
6628
|
-
submissionImpact:
|
|
6618
|
+
submissionImpact: 'affects-submission',
|
|
6629
6619
|
preconditions: ['config-initialized'],
|
|
6630
6620
|
},
|
|
6631
6621
|
{
|
|
@@ -6646,9 +6636,11 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6646
6636
|
{ kind: 'set-value', path: 'limits.maxFileSizeBytes' },
|
|
6647
6637
|
{ kind: 'set-value', path: 'options.maxUploadSizeMb' },
|
|
6648
6638
|
],
|
|
6639
|
+
destructive: false,
|
|
6640
|
+
requiresConfirmation: false,
|
|
6649
6641
|
validators: ['size-limit-numeric', 'size-limit-within-platform-policy', 'size-limit-client-backend-consistent', 'editor-runtime-round-trip'],
|
|
6650
6642
|
affectedPaths: ['limits.maxFileSizeBytes', 'options.maxUploadSizeMb'],
|
|
6651
|
-
submissionImpact:
|
|
6643
|
+
submissionImpact: 'affects-submission',
|
|
6652
6644
|
preconditions: ['config-initialized'],
|
|
6653
6645
|
},
|
|
6654
6646
|
{
|
|
@@ -6669,9 +6661,11 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6669
6661
|
{ kind: 'set-value', path: 'limits.maxFilesPerBulk' },
|
|
6670
6662
|
{ kind: 'set-value', path: 'limits.maxBulkSizeBytes' },
|
|
6671
6663
|
],
|
|
6664
|
+
destructive: false,
|
|
6665
|
+
requiresConfirmation: false,
|
|
6672
6666
|
validators: ['file-count-limit-numeric', 'bulk-size-limit-numeric', 'bulk-limit-within-platform-policy', 'editor-runtime-round-trip'],
|
|
6673
6667
|
affectedPaths: ['limits.maxFilesPerBulk', 'limits.maxBulkSizeBytes'],
|
|
6674
|
-
submissionImpact:
|
|
6668
|
+
submissionImpact: 'affects-submission',
|
|
6675
6669
|
preconditions: ['config-initialized'],
|
|
6676
6670
|
},
|
|
6677
6671
|
{
|
|
@@ -6680,15 +6674,31 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6680
6674
|
scope: 'global',
|
|
6681
6675
|
targetKind: 'presignEndpoint',
|
|
6682
6676
|
target: { kind: 'presignEndpoint', resolver: 'files-api-base-url-presign-contract', ambiguityPolicy: 'fail', required: false },
|
|
6683
|
-
inputSchema:
|
|
6677
|
+
inputSchema: {
|
|
6678
|
+
type: 'object',
|
|
6679
|
+
required: ['baseUrl'],
|
|
6680
|
+
properties: {
|
|
6681
|
+
baseUrl: { type: 'string' },
|
|
6682
|
+
strategy: { enum: ['direct', 'presign', 'auto'] },
|
|
6683
|
+
allowCrossOriginPresignedTarget: { type: 'boolean' },
|
|
6684
|
+
},
|
|
6685
|
+
},
|
|
6684
6686
|
effects: [{
|
|
6685
6687
|
kind: 'compile-domain-patch',
|
|
6686
6688
|
handler: 'files-upload-presign-base-url',
|
|
6687
6689
|
handlerContract: {
|
|
6688
|
-
reads: ['baseUrl', 'strategy'
|
|
6689
|
-
writes: ['baseUrl', '
|
|
6690
|
+
reads: ['baseUrl', 'strategy'],
|
|
6691
|
+
writes: ['baseUrl', 'strategy'],
|
|
6690
6692
|
identityKeys: ['baseUrl'],
|
|
6691
|
-
inputSchema:
|
|
6693
|
+
inputSchema: {
|
|
6694
|
+
type: 'object',
|
|
6695
|
+
required: ['baseUrl'],
|
|
6696
|
+
properties: {
|
|
6697
|
+
baseUrl: { type: 'string' },
|
|
6698
|
+
strategy: { enum: ['direct', 'presign', 'auto'] },
|
|
6699
|
+
allowCrossOriginPresignedTarget: { type: 'boolean' },
|
|
6700
|
+
},
|
|
6701
|
+
},
|
|
6692
6702
|
failureModes: ['unsafe-url', 'non-praxis-backend-surface', 'presign-path-override', 'cross-origin-presigned-fields-leak'],
|
|
6693
6703
|
description: 'Validates the files API base URL and preserves the canonical POST baseUrl/upload/presign?filename=... contract; arbitrary presign URLs are rejected.',
|
|
6694
6704
|
},
|
|
@@ -6697,7 +6707,7 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6697
6707
|
requiresConfirmation: true,
|
|
6698
6708
|
validators: ['endpoint-url-safe', 'endpoint-uses-praxis-backend-surface', 'presign-endpoint-fixed-contract', 'presign-cross-origin-fields-safe', 'security-change-confirmed'],
|
|
6699
6709
|
affectedPaths: ['baseUrl', 'strategy'],
|
|
6700
|
-
submissionImpact:
|
|
6710
|
+
submissionImpact: 'affects-remote-binding',
|
|
6701
6711
|
preconditions: ['config-initialized', 'confirmation-collected'],
|
|
6702
6712
|
},
|
|
6703
6713
|
{
|
|
@@ -6706,15 +6716,31 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6706
6716
|
scope: 'global',
|
|
6707
6717
|
targetKind: 'uploadEndpoint',
|
|
6708
6718
|
target: { kind: 'uploadEndpoint', resolver: 'files-api-base-url-upload-contract', ambiguityPolicy: 'fail', required: false },
|
|
6709
|
-
inputSchema:
|
|
6719
|
+
inputSchema: {
|
|
6720
|
+
type: 'object',
|
|
6721
|
+
required: ['baseUrl'],
|
|
6722
|
+
properties: {
|
|
6723
|
+
baseUrl: { type: 'string' },
|
|
6724
|
+
strategy: { enum: ['direct', 'presign', 'auto'] },
|
|
6725
|
+
allowCrossOriginPresignedTarget: { type: 'boolean' },
|
|
6726
|
+
},
|
|
6727
|
+
},
|
|
6710
6728
|
effects: [{
|
|
6711
6729
|
kind: 'compile-domain-patch',
|
|
6712
6730
|
handler: 'files-upload-direct-base-url',
|
|
6713
6731
|
handlerContract: {
|
|
6714
|
-
reads: ['baseUrl', 'strategy'
|
|
6715
|
-
writes: ['baseUrl', '
|
|
6732
|
+
reads: ['baseUrl', 'strategy'],
|
|
6733
|
+
writes: ['baseUrl', 'strategy'],
|
|
6716
6734
|
identityKeys: ['baseUrl'],
|
|
6717
|
-
inputSchema:
|
|
6735
|
+
inputSchema: {
|
|
6736
|
+
type: 'object',
|
|
6737
|
+
required: ['baseUrl'],
|
|
6738
|
+
properties: {
|
|
6739
|
+
baseUrl: { type: 'string' },
|
|
6740
|
+
strategy: { enum: ['direct', 'presign', 'auto'] },
|
|
6741
|
+
allowCrossOriginPresignedTarget: { type: 'boolean' },
|
|
6742
|
+
},
|
|
6743
|
+
},
|
|
6718
6744
|
failureModes: ['unsafe-url', 'non-praxis-backend-surface', 'upload-path-override', 'bulk-path-override'],
|
|
6719
6745
|
description: 'Validates the files API base URL and preserves the canonical POST baseUrl/upload and POST baseUrl/bulk contracts.',
|
|
6720
6746
|
},
|
|
@@ -6723,7 +6749,7 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6723
6749
|
requiresConfirmation: true,
|
|
6724
6750
|
validators: ['endpoint-url-safe', 'endpoint-uses-praxis-backend-surface', 'upload-endpoint-fixed-contract', 'bulk-endpoint-fixed-contract', 'security-change-confirmed'],
|
|
6725
6751
|
affectedPaths: ['baseUrl', 'strategy'],
|
|
6726
|
-
submissionImpact:
|
|
6752
|
+
submissionImpact: 'affects-remote-binding',
|
|
6727
6753
|
preconditions: ['config-initialized', 'confirmation-collected'],
|
|
6728
6754
|
},
|
|
6729
6755
|
{
|
|
@@ -6737,7 +6763,7 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6737
6763
|
properties: {
|
|
6738
6764
|
strictValidation: { type: 'boolean' },
|
|
6739
6765
|
enableVirusScanning: { type: 'boolean' },
|
|
6740
|
-
defaultConflictPolicy: { enum:
|
|
6766
|
+
defaultConflictPolicy: { enum: ['ERROR', 'SKIP', 'OVERWRITE', 'MAKE_UNIQUE', 'RENAME'] },
|
|
6741
6767
|
targetDirectory: { type: 'string' },
|
|
6742
6768
|
showQuotaWarnings: { type: 'boolean' },
|
|
6743
6769
|
blockOnExceed: { type: 'boolean' },
|
|
@@ -6759,7 +6785,7 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6759
6785
|
requiresConfirmation: true,
|
|
6760
6786
|
validators: ['security-change-confirmed', 'security-policy-compatible', 'target-directory-safe', 'conflict-policy-valid', 'quota-rate-policy-valid', 'header-names-safe', 'editor-runtime-round-trip'],
|
|
6761
6787
|
affectedPaths: ['options.strictValidation', 'options.enableVirusScanning', 'options.defaultConflictPolicy', 'options.targetDirectory', 'quotas', 'rateLimit', 'headers'],
|
|
6762
|
-
submissionImpact:
|
|
6788
|
+
submissionImpact: 'config-only',
|
|
6763
6789
|
preconditions: ['config-initialized', 'confirmation-collected'],
|
|
6764
6790
|
},
|
|
6765
6791
|
{
|
|
@@ -6777,9 +6803,11 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6777
6803
|
},
|
|
6778
6804
|
},
|
|
6779
6805
|
effects: [{ kind: 'merge-object', path: 'messages.errors' }],
|
|
6806
|
+
destructive: false,
|
|
6807
|
+
requiresConfirmation: false,
|
|
6780
6808
|
validators: ['error-code-known', 'error-message-i18n-compatible', 'message-not-empty', 'editor-runtime-round-trip'],
|
|
6781
6809
|
affectedPaths: ['messages.errors'],
|
|
6782
|
-
submissionImpact:
|
|
6810
|
+
submissionImpact: 'config-only',
|
|
6783
6811
|
preconditions: ['config-initialized'],
|
|
6784
6812
|
},
|
|
6785
6813
|
{
|
|
@@ -6791,7 +6819,7 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6791
6819
|
inputSchema: {
|
|
6792
6820
|
type: 'object',
|
|
6793
6821
|
properties: {
|
|
6794
|
-
displayMode: { enum:
|
|
6822
|
+
displayMode: { enum: ['full', 'compact'] },
|
|
6795
6823
|
dense: { type: 'boolean' },
|
|
6796
6824
|
showDropzone: { type: 'boolean' },
|
|
6797
6825
|
showProgress: { type: 'boolean' },
|
|
@@ -6804,9 +6832,11 @@ const PRAXIS_FILES_UPLOAD_AUTHORING_MANIFEST = {
|
|
|
6804
6832
|
{ kind: 'set-value', path: 'displayMode' },
|
|
6805
6833
|
{ kind: 'merge-object', path: 'ui' },
|
|
6806
6834
|
],
|
|
6835
|
+
destructive: false,
|
|
6836
|
+
requiresConfirmation: false,
|
|
6807
6837
|
validators: ['display-mode-valid', 'display-ui-compatible', 'editor-runtime-round-trip'],
|
|
6808
6838
|
affectedPaths: ['displayMode', 'ui.dense', 'ui.showDropzone', 'ui.showProgress', 'ui.manualUpload', 'ui.showMetadataForm', 'ui.showConflictPolicySelector'],
|
|
6809
|
-
submissionImpact:
|
|
6839
|
+
submissionImpact: 'visual-only',
|
|
6810
6840
|
preconditions: ['config-initialized'],
|
|
6811
6841
|
},
|
|
6812
6842
|
],
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/files-upload",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.13",
|
|
4
4
|
"description": "File upload components and services for Praxis UI with presigned and direct strategies, quotas and rate-limit handling.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/cdk": "^20.0.0",
|
|
8
8
|
"@angular/core": "^20.0.0",
|
|
9
9
|
"@angular/material": "^20.0.0",
|
|
10
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-fields": "^8.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^8.0.0-beta.
|
|
10
|
+
"@praxisui/core": "^8.0.0-beta.13",
|
|
11
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.13",
|
|
12
|
+
"@praxisui/settings-panel": "^8.0.0-beta.13"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"tslib": "^2.3.0"
|