@solidev/data 0.0.3 → 0.0.4
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/esm2020/lib/auth/auth.service.mjs +4 -1
- package/esm2020/lib/modellist/model-list-fields/model-list-field-header/messages.mjs +2 -0
- package/esm2020/lib/modellist/model-list-fields/model-list-field-header/model-list-field-header.component.mjs +35 -4
- package/esm2020/lib/modellist/model-list.service.mjs +3 -2
- package/fesm2015/solidev-data.mjs +35 -2
- package/fesm2015/solidev-data.mjs.map +1 -1
- package/fesm2020/solidev-data.mjs +35 -2
- package/fesm2020/solidev-data.mjs.map +1 -1
- package/lib/modellist/model-list-fields/model-list-field-header/messages.d.ts +6 -0
- package/lib/modellist/model-list-fields/model-list-field-header/model-list-field-header.component.d.ts +13 -2
- package/lib/modellist/model-list.service.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1403,6 +1403,7 @@ class ModelListFilters {
|
|
|
1403
1403
|
|
|
1404
1404
|
class ModelList {
|
|
1405
1405
|
constructor(name) {
|
|
1406
|
+
this.messages$ = new ReplaySubject(1);
|
|
1406
1407
|
this.started = false;
|
|
1407
1408
|
this.name = name;
|
|
1408
1409
|
}
|
|
@@ -1635,6 +1636,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
|
|
|
1635
1636
|
class ModelListFieldHeaderComponent {
|
|
1636
1637
|
constructor() {
|
|
1637
1638
|
this.sort = false;
|
|
1639
|
+
this.menuMode = 'side';
|
|
1640
|
+
this.sortMode = 'side';
|
|
1641
|
+
this.dispMenuMode = this.menuMode;
|
|
1642
|
+
this.dispSortMode = this.sortMode;
|
|
1643
|
+
this._subscriptions$ = new Subject();
|
|
1644
|
+
}
|
|
1645
|
+
ngOnInit() {
|
|
1646
|
+
this.list.messages$
|
|
1647
|
+
.pipe(takeUntil(this._subscriptions$), filter((m) => m.dest === 'header'))
|
|
1648
|
+
.subscribe((m) => {
|
|
1649
|
+
this.dispMenuMode =
|
|
1650
|
+
m.menu && m.menu !== 'default' ? m.menu : this.menuMode;
|
|
1651
|
+
this.dispSortMode =
|
|
1652
|
+
m.sort && m.sort !== 'default' ? m.sort : this.sortMode;
|
|
1653
|
+
this.display = m.show !== undefined ? m.show : this.display;
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
ngOnDestroy() {
|
|
1657
|
+
this._subscriptions$.next();
|
|
1658
|
+
this._subscriptions$.complete();
|
|
1638
1659
|
}
|
|
1639
1660
|
disable() {
|
|
1640
1661
|
this.list.fields.disable(this.field);
|
|
@@ -1645,10 +1666,10 @@ class ModelListFieldHeaderComponent {
|
|
|
1645
1666
|
}
|
|
1646
1667
|
}
|
|
1647
1668
|
ModelListFieldHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ModelListFieldHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1648
|
-
ModelListFieldHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ModelListFieldHeaderComponent, isStandalone: true, selector: "data-model-list-field-header", inputs: { list: "list", field: "field", sort: "sort", sortField: "sortField" }, ngImport: i0, template: "\n<ng-template #label><span #ref>\n <ng-content></ng-content></span><span *ngIf=\"!ref.children.length\">{{list.fields.get(field)?.label||field}}</span></ng-template>\n<div class=\"d-flex flex-row justify-content-between align-items-end slabel\"
|
|
1669
|
+
ModelListFieldHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ModelListFieldHeaderComponent, isStandalone: true, selector: "data-model-list-field-header", inputs: { list: "list", field: "field", sort: "sort", sortField: "sortField", menuMode: "menuMode", sortMode: "sortMode", display: "display" }, viewQueries: [{ propertyName: "mnu", first: true, predicate: ["mnu"], descendants: true }], ngImport: i0, template: "\n<ng-template #label><span #ref>\n <ng-content></ng-content></span><span *ngIf=\"!ref.children.length\">{{list.fields.get(field)?.label||field}}</span></ng-template>\n<div class=\"d-flex flex-row justify-content-between align-items-end slabel\">\n <div class=\"flex-grow-1\">\n <data-model-list-sorter [list]=\"list\" [field]=\"sortField||field\" *ngIf=\"sort && dispSortMode==='side'\">\n <ng-container *ngTemplateOutlet=\"label\"></ng-container>\n </data-model-list-sorter>\n <ng-container *ngIf=\"!sort || dispSortMode==='hide'\">\n <ng-container *ngTemplateOutlet=\"label\"></ng-container>\n </ng-container>\n </div>\n <div class=\"navicons d-flex flex-row\" [attr.aria-label]=\"'Gestion champs'\" *ngIf=\"dispMenuMode==='side'\"><i class=\"bi bi-caret-left-fill\" role=\"button\" (click)=\"list.fields.move(field, 'before')\" aria-label=\"D\u00E9placer vers la gauche\"></i>\n <div ngbDropdown #mnu=\"ngbDropdown\" [container]=\"'body'\"><i class=\"bi bi-record\" ngbDropdownToggle aria-label=\"Ouvrir la boite de dialogue des champs\" role=\"button\"></i>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"disable()\"><i class=\"bi bi-trash me-2\"></i>Supprimer</button>\n <h6 class=\"dropdown-header\">Ajouter une colonne apr\u00E8s</h6>\n <ng-container *ngFor=\"let f of list.fields.fields|async\">\n <ng-container *ngIf=\"f.allowed && !f.enabled\">\n <button ngbDropdownItem (click)=\"enable(f)\" [attr.aria-label]=\"f.label||f.name\"><i class=\"bi bi-plus-circle me-2\"></i>{{f.label||f.name}}</button>\n </ng-container>\n </ng-container>\n </div>\n </div><i class=\"bi bi-caret-right-fill\" role=\"button\" (click)=\"list.fields.move(field, 'after')\" aria-label=\"D\u00E9placer vers la droite\"></i>\n </div>\n</div>", styles: [".slabel .navicons{opacity:0}.slabel:hover .navicons,.slabel.active .navicons{opacity:1!important}.dropdown-toggle:after{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i2$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i2$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i2$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i2$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: ModelListSorterComponent, selector: "data-model-list-sorter", inputs: ["list", "field"] }] });
|
|
1649
1670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ModelListFieldHeaderComponent, decorators: [{
|
|
1650
1671
|
type: Component,
|
|
1651
|
-
args: [{ selector: 'data-model-list-field-header', standalone: true, imports: [CommonModule, NgbDropdownModule, ModelListSorterComponent], template: "\n<ng-template #label><span #ref>\n <ng-content></ng-content></span><span *ngIf=\"!ref.children.length\">{{list.fields.get(field)?.label||field}}</span></ng-template>\n<div class=\"d-flex flex-row justify-content-between align-items-end slabel\"
|
|
1672
|
+
args: [{ selector: 'data-model-list-field-header', standalone: true, imports: [CommonModule, NgbDropdownModule, ModelListSorterComponent], template: "\n<ng-template #label><span #ref>\n <ng-content></ng-content></span><span *ngIf=\"!ref.children.length\">{{list.fields.get(field)?.label||field}}</span></ng-template>\n<div class=\"d-flex flex-row justify-content-between align-items-end slabel\">\n <div class=\"flex-grow-1\">\n <data-model-list-sorter [list]=\"list\" [field]=\"sortField||field\" *ngIf=\"sort && dispSortMode==='side'\">\n <ng-container *ngTemplateOutlet=\"label\"></ng-container>\n </data-model-list-sorter>\n <ng-container *ngIf=\"!sort || dispSortMode==='hide'\">\n <ng-container *ngTemplateOutlet=\"label\"></ng-container>\n </ng-container>\n </div>\n <div class=\"navicons d-flex flex-row\" [attr.aria-label]=\"'Gestion champs'\" *ngIf=\"dispMenuMode==='side'\"><i class=\"bi bi-caret-left-fill\" role=\"button\" (click)=\"list.fields.move(field, 'before')\" aria-label=\"D\u00E9placer vers la gauche\"></i>\n <div ngbDropdown #mnu=\"ngbDropdown\" [container]=\"'body'\"><i class=\"bi bi-record\" ngbDropdownToggle aria-label=\"Ouvrir la boite de dialogue des champs\" role=\"button\"></i>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"disable()\"><i class=\"bi bi-trash me-2\"></i>Supprimer</button>\n <h6 class=\"dropdown-header\">Ajouter une colonne apr\u00E8s</h6>\n <ng-container *ngFor=\"let f of list.fields.fields|async\">\n <ng-container *ngIf=\"f.allowed && !f.enabled\">\n <button ngbDropdownItem (click)=\"enable(f)\" [attr.aria-label]=\"f.label||f.name\"><i class=\"bi bi-plus-circle me-2\"></i>{{f.label||f.name}}</button>\n </ng-container>\n </ng-container>\n </div>\n </div><i class=\"bi bi-caret-right-fill\" role=\"button\" (click)=\"list.fields.move(field, 'after')\" aria-label=\"D\u00E9placer vers la droite\"></i>\n </div>\n</div>", styles: [".slabel .navicons{opacity:0}.slabel:hover .navicons,.slabel.active .navicons{opacity:1!important}.dropdown-toggle:after{display:none!important}\n"] }]
|
|
1652
1673
|
}], ctorParameters: function () { return []; }, propDecorators: { list: [{
|
|
1653
1674
|
type: Input
|
|
1654
1675
|
}], field: [{
|
|
@@ -1657,6 +1678,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
|
|
|
1657
1678
|
type: Input
|
|
1658
1679
|
}], sortField: [{
|
|
1659
1680
|
type: Input
|
|
1681
|
+
}], menuMode: [{
|
|
1682
|
+
type: Input
|
|
1683
|
+
}], sortMode: [{
|
|
1684
|
+
type: Input
|
|
1685
|
+
}], display: [{
|
|
1686
|
+
type: Input
|
|
1687
|
+
}], mnu: [{
|
|
1688
|
+
type: ViewChild,
|
|
1689
|
+
args: ['mnu', { static: false }]
|
|
1660
1690
|
}] } });
|
|
1661
1691
|
|
|
1662
1692
|
class ModelListFiltersSelectComponent {
|
|
@@ -5389,6 +5419,9 @@ let AuthServiceBase = class AuthServiceBase {
|
|
|
5389
5419
|
}
|
|
5390
5420
|
get currentUser$() {
|
|
5391
5421
|
// Needs refresh ?
|
|
5422
|
+
if (this.isAnonymous) {
|
|
5423
|
+
return of(null);
|
|
5424
|
+
}
|
|
5392
5425
|
if (!this._fetched ||
|
|
5393
5426
|
Date.now() - this._fetched >
|
|
5394
5427
|
(this._params.userFetchValiditySeconds || 3600) * 1000) {
|