ngx-edu-sharing-ui 10.0.13 → 10.0.15
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/esm2022/lib/common/edu-sharing-ui-common.module.mjs +7 -1
- package/esm2022/lib/index.mjs +2 -1
- package/esm2022/lib/mds-viewer/mds-viewer.component.mjs +18 -6
- package/esm2022/lib/mds-viewer/widget/mds-widget.component.mjs +9 -9
- package/esm2022/lib/spinner-small/spinner-small.component.mjs +20 -0
- package/fesm2022/ngx-edu-sharing-ui.mjs +45 -12
- package/fesm2022/ngx-edu-sharing-ui.mjs.map +1 -1
- package/lib/common/edu-sharing-ui-common.module.d.ts +7 -6
- package/lib/index.d.ts +1 -0
- package/lib/mds-viewer/widget/mds-widget.component.d.ts +20 -4
- package/lib/spinner-small/spinner-small.component.d.ts +7 -0
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
18
18
|
import * as i1$1 from '@angular/common/http';
|
|
19
19
|
import { HttpClient } from '@angular/common/http';
|
|
20
20
|
import * as i3$1 from '@angular/platform-browser';
|
|
21
|
+
import * as i1$2 from '@angular/material/progress-spinner';
|
|
22
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
21
23
|
import { transition, style, animate, state, trigger } from '@angular/animations';
|
|
22
24
|
import { isArray as isArray$1, isString } from 'lodash';
|
|
23
25
|
import * as i3$2 from '@angular/material/menu';
|
|
@@ -1303,11 +1305,11 @@ class MdsWidgetComponent {
|
|
|
1303
1305
|
this.temporaryValue = undefined;
|
|
1304
1306
|
// super(toast, null, translate);
|
|
1305
1307
|
}
|
|
1306
|
-
ngOnChanges(changes) {
|
|
1307
|
-
this.value = this.getNodeValue();
|
|
1308
|
+
async ngOnChanges(changes) {
|
|
1309
|
+
this.value = await this.getNodeValue();
|
|
1308
1310
|
}
|
|
1309
1311
|
async ngOnInit() {
|
|
1310
|
-
this.value = this.getNodeValue();
|
|
1312
|
+
this.value = await this.getNodeValue();
|
|
1311
1313
|
this.widget
|
|
1312
1314
|
.getInitialDisplayValues()
|
|
1313
1315
|
.pipe(filter((v) => !!v))
|
|
@@ -1362,7 +1364,7 @@ class MdsWidgetComponent {
|
|
|
1362
1364
|
return this.mdsViewerService.values$.value;
|
|
1363
1365
|
}
|
|
1364
1366
|
}
|
|
1365
|
-
getNodeValue() {
|
|
1367
|
+
async getNodeValue() {
|
|
1366
1368
|
if (this.temporaryValue !== undefined) {
|
|
1367
1369
|
return this.getValue(this.temporaryValue);
|
|
1368
1370
|
}
|
|
@@ -1376,10 +1378,10 @@ class MdsWidgetComponent {
|
|
|
1376
1378
|
}
|
|
1377
1379
|
else if (values?.[id]) {
|
|
1378
1380
|
// support on the fly changes+updates of the values
|
|
1379
|
-
return this.getValue(
|
|
1381
|
+
return this.getValue(values[id]);
|
|
1380
1382
|
}
|
|
1381
|
-
else if (this.widget.
|
|
1382
|
-
return
|
|
1383
|
+
else if ((await this.widget.getInitalValuesAsync())?.jointValues) {
|
|
1384
|
+
return ((await this.widget.getInitalValuesAsync()).jointValues);
|
|
1383
1385
|
}
|
|
1384
1386
|
else {
|
|
1385
1387
|
return null;
|
|
@@ -1456,7 +1458,7 @@ class MdsWidgetComponent {
|
|
|
1456
1458
|
await this.mdsEditorInstance.saveWidgetValue(instance.widget);
|
|
1457
1459
|
}
|
|
1458
1460
|
this.temporaryValue = instance.widget.getValue();
|
|
1459
|
-
this.value = this.getNodeValue();
|
|
1461
|
+
this.value = await this.getNodeValue();
|
|
1460
1462
|
this.editWrapper.nativeElement.children[0].innerHTML = null;
|
|
1461
1463
|
await this.mdsEditorInstance.fetchDisplayValues(this.widget);
|
|
1462
1464
|
}
|
|
@@ -1604,6 +1606,22 @@ function getTargetAttributeName(attr) {
|
|
|
1604
1606
|
}
|
|
1605
1607
|
}
|
|
1606
1608
|
|
|
1609
|
+
class SpinnerSmallComponent {
|
|
1610
|
+
constructor() {
|
|
1611
|
+
this.diameter = 20;
|
|
1612
|
+
}
|
|
1613
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SpinnerSmallComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1614
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SpinnerSmallComponent, isStandalone: true, selector: "es-spinner-small", inputs: { diameter: "diameter" }, ngImport: i0, template: "<mat-progress-spinner\n color=\"primary\"\n mode=\"indeterminate\"\n [diameter]=\"diameter\"\n></mat-progress-spinner>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
|
|
1615
|
+
}
|
|
1616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SpinnerSmallComponent, decorators: [{
|
|
1617
|
+
type: Component,
|
|
1618
|
+
args: [{ selector: 'es-spinner-small', standalone: true, imports: [
|
|
1619
|
+
MatProgressSpinnerModule,
|
|
1620
|
+
], template: "<mat-progress-spinner\n color=\"primary\"\n mode=\"indeterminate\"\n [diameter]=\"diameter\"\n></mat-progress-spinner>\n" }]
|
|
1621
|
+
}], ctorParameters: () => [], propDecorators: { diameter: [{
|
|
1622
|
+
type: Input
|
|
1623
|
+
}] } });
|
|
1624
|
+
|
|
1607
1625
|
class MdsViewerComponent {
|
|
1608
1626
|
/**
|
|
1609
1627
|
* The heading level from 1 to 6 to use for widget labels, equivalent to `h1` to `h6`.
|
|
@@ -1667,7 +1685,17 @@ class MdsViewerComponent {
|
|
|
1667
1685
|
// wait for angular to inflate the new binding
|
|
1668
1686
|
setTimeout(() => {
|
|
1669
1687
|
for (const widget of (this.mdsEditorInstanceService?.widgets.value ||
|
|
1670
|
-
this.mds.widgets.map(definition => {
|
|
1688
|
+
this.mds.widgets.map(definition => {
|
|
1689
|
+
return {
|
|
1690
|
+
definition,
|
|
1691
|
+
getInitalValuesAsync: async () => {
|
|
1692
|
+
return {
|
|
1693
|
+
individualValues: this.data[definition.id],
|
|
1694
|
+
};
|
|
1695
|
+
},
|
|
1696
|
+
getInitialDisplayValues: () => new BehaviorSubject(null),
|
|
1697
|
+
};
|
|
1698
|
+
}))) {
|
|
1671
1699
|
// @TODO: it would be better to filter by widgets based on template and condition, should be implemented in 5.1
|
|
1672
1700
|
this.container.toArray().forEach((c) => {
|
|
1673
1701
|
let element = c.nativeElement.getElementsByTagName(widget.definition.id)?.[0];
|
|
@@ -1725,11 +1753,11 @@ class MdsViewerComponent {
|
|
|
1725
1753
|
}
|
|
1726
1754
|
}
|
|
1727
1755
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MdsViewerComponent, deps: [{ token: i2.MdsService }, { token: MdsViewerService }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: i3$1.DomSanitizer }, { token: ViewInstanceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1728
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: MdsViewerComponent, selector: "es-mds-viewer", inputs: { mdsEditorInstanceService: "mdsEditorInstanceService", groupId: "groupId", setId: "setId", data: "data", showGroupHeadings: "showGroupHeadings", headingLevel: "headingLevel" }, providers: [MdsViewerService, ViewInstanceService], viewQueries: [{ propertyName: "container", predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngFor=\"let t of templates\" #container class=\"mds-viewer\">\n <div *ngIf=\"showGroupHeadings && t.view.caption\" class=\"card-title-element group-heading\">\n <i [esIcon]=\"t.view.icon\" *ngIf=\"t.view.icon\"></i><span>{{ t.view.caption }}</span>\n </div>\n <div class=\"template\" [innerHTML]=\"t.html\"></div>\n</div>\n", styles: [":host ::ng-deep es-mds-editor-widget-container{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: IconDirective, selector: "i[esIcon], i.material-icons", inputs: ["altText", "aria", "esIcon"] }] }); }
|
|
1756
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: MdsViewerComponent, selector: "es-mds-viewer", inputs: { mdsEditorInstanceService: "mdsEditorInstanceService", groupId: "groupId", setId: "setId", data: "data", showGroupHeadings: "showGroupHeadings", headingLevel: "headingLevel" }, providers: [MdsViewerService, ViewInstanceService], viewQueries: [{ propertyName: "container", predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<es-spinner-small *ngIf=\"!templates\"></es-spinner-small>\n<div *ngFor=\"let t of templates\" #container class=\"mds-viewer\">\n <div *ngIf=\"showGroupHeadings && t.view.caption\" class=\"card-title-element group-heading\">\n <i [esIcon]=\"t.view.icon\" *ngIf=\"t.view.icon\"></i><span>{{ t.view.caption }}</span>\n </div>\n <div class=\"template\" [innerHTML]=\"t.html\"></div>\n</div>\n", styles: [":host ::ng-deep es-mds-editor-widget-container{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpinnerSmallComponent, selector: "es-spinner-small", inputs: ["diameter"] }, { kind: "directive", type: IconDirective, selector: "i[esIcon], i.material-icons", inputs: ["altText", "aria", "esIcon"] }] }); }
|
|
1729
1757
|
}
|
|
1730
1758
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MdsViewerComponent, decorators: [{
|
|
1731
1759
|
type: Component,
|
|
1732
|
-
args: [{ selector: 'es-mds-viewer', providers: [MdsViewerService, ViewInstanceService], template: "<div *ngFor=\"let t of templates\" #container class=\"mds-viewer\">\n <div *ngIf=\"showGroupHeadings && t.view.caption\" class=\"card-title-element group-heading\">\n <i [esIcon]=\"t.view.icon\" *ngIf=\"t.view.icon\"></i><span>{{ t.view.caption }}</span>\n </div>\n <div class=\"template\" [innerHTML]=\"t.html\"></div>\n</div>\n", styles: [":host ::ng-deep es-mds-editor-widget-container{margin-bottom:0}\n"] }]
|
|
1760
|
+
args: [{ selector: 'es-mds-viewer', providers: [MdsViewerService, ViewInstanceService], template: "<es-spinner-small *ngIf=\"!templates\"></es-spinner-small>\n<div *ngFor=\"let t of templates\" #container class=\"mds-viewer\">\n <div *ngIf=\"showGroupHeadings && t.view.caption\" class=\"card-title-element group-heading\">\n <i [esIcon]=\"t.view.icon\" *ngIf=\"t.view.icon\"></i><span>{{ t.view.caption }}</span>\n </div>\n <div class=\"template\" [innerHTML]=\"t.html\"></div>\n</div>\n", styles: [":host ::ng-deep es-mds-editor-widget-container{margin-bottom:0}\n"] }]
|
|
1733
1761
|
}], ctorParameters: () => [{ type: i2.MdsService }, { type: MdsViewerService }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: i3$1.DomSanitizer }, { type: ViewInstanceService }], propDecorators: { container: [{
|
|
1734
1762
|
type: ViewChildren,
|
|
1735
1763
|
args: ['container']
|
|
@@ -3686,6 +3714,7 @@ class EduSharingUiCommonModule {
|
|
|
3686
3714
|
VCardNamePipe], imports: [CommonModule,
|
|
3687
3715
|
MatMenuModule,
|
|
3688
3716
|
SpinnerComponent,
|
|
3717
|
+
SpinnerSmallComponent,
|
|
3689
3718
|
MatButtonModule,
|
|
3690
3719
|
MatTooltipModule,
|
|
3691
3720
|
MatRippleModule,
|
|
@@ -3711,10 +3740,12 @@ class EduSharingUiCommonModule {
|
|
|
3711
3740
|
NodeUrlComponent,
|
|
3712
3741
|
SortDropdownComponent,
|
|
3713
3742
|
SpinnerComponent,
|
|
3743
|
+
SpinnerSmallComponent,
|
|
3714
3744
|
VCardNamePipe] }); }
|
|
3715
3745
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EduSharingUiCommonModule, imports: [CommonModule,
|
|
3716
3746
|
MatMenuModule,
|
|
3717
3747
|
SpinnerComponent,
|
|
3748
|
+
SpinnerSmallComponent,
|
|
3718
3749
|
MatButtonModule,
|
|
3719
3750
|
MatTooltipModule,
|
|
3720
3751
|
MatRippleModule,
|
|
@@ -3755,6 +3786,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
3755
3786
|
CommonModule,
|
|
3756
3787
|
MatMenuModule,
|
|
3757
3788
|
SpinnerComponent,
|
|
3789
|
+
SpinnerSmallComponent,
|
|
3758
3790
|
MatButtonModule,
|
|
3759
3791
|
MatTooltipModule,
|
|
3760
3792
|
MatRippleModule,
|
|
@@ -3783,6 +3815,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
3783
3815
|
NodeUrlComponent,
|
|
3784
3816
|
SortDropdownComponent,
|
|
3785
3817
|
SpinnerComponent,
|
|
3818
|
+
SpinnerSmallComponent,
|
|
3786
3819
|
VCardNamePipe,
|
|
3787
3820
|
],
|
|
3788
3821
|
}]
|
|
@@ -8378,5 +8411,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
8378
8411
|
* Generated bundle index. Do not edit.
|
|
8379
8412
|
*/
|
|
8380
8413
|
|
|
8381
|
-
export { ADDITIONAL_I18N_PROVIDER, ASSETS_BASE_PATH, AccessibilityService, AccessibilitySettings, ActionbarComponent, AppContainerService, AppService, BorderBoxObserverDirective, CheckTextOverflowDirective, ClickSource, ColorHelper, CombinedDataSource, Constrain, CustomFieldSpecialType, CustomOptions, CustomSelectionModel, CustomTemplatesDataSource, DateHelper, DefaultGroups, DropdownComponent, DurationFormat, DurationHelper, EDU_SHARING_UI_CONFIG, EduSharingUiCommonModule, EduSharingUiConfiguration, EduSharingUiModule, ElementType, FallbackTranslationHandler, FocusStateDirective, FormatDatePipe, FormatDurationPipe, FormatOptions, FormatSizePipe, Helper, HideMode, I18N_CONFIG, I18nConfig, IconDirective, InfiniteScrollDirective, InteractionType, ItemsCap, KeyboardShortcutsService, ListBaseComponent, ListCountsComponent, ListItem, ListItemLabelPipe, ListItemSort, ListItemsModule, ListTextComponent, LocalEventsService, MdsDurationPipe, MdsHelperService, MdsModule, MdsType, MdsViewerComponent, MdsWidgetComponent, MdsWidgetType, NodeCache, NodeDataSource, NodeDataSourceRemote, NodeEntriesDisplayType, NodeEntriesGlobalService, NodeEntriesModule, NodeEntriesService, NodeEntriesWrapperComponent, NodeHelperService, NodeIconPipe, NodeImagePipe, NodeImageSizePipe, NodeLicensePipe, NodePersonNamePipe, NodeRowComponent, NodeTitlePipe, NodeUrlComponent, NodesDragDirective, NodesDragDropService, NodesDragSourceDirective, NodesDropTargetDirective, NodesRightMode, OPEN_URL_MODE, OptionGroup, OptionItem, OptionsHelperDataService, OptionsHelperService, PreferredColor, PropertySlugPipe, RelativeMode, RenderHelperService, RepoUrlService, RestHelper, Scope, SearchHelperService, SortDropdownComponent, SortEvent, SpinnerComponent, TRANSLATION_LIST, Target, TemporaryStorageService, Toast, ToastDuration, TranslationLoader, TranslationsModule, TranslationsService, UIAnimation, UIConstants, UIService, VCard, VCardNamePipe, ValueType, ViewInstanceService, WORKFLOW_STATUS_CHECKED, WORKFLOW_STATUS_HASFLAWS, WORKFLOW_STATUS_TO_CHECK, WORKFLOW_STATUS_UNCHECKED, clearDraggedNodes, dragNodesTransferType, getConfigProvider, isNumeric, isTrue, macroTick, matchesShortcutCondition, microTick, notNull, readDraggedNodes, replaceElementWithDiv, saveDraggedNodes };
|
|
8414
|
+
export { ADDITIONAL_I18N_PROVIDER, ASSETS_BASE_PATH, AccessibilityService, AccessibilitySettings, ActionbarComponent, AppContainerService, AppService, BorderBoxObserverDirective, CheckTextOverflowDirective, ClickSource, ColorHelper, CombinedDataSource, Constrain, CustomFieldSpecialType, CustomOptions, CustomSelectionModel, CustomTemplatesDataSource, DateHelper, DefaultGroups, DropdownComponent, DurationFormat, DurationHelper, EDU_SHARING_UI_CONFIG, EduSharingUiCommonModule, EduSharingUiConfiguration, EduSharingUiModule, ElementType, FallbackTranslationHandler, FocusStateDirective, FormatDatePipe, FormatDurationPipe, FormatOptions, FormatSizePipe, Helper, HideMode, I18N_CONFIG, I18nConfig, IconDirective, InfiniteScrollDirective, InteractionType, ItemsCap, KeyboardShortcutsService, ListBaseComponent, ListCountsComponent, ListItem, ListItemLabelPipe, ListItemSort, ListItemsModule, ListTextComponent, LocalEventsService, MdsDurationPipe, MdsHelperService, MdsModule, MdsType, MdsViewerComponent, MdsWidgetComponent, MdsWidgetType, NodeCache, NodeDataSource, NodeDataSourceRemote, NodeEntriesDisplayType, NodeEntriesGlobalService, NodeEntriesModule, NodeEntriesService, NodeEntriesWrapperComponent, NodeHelperService, NodeIconPipe, NodeImagePipe, NodeImageSizePipe, NodeLicensePipe, NodePersonNamePipe, NodeRowComponent, NodeTitlePipe, NodeUrlComponent, NodesDragDirective, NodesDragDropService, NodesDragSourceDirective, NodesDropTargetDirective, NodesRightMode, OPEN_URL_MODE, OptionGroup, OptionItem, OptionsHelperDataService, OptionsHelperService, PreferredColor, PropertySlugPipe, RelativeMode, RenderHelperService, RepoUrlService, RestHelper, Scope, SearchHelperService, SortDropdownComponent, SortEvent, SpinnerComponent, SpinnerSmallComponent, TRANSLATION_LIST, Target, TemporaryStorageService, Toast, ToastDuration, TranslationLoader, TranslationsModule, TranslationsService, UIAnimation, UIConstants, UIService, VCard, VCardNamePipe, ValueType, ViewInstanceService, WORKFLOW_STATUS_CHECKED, WORKFLOW_STATUS_HASFLAWS, WORKFLOW_STATUS_TO_CHECK, WORKFLOW_STATUS_UNCHECKED, clearDraggedNodes, dragNodesTransferType, getConfigProvider, isNumeric, isTrue, macroTick, matchesShortcutCondition, microTick, notNull, readDraggedNodes, replaceElementWithDiv, saveDraggedNodes };
|
|
8382
8415
|
//# sourceMappingURL=ngx-edu-sharing-ui.mjs.map
|