@smartsoft001/crud-shell-angular 1.1.753 → 1.1.756
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/+state/crud.actions.mjs +9 -1
- package/esm2020/lib/+state/crud.facade.mjs +4 -1
- package/esm2020/lib/+state/crud.reducer.mjs +3 -1
- package/esm2020/lib/pages/list/list.component.mjs +6 -1
- package/fesm2015/smartsoft001-crud-shell-angular.mjs +19 -1
- package/fesm2015/smartsoft001-crud-shell-angular.mjs.map +1 -1
- package/fesm2020/smartsoft001-crud-shell-angular.mjs +18 -1
- package/fesm2020/smartsoft001-crud-shell-angular.mjs.map +1 -1
- package/lib/+state/crud.actions.d.ts +1 -0
- package/lib/+state/crud.actions.d.ts.map +1 -1
- package/lib/+state/crud.facade.d.ts +1 -0
- package/lib/+state/crud.facade.d.ts.map +1 -1
- package/lib/+state/crud.reducer.d.ts.map +1 -1
- package/lib/pages/list/list.component.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -118,6 +118,14 @@ const readFailure = function (entity, filter, error) {
|
|
|
118
118
|
error
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
|
+
/*
|
|
122
|
+
* Clear
|
|
123
|
+
*/
|
|
124
|
+
const clear = function (entity) {
|
|
125
|
+
return {
|
|
126
|
+
type: `[${entity}] Clear`
|
|
127
|
+
};
|
|
128
|
+
};
|
|
121
129
|
/*
|
|
122
130
|
* Export
|
|
123
131
|
*/
|
|
@@ -309,6 +317,9 @@ class CrudFacade {
|
|
|
309
317
|
};
|
|
310
318
|
this.store.dispatch(read(this.config.entity, fullFilter));
|
|
311
319
|
}
|
|
320
|
+
clear() {
|
|
321
|
+
this.store.dispatch(clear(this.config.entity));
|
|
322
|
+
}
|
|
312
323
|
select(id) {
|
|
313
324
|
this.store.dispatch(select(this.config.entity, id));
|
|
314
325
|
}
|
|
@@ -1598,6 +1609,8 @@ const crudReducer = (state = initialState, action, entity) => {
|
|
|
1598
1609
|
links: action.result.links,
|
|
1599
1610
|
error: null
|
|
1600
1611
|
};
|
|
1612
|
+
case `[${entity}] Clear`:
|
|
1613
|
+
return { ...initialState };
|
|
1601
1614
|
case `[${entity}] Read Failure`:
|
|
1602
1615
|
return {
|
|
1603
1616
|
...state,
|
|
@@ -1861,6 +1874,7 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
|
|
|
1861
1874
|
}
|
|
1862
1875
|
async ngOnInit() {
|
|
1863
1876
|
await this.pageService.checkPermissions();
|
|
1877
|
+
const options = getModelOptions(this.config.type);
|
|
1864
1878
|
let newFilter = null;
|
|
1865
1879
|
if (this.config.list?.resetQuery === 'beforeInit') {
|
|
1866
1880
|
newFilter = {
|
|
@@ -1996,6 +2010,9 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
|
|
|
1996
2010
|
? {
|
|
1997
2011
|
provider: {
|
|
1998
2012
|
invoke: (id) => this.facade.delete(id),
|
|
2013
|
+
check: (item) => {
|
|
2014
|
+
return options?.remove?.enabled ? SpecificationService.valid(item, options?.remove?.enabled) : true;
|
|
2015
|
+
}
|
|
1999
2016
|
},
|
|
2000
2017
|
}
|
|
2001
2018
|
: null,
|
|
@@ -2742,5 +2759,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2742
2759
|
* Generated bundle index. Do not edit.
|
|
2743
2760
|
*/
|
|
2744
2761
|
|
|
2745
|
-
export { CRUD_MODEL_POSSIBILITIES_PROVIDER, CrudComponentsModule, CrudConfig, CrudCoreModule, CrudEffects, CrudFacade, CrudFullConfig, CrudFullModule, CrudItemPageBaseComponent, CrudListPageBaseComponent, CrudListPaginationFactory, CrudModule, CrudPipesModule, CrudSearchService, CrudService, ExportComponent, FilterCheckComponent, FilterComponent, FilterDateComponent, FilterDateWithEditComponent, FilterFlagComponent, FilterIntComponent, FilterRadioComponent, FilterTextComponent, FiltersComponent, FiltersConfigComponent, FormOptionsPipe, GroupComponent, ICrudModelPossibilitiesProvider, ItemComponent, ItemStandardComponent, ListComponent, ListStandardComponent, MultiselectComponent, PAGES, PageService, create, createFailure, createMany, createManyFailure, createManySuccess, createSuccess, deleteFailure, deleteItem, deleteSuccess, exportList, exportListFailure, exportListSuccess, getCrudError, getCrudFilter, getCrudLinks, getCrudList, getCrudLoaded, getCrudMultiSelected, getCrudSelected, getCrudState, getCrudTotalCount, getReducer, initialState, multiSelect, read, readFailure, readSuccess, select, selectFailure, selectSuccess, unselect, update, updateFailure, updatePartial, updatePartialFailure, updatePartialMany, updatePartialManyFailure, updatePartialManySuccess, updatePartialSuccess, updateSuccess };
|
|
2762
|
+
export { CRUD_MODEL_POSSIBILITIES_PROVIDER, CrudComponentsModule, CrudConfig, CrudCoreModule, CrudEffects, CrudFacade, CrudFullConfig, CrudFullModule, CrudItemPageBaseComponent, CrudListPageBaseComponent, CrudListPaginationFactory, CrudModule, CrudPipesModule, CrudSearchService, CrudService, ExportComponent, FilterCheckComponent, FilterComponent, FilterDateComponent, FilterDateWithEditComponent, FilterFlagComponent, FilterIntComponent, FilterRadioComponent, FilterTextComponent, FiltersComponent, FiltersConfigComponent, FormOptionsPipe, GroupComponent, ICrudModelPossibilitiesProvider, ItemComponent, ItemStandardComponent, ListComponent, ListStandardComponent, MultiselectComponent, PAGES, PageService, clear, create, createFailure, createMany, createManyFailure, createManySuccess, createSuccess, deleteFailure, deleteItem, deleteSuccess, exportList, exportListFailure, exportListSuccess, getCrudError, getCrudFilter, getCrudLinks, getCrudList, getCrudLoaded, getCrudMultiSelected, getCrudSelected, getCrudState, getCrudTotalCount, getReducer, initialState, multiSelect, read, readFailure, readSuccess, select, selectFailure, selectSuccess, unselect, update, updateFailure, updatePartial, updatePartialFailure, updatePartialMany, updatePartialManyFailure, updatePartialManySuccess, updatePartialSuccess, updateSuccess };
|
|
2746
2763
|
//# sourceMappingURL=smartsoft001-crud-shell-angular.mjs.map
|