@acorex/platform 19.4.9 → 19.4.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-widgets-file-list-popup.component-TNxbcVav.mjs","sources":["../../../../libs/platform/widgets/src/lib/widgets/advance/file-uploader/file-list-popup/file-list-popup.component.ts","../../../../libs/platform/widgets/src/lib/widgets/advance/file-uploader/file-list-popup/file-list-popup.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPFileListItem } from '@acorex/platform/core';\nimport { CommonModule } from '@angular/common';\nimport { Component, computed, input, linkedSignal } from '@angular/core';\nimport { AXPLayoutBuilderModule, AXPLayoutContextChangeEvent, AXPWidgetNode } from '@acorex/platform/layout/builder';\n\n@Component({\n imports: [\n CommonModule,\n //\n AXLabelModule,\n AXCheckBoxModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n //\n AXPLayoutBuilderModule\n ],\n templateUrl: './file-list-popup.component.html',\n})\nexport class AXPFileListPopupComponent extends AXBasePageComponent {\n\n files = input<AXPFileListItem[]>([]);\n readOnly = input<boolean>(false);\n multiple = input<boolean>(false);\n accept = input<string>('*');\n\n protected mode = computed(() => this.readOnly() ? 'view' : 'edit');\n\n\n protected context = linkedSignal<{}>(() => ({\n }));\n\n protected onContextChanged(event: AXPLayoutContextChangeEvent) {\n this.context.set(event.data);\n }\n\n protected node = computed<AXPWidgetNode>(() => ({\n type: 'file-uploader',\n path: 'files',\n defaultValue: this.files(),\n options: {\n readOnly: this.readOnly(),\n multiple: this.multiple(),\n accept: this.accept(),\n },\n }));\n\n apply() {\n this.close({\n data: this.context(),\n });\n }\n\n}\n","<div class=\"ax-p-2\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n <ng-container axp-widget-renderer [node]=\"node()\" [mode]=\"mode()\"></ng-container>\n </axp-widgets-container>\n</div>\n<ax-footer>\n <ax-suffix>\n @if (readOnly()) {\n <ax-button [text]=\"'close' | translate | async\" (click)=\"close()\"></ax-button>\n } @else {\n <ax-button [text]=\"'discard' | translate | async\" (click)=\"close()\"></ax-button>\n <ax-button [text]=\"'apply' | translate | async\" (click)=\"apply()\" [color]=\"'primary'\"></ax-button>\n }\n </ax-suffix>\n</ax-footer>\n"],"names":["i2","i4","i5"],"mappings":";;;;;;;;;;;;;;;;AAyBM,MAAO,yBAA0B,SAAQ,mBAAmB,CAAA;AAdlE,IAAA,WAAA,GAAA;;AAgBE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAoB,EAAE,CAAC;AACpC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,GAAG,CAAC;AAEjB,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;QAGxD,IAAO,CAAA,OAAA,GAAG,YAAY,CAAK,OAAO,EAC3C,CAAC,CAAC;AAMO,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAgB,OAAO;AAC9C,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE;AAC1B,YAAA,OAAO,EAAE;AACP,gBAAA,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;AACzB,gBAAA,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;AACzB,gBAAA,MAAM,EA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AAmB;;wBAEnB;AACD,qBAAA,EAAA,QAAA,EAAA,0oBAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-widgets-file-list-popup.component-TNxbcVav.mjs","sources":["../../../../libs/platform/widgets/src/lib/widgets/advance/file-uploader/file-list-popup/file-list-popup.component.ts","../../../../libs/platform/widgets/src/lib/widgets/advance/file-uploader/file-list-popup/file-list-popup.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPFileListItem } from '@acorex/platform/core';\nimport { CommonModule } from '@angular/common';\nimport { Component, computed, input, linkedSignal } from '@angular/core';\nimport { AXPLayoutBuilderModule, AXPLayoutContextChangeEvent, AXPWidgetNode } from '@acorex/platform/layout/builder';\n\n@Component({\n imports: [\n CommonModule,\n //\n AXLabelModule,\n AXCheckBoxModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n //\n AXPLayoutBuilderModule\n ],\n templateUrl: './file-list-popup.component.html',\n})\nexport class AXPFileListPopupComponent extends AXBasePageComponent {\n\n files = input<AXPFileListItem[]>([]);\n readOnly = input<boolean>(false);\n multiple = input<boolean>(false);\n accept = input<string>('*');\n\n protected mode = computed(() => this.readOnly() ? 'view' : 'edit');\n\n \n\n\n protected context = linkedSignal<{}>(() => ({\n }));\n\n protected onContextChanged(event: AXPLayoutContextChangeEvent) {\n this.context.set(event.data);\n }\n\n protected node = computed<AXPWidgetNode>(() => ({\n type: 'file-uploader',\n path: 'files',\n defaultValue: this.files(),\n options: {\n readOnly: this.readOnly(),\n multiple: this.multiple(),\n accept: this.accept(),\n },\n }));\n\n apply() {\n this.close({\n data: this.context(),\n });\n }\n\n}\n","<div class=\"ax-p-2\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n <ng-container axp-widget-renderer [node]=\"node()\" [mode]=\"mode()\"></ng-container>\n </axp-widgets-container>\n</div>\n<ax-footer>\n <ax-suffix>\n @if (readOnly()) {\n <ax-button [text]=\"'close' | translate | async\" (click)=\"close()\"></ax-button>\n } @else {\n <ax-button [text]=\"'discard' | translate | async\" (click)=\"close()\"></ax-button>\n <ax-button [text]=\"'apply' | translate | async\" (click)=\"apply()\" [color]=\"'primary'\"></ax-button>\n }\n </ax-suffix>\n</ax-footer>\n"],"names":["i2","i4","i5"],"mappings":";;;;;;;;;;;;;;;;AAyBM,MAAO,yBAA0B,SAAQ,mBAAmB,CAAA;AAdlE,IAAA,WAAA,GAAA;;AAgBE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAoB,EAAE,CAAC;AACpC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,GAAG,CAAC;AAEjB,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;QAKxD,IAAO,CAAA,OAAA,GAAG,YAAY,CAAK,OAAO,EAC3C,CAAC,CAAC;AAMO,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAgB,OAAO;AAC9C,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE;AAC1B,YAAA,OAAO,EAAE;AACP,gBAAA,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;AACzB,gBAAA,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;AACzB,gBAAA,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;AACtB,aAAA;AACF,SAAA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AAA,EAAA;;;;;"}
@@ -7070,6 +7070,7 @@ var fileUploaderWidgetColumn_component = /*#__PURE__*/Object.freeze({
7070
7070
  class AXPFileListComponent {
7071
7071
  constructor() {
7072
7072
  this.fileTypeService = inject(AXPFileTypeProviderService);
7073
+ this.fileStorageService = inject(AXPFileStorageService);
7073
7074
  this.isLoading = signal(true);
7074
7075
  this.fileTypes = signal([]);
7075
7076
  this.onRemove = output();
@@ -7080,8 +7081,10 @@ class AXPFileListComponent {
7080
7081
  async ngOnInit() {
7081
7082
  this.fileTypes.set(await this.fileTypeService.items());
7082
7083
  this.isLoading.set(false);
7084
+ console.log(this.files());
7083
7085
  }
7084
7086
  getFileInfo(fileName) {
7087
+ console.log(fileName);
7085
7088
  const extension = fileName.split('.').pop()?.toLowerCase() || '';
7086
7089
  const extensions = this.fileTypes().flatMap((t) => t.extensions);
7087
7090
  const fileType = extensions.find((e) => e.name === extension);
@@ -7091,17 +7094,77 @@ class AXPFileListComponent {
7091
7094
  };
7092
7095
  }
7093
7096
  async handleFileDownload(file) {
7094
- if (file.source?.kind !== 'blob' || !(file.source.value instanceof Blob)) {
7095
- throw new Error('This action expects a File or Blob object');
7097
+ if (!file.source) {
7098
+ console.error('File source is undefined, cannot download.', file);
7099
+ return;
7100
+ }
7101
+ const triggerDownload = (blob, fileName) => {
7102
+ const url = URL.createObjectURL(blob);
7103
+ const link = document.createElement('a');
7104
+ link.href = url;
7105
+ link.download = fileName;
7106
+ document.body.appendChild(link);
7107
+ link.click();
7108
+ document.body.removeChild(link);
7109
+ URL.revokeObjectURL(url);
7110
+ };
7111
+ switch (file.source.kind) {
7112
+ case 'blob':
7113
+ if (file.source.value instanceof Blob) {
7114
+ triggerDownload(file.source.value, file.name ?? 'download');
7115
+ }
7116
+ else {
7117
+ console.error('Source kind is blob, but value is not a Blob.', file);
7118
+ }
7119
+ break;
7120
+ case 'fileId':
7121
+ if (typeof file.source.value === 'string') {
7122
+ try {
7123
+ const fileInfo = await this.fileStorageService.getInfo(file.source.value);
7124
+ if (fileInfo && fileInfo.url) {
7125
+ const link = document.createElement('a');
7126
+ link.href = fileInfo.url;
7127
+ link.download = file.name ?? fileInfo.name ?? 'download';
7128
+ link.target = '_blank';
7129
+ document.body.appendChild(link);
7130
+ link.click();
7131
+ document.body.removeChild(link);
7132
+ }
7133
+ else if (fileInfo && fileInfo.binary instanceof Blob) {
7134
+ triggerDownload(fileInfo.binary, file.name ?? fileInfo.name ?? 'download');
7135
+ }
7136
+ else {
7137
+ console.error('Could not retrieve file for download from fileId:', fileInfo);
7138
+ }
7139
+ }
7140
+ catch (error) {
7141
+ console.error('Error downloading file by fileId:', file.source.value, error);
7142
+ }
7143
+ }
7144
+ else {
7145
+ console.error('Source kind is fileId, but value is not a string ID.', file);
7146
+ }
7147
+ break;
7148
+ case 'url':
7149
+ if (typeof file.source.value === 'string') {
7150
+ const link = document.createElement('a');
7151
+ link.href = file.source.value;
7152
+ link.download = file.name ?? 'download';
7153
+ link.target = '_blank';
7154
+ document.body.appendChild(link);
7155
+ link.click();
7156
+ document.body.removeChild(link);
7157
+ }
7158
+ else {
7159
+ console.error('Source kind is url, but value is not a string URL.', file);
7160
+ }
7161
+ break;
7162
+ case 'preview':
7163
+ case 'none':
7164
+ default:
7165
+ console.error(`Download not supported for source kind: ${file.source.kind}`, file);
7166
+ break;
7096
7167
  }
7097
- const url = URL.createObjectURL(file.source.value);
7098
- const link = document.createElement('a');
7099
- link.href = url;
7100
- link.download = file.name ?? ''; // Set the desired file name
7101
- document.body.appendChild(link);
7102
- link.click();
7103
- document.body.removeChild(link);
7104
- URL.revokeObjectURL(url);
7105
7168
  }
7106
7169
  async handleFileRemove(file) {
7107
7170
  this.onRemove.emit(file);
@@ -7179,7 +7242,7 @@ class AXPFileUploaderWidgetEditComponent extends AXPValueWidgetComponent {
7179
7242
  }
7180
7243
  else {
7181
7244
  file.status = 'deleted';
7182
- this.setValue([...(this.getValue() ?? []), file]);
7245
+ this.setValue(this.getValue()?.map(f => f.id === file.id ? file : f) ?? []);
7183
7246
  }
7184
7247
  }
7185
7248
  clear() {
@@ -7305,10 +7368,7 @@ var fileUploaderWidgetPrint_component = /*#__PURE__*/Object.freeze({
7305
7368
  class AXPFileUploaderWidgetViewComponent extends AXPValueWidgetComponent {
7306
7369
  constructor() {
7307
7370
  super(...arguments);
7308
- this.files = computed(() => this.getValue()?.map(file => ({
7309
- ...file,
7310
- status: 'uploaded'
7311
- })) ?? []);
7371
+ this.files = computed(() => this.getValue().filter(file => file.status !== 'deleted') ?? []);
7312
7372
  }
7313
7373
  get __class() {
7314
7374
  const cls = {};
@@ -7770,7 +7830,7 @@ class AXPMapBoxWidgetViewComponent extends AXPValueWidgetComponent {
7770
7830
  [longitude]="longitude()"
7771
7831
  [markers]="markers()"
7772
7832
  ></ax-map>
7773
- </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXMapModule }, { kind: "component", type: i1$6.AXMapComponent, selector: "ax-map", inputs: ["zoomLevel", "latitude", "longitude", "maxMarker", "maxPolygon", "hasDraw", "hasLocator", "fitToDraw", "limitDraw", "markerPlace", "locatePlace", "markers", "polygons"], outputs: ["zoomLevelChange", "latitudeChange", "longitudeChange", "onMarkerAdded", "onMarkerChanged", "onPolygonAdded", "onPolygonChanged", "onLocationFound", "onMapReady"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
7833
+ </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXMapModule }, { kind: "component", type: i1$6.AXMapComponent, selector: "ax-map", inputs: ["zoomLevel", "latitude", "longitude", "maxMarker", "maxPolygon", "hasDraw", "hasLocator", "fitToDraw", "limitDraw", "markerPlace", "locatePlace", "poiMinZoom", "markers", "polygons", "pois"], outputs: ["zoomLevelChange", "latitudeChange", "longitudeChange", "onMarkerAdded", "onMarkerChanged", "onPolygonAdded", "onPolygonChanged", "onLocationFound", "onPoiChanged", "onPoiAdded", "onMapReady"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
7774
7834
  }
7775
7835
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPMapBoxWidgetViewComponent, decorators: [{
7776
7836
  type: Component,
@@ -7812,12 +7872,13 @@ class AXPMapBoxWidgetEditComponent extends AXPValueWidgetComponent {
7812
7872
  this.height = computed(() => this.options()['height'] ?? 300);
7813
7873
  this.fitToDraw = computed(() => this.options()['fitToDraw'] ?? false);
7814
7874
  this.limitDraw = computed(() => this.options()?.limitDraw ?? undefined);
7875
+ this.pois = computed(() => this.options()['pois'] ?? []);
7815
7876
  }
7816
7877
  onMarkerChanged($event) {
7817
- this.setValue({ polygons: this.getValue()?.polygons ?? [], markers: $event });
7878
+ this.setValue({ polygons: this.getValue()?.polygons ?? [], markers: $event, pois: this.getValue()?.pois ?? [] });
7818
7879
  }
7819
7880
  onPolygonChanged($event) {
7820
- this.setValue({ polygons: $event, markers: this.getValue()?.markers ?? [] });
7881
+ this.setValue({ polygons: $event, markers: this.getValue()?.markers ?? [], pois: this.getValue()?.pois ?? [] });
7821
7882
  }
7822
7883
  get __class() {
7823
7884
  const cls = {};
@@ -7842,9 +7903,10 @@ class AXPMapBoxWidgetEditComponent extends AXPValueWidgetComponent {
7842
7903
  [polygons]="polygons()"
7843
7904
  [fitToDraw]="fitToDraw()"
7844
7905
  [limitDraw]="limitDraw()!"
7906
+ [pois]="pois()"
7845
7907
  >
7846
7908
  </ax-map>
7847
- </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXMapModule }, { kind: "component", type: i1$6.AXMapComponent, selector: "ax-map", inputs: ["zoomLevel", "latitude", "longitude", "maxMarker", "maxPolygon", "hasDraw", "hasLocator", "fitToDraw", "limitDraw", "markerPlace", "locatePlace", "markers", "polygons"], outputs: ["zoomLevelChange", "latitudeChange", "longitudeChange", "onMarkerAdded", "onMarkerChanged", "onPolygonAdded", "onPolygonChanged", "onLocationFound", "onMapReady"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
7909
+ </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXMapModule }, { kind: "component", type: i1$6.AXMapComponent, selector: "ax-map", inputs: ["zoomLevel", "latitude", "longitude", "maxMarker", "maxPolygon", "hasDraw", "hasLocator", "fitToDraw", "limitDraw", "markerPlace", "locatePlace", "poiMinZoom", "markers", "polygons", "pois"], outputs: ["zoomLevelChange", "latitudeChange", "longitudeChange", "onMarkerAdded", "onMarkerChanged", "onPolygonAdded", "onPolygonChanged", "onLocationFound", "onPoiChanged", "onPoiAdded", "onMapReady"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
7848
7910
  }
7849
7911
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPMapBoxWidgetEditComponent, decorators: [{
7850
7912
  type: Component,
@@ -7865,6 +7927,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
7865
7927
  [polygons]="polygons()"
7866
7928
  [fitToDraw]="fitToDraw()"
7867
7929
  [limitDraw]="limitDraw()!"
7930
+ [pois]="pois()"
7868
7931
  >
7869
7932
  </ax-map>
7870
7933
  </div>`,