@alfresco/adf-extensions 7.1.0-15297936594 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/adf-extensions.mjs +50 -46
- package/fesm2022/adf-extensions.mjs.map +1 -1
- package/lib/components/viewer/preview-extension.component.d.ts +4 -2
- package/package.json +2 -4
- package/esm2022/adf-extensions.mjs +0 -5
- package/esm2022/lib/components/dynamic-column/dynamic-column.component.mjs +0 -63
- package/esm2022/lib/components/dynamic-component/dynamic.component.mjs +0 -89
- package/esm2022/lib/components/dynamic-tab/dynamic-tab.component.mjs +0 -68
- package/esm2022/lib/components/public-api.mjs +0 -22
- package/esm2022/lib/components/viewer/preview-extension.component.mjs +0 -77
- package/esm2022/lib/components/viewer/viewer-extension.interface.mjs +0 -18
- package/esm2022/lib/config/action.extensions.mjs +0 -26
- package/esm2022/lib/config/document-list.extensions.mjs +0 -18
- package/esm2022/lib/config/extension-element.mjs +0 -18
- package/esm2022/lib/config/extension-utils.mjs +0 -134
- package/esm2022/lib/config/extension.config.mjs +0 -18
- package/esm2022/lib/config/icon.extensions.mjs +0 -18
- package/esm2022/lib/config/navbar.extensions.mjs +0 -18
- package/esm2022/lib/config/permission.extensions.mjs +0 -18
- package/esm2022/lib/config/routing.extensions.mjs +0 -18
- package/esm2022/lib/config/rule.extensions.mjs +0 -19
- package/esm2022/lib/config/sidebar.extensions.mjs +0 -18
- package/esm2022/lib/config/viewer.extensions.mjs +0 -18
- package/esm2022/lib/evaluators/core.evaluators.mjs +0 -59
- package/esm2022/lib/extensions.module.mjs +0 -61
- package/esm2022/lib/services/app-extension.service.mjs +0 -78
- package/esm2022/lib/services/component-register.service.mjs +0 -41
- package/esm2022/lib/services/extension-loader.service.mjs +0 -154
- package/esm2022/lib/services/extension.service.mjs +0 -250
- package/esm2022/lib/services/rule.service.mjs +0 -92
- package/esm2022/lib/services/startup-extension-factory.mjs +0 -18
- package/esm2022/lib/store/states/navigation.state.mjs +0 -18
- package/esm2022/lib/store/states/profile.state.mjs +0 -18
- package/esm2022/lib/store/states/repository.state.mjs +0 -18
- package/esm2022/lib/store/states/selection.state.mjs +0 -18
- package/esm2022/public-api.mjs +0 -40
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i1 from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, InjectionToken, Inject, ViewContainerRef, Input, ViewChild, Component, ChangeDetectionStrategy, ViewEncapsulation,
|
|
3
|
+
import { Injectable, InjectionToken, Inject, EventEmitter, inject, DestroyRef, ViewContainerRef, Output, Input, ViewChild, Component, ChangeDetectionStrategy, ViewEncapsulation, provideAppInitializer, NgModule } from '@angular/core';
|
|
4
4
|
import { BehaviorSubject } from 'rxjs';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
6
|
import '@alfresco/js-api';
|
|
6
7
|
|
|
7
8
|
/*!
|
|
@@ -473,10 +474,10 @@ class ExtensionLoaderService {
|
|
|
473
474
|
}
|
|
474
475
|
return extensions.map((file) => file.match('(?!.*/).+')[0]).filter((fileName) => !ignoreReferenceList.includes(fileName));
|
|
475
476
|
}
|
|
476
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
477
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
477
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionLoaderService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
478
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionLoaderService, providedIn: 'root' }); }
|
|
478
479
|
}
|
|
479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionLoaderService, decorators: [{
|
|
480
481
|
type: Injectable,
|
|
481
482
|
args: [{
|
|
482
483
|
providedIn: 'root'
|
|
@@ -573,10 +574,10 @@ class ComponentRegisterService {
|
|
|
573
574
|
hasComponentById(id) {
|
|
574
575
|
return !!this.getComponentById(id);
|
|
575
576
|
}
|
|
576
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
577
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
577
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ComponentRegisterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
578
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ComponentRegisterService, providedIn: 'root' }); }
|
|
578
579
|
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ComponentRegisterService, decorators: [{
|
|
580
581
|
type: Injectable,
|
|
581
582
|
args: [{ providedIn: 'root' }]
|
|
582
583
|
}] });
|
|
@@ -659,10 +660,10 @@ class RuleService {
|
|
|
659
660
|
}
|
|
660
661
|
return false;
|
|
661
662
|
}
|
|
662
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
663
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
663
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RuleService, deps: [{ token: ExtensionLoaderService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
664
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RuleService, providedIn: 'root' }); }
|
|
664
665
|
}
|
|
665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RuleService, decorators: [{
|
|
666
667
|
type: Injectable,
|
|
667
668
|
args: [{
|
|
668
669
|
providedIn: 'root'
|
|
@@ -893,10 +894,10 @@ class ExtensionService {
|
|
|
893
894
|
}
|
|
894
895
|
return value;
|
|
895
896
|
}
|
|
896
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
897
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
897
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionService, deps: [{ token: ExtensionLoaderService }, { token: ComponentRegisterService }, { token: RuleService }, { token: EXTENSION_JSONS }, { token: EXTENSION_JSON_VALUES }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
898
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionService, providedIn: 'root' }); }
|
|
898
899
|
}
|
|
899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionService, decorators: [{
|
|
900
901
|
type: Injectable,
|
|
901
902
|
args: [{
|
|
902
903
|
providedIn: 'root'
|
|
@@ -972,10 +973,10 @@ class AppExtensionService {
|
|
|
972
973
|
}
|
|
973
974
|
return false;
|
|
974
975
|
}
|
|
975
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
976
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
976
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppExtensionService, deps: [{ token: ExtensionService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
977
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppExtensionService, providedIn: 'root' }); }
|
|
977
978
|
}
|
|
978
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppExtensionService, decorators: [{
|
|
979
980
|
type: Injectable,
|
|
980
981
|
args: [{
|
|
981
982
|
providedIn: 'root'
|
|
@@ -1088,6 +1089,8 @@ class PreviewExtensionComponent {
|
|
|
1088
1089
|
this.extensionService = extensionService;
|
|
1089
1090
|
/** Identifier of a node that is opened by the viewer. */
|
|
1090
1091
|
this.nodeId = null;
|
|
1092
|
+
this.contentLoaded = new EventEmitter();
|
|
1093
|
+
this.destroyRef = inject(DestroyRef);
|
|
1091
1094
|
}
|
|
1092
1095
|
ngOnInit() {
|
|
1093
1096
|
if (!this.id) {
|
|
@@ -1111,20 +1114,23 @@ class PreviewExtensionComponent {
|
|
|
1111
1114
|
}
|
|
1112
1115
|
updateInstance() {
|
|
1113
1116
|
if (this.componentRef?.instance) {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1117
|
+
this.componentRef.setInput('url', this.url);
|
|
1118
|
+
this.componentRef.setInput('extension', this.extension);
|
|
1119
|
+
this.componentRef.setInput('nodeId', this.nodeId);
|
|
1120
|
+
if (this.componentRef.instance?.contentLoaded) {
|
|
1121
|
+
this.componentRef.instance.contentLoaded.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
1122
|
+
this.contentLoaded.emit();
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1118
1125
|
}
|
|
1119
1126
|
}
|
|
1120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1121
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreviewExtensionComponent, deps: [{ token: ExtensionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1128
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: PreviewExtensionComponent, isStandalone: true, selector: "adf-preview-extension", inputs: { id: "id", nodeId: "nodeId", url: "url", extension: "extension" }, outputs: { contentLoaded: "contentLoaded" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<div #content></div>`, isInline: true }); }
|
|
1122
1129
|
}
|
|
1123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreviewExtensionComponent, decorators: [{
|
|
1124
1131
|
type: Component,
|
|
1125
1132
|
args: [{
|
|
1126
1133
|
selector: 'adf-preview-extension',
|
|
1127
|
-
standalone: true,
|
|
1128
1134
|
template: `<div #content></div>`
|
|
1129
1135
|
}]
|
|
1130
1136
|
}], ctorParameters: () => [{ type: ExtensionService }], propDecorators: { content: [{
|
|
@@ -1138,6 +1144,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
1138
1144
|
type: Input
|
|
1139
1145
|
}], extension: [{
|
|
1140
1146
|
type: Input
|
|
1147
|
+
}], contentLoaded: [{
|
|
1148
|
+
type: Output
|
|
1141
1149
|
}] } });
|
|
1142
1150
|
|
|
1143
1151
|
/*!
|
|
@@ -1184,12 +1192,12 @@ class DynamicColumnComponent {
|
|
|
1184
1192
|
this.componentRef.instance.context = this.context;
|
|
1185
1193
|
}
|
|
1186
1194
|
}
|
|
1187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1188
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DynamicColumnComponent, deps: [{ token: ExtensionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1196
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DynamicColumnComponent, isStandalone: true, selector: "adf-dynamic-column", inputs: { id: "id", context: "context" }, host: { classAttribute: "adf-dynamic-column" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<ng-container #content />`, isInline: true, styles: [".adf-dynamic-column{display:flex;align-items:center;width:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1189
1197
|
}
|
|
1190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DynamicColumnComponent, decorators: [{
|
|
1191
1199
|
type: Component,
|
|
1192
|
-
args: [{ selector: 'adf-dynamic-column',
|
|
1200
|
+
args: [{ selector: 'adf-dynamic-column', template: `<ng-container #content />`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'adf-dynamic-column' }, styles: [".adf-dynamic-column{display:flex;align-items:center;width:inherit}\n"] }]
|
|
1193
1201
|
}], ctorParameters: () => [{ type: ExtensionService }], propDecorators: { content: [{
|
|
1194
1202
|
type: ViewChild,
|
|
1195
1203
|
args: ['content', { read: ViewContainerRef, static: true }]
|
|
@@ -1265,14 +1273,13 @@ class DynamicExtensionComponent {
|
|
|
1265
1273
|
lifecycleHookIsImplemented(lifecycleMethod) {
|
|
1266
1274
|
return !!this.componentRef.instance[lifecycleMethod];
|
|
1267
1275
|
}
|
|
1268
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1269
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DynamicExtensionComponent, deps: [{ token: ExtensionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1277
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DynamicExtensionComponent, isStandalone: true, selector: "adf-dynamic-component", inputs: { id: "id", data: "data" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<div #content></div>`, isInline: true }); }
|
|
1270
1278
|
}
|
|
1271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DynamicExtensionComponent, decorators: [{
|
|
1272
1280
|
type: Component,
|
|
1273
1281
|
args: [{
|
|
1274
1282
|
selector: 'adf-dynamic-component',
|
|
1275
|
-
standalone: true,
|
|
1276
1283
|
template: `<div #content></div>`
|
|
1277
1284
|
}]
|
|
1278
1285
|
}], ctorParameters: () => [{ type: ExtensionService }], propDecorators: { content: [{
|
|
@@ -1328,14 +1335,13 @@ class DynamicTabComponent {
|
|
|
1328
1335
|
this.componentRef.instance.node = this.node;
|
|
1329
1336
|
}
|
|
1330
1337
|
}
|
|
1331
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1332
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DynamicTabComponent, deps: [{ token: ExtensionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1339
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DynamicTabComponent, isStandalone: true, selector: "adf-dynamic-tab", inputs: { id: "id", node: "node" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<div #content></div>`, isInline: true }); }
|
|
1333
1340
|
}
|
|
1334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DynamicTabComponent, decorators: [{
|
|
1335
1342
|
type: Component,
|
|
1336
1343
|
args: [{
|
|
1337
1344
|
selector: 'adf-dynamic-tab',
|
|
1338
|
-
standalone: true,
|
|
1339
1345
|
template: `<div #content></div>`
|
|
1340
1346
|
}]
|
|
1341
1347
|
}], ctorParameters: () => [{ type: ExtensionService }], propDecorators: { content: [{
|
|
@@ -1405,12 +1411,10 @@ class ExtensionsModule {
|
|
|
1405
1411
|
return {
|
|
1406
1412
|
ngModule: ExtensionsModule,
|
|
1407
1413
|
providers: [
|
|
1408
|
-
{
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
multi: true
|
|
1413
|
-
}
|
|
1414
|
+
provideAppInitializer(() => {
|
|
1415
|
+
const initializerFn = setupExtensions(inject(AppExtensionService));
|
|
1416
|
+
return initializerFn();
|
|
1417
|
+
})
|
|
1414
1418
|
]
|
|
1415
1419
|
};
|
|
1416
1420
|
}
|
|
@@ -1423,11 +1427,11 @@ class ExtensionsModule {
|
|
|
1423
1427
|
ngModule: ExtensionsModule
|
|
1424
1428
|
};
|
|
1425
1429
|
}
|
|
1426
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1427
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1428
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1431
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ExtensionsModule, imports: [DynamicExtensionComponent, DynamicTabComponent, DynamicColumnComponent, PreviewExtensionComponent], exports: [DynamicExtensionComponent, DynamicTabComponent, DynamicColumnComponent, PreviewExtensionComponent] }); }
|
|
1432
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionsModule }); }
|
|
1429
1433
|
}
|
|
1430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ExtensionsModule, decorators: [{
|
|
1431
1435
|
type: NgModule,
|
|
1432
1436
|
args: [{
|
|
1433
1437
|
imports: [...EXTENSION_DIRECTIVES],
|