@mediusinc/mng-commons 0.2.23 → 0.3.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/esm2020/lib/api/models/filter-param.model.mjs +1 -2
- package/esm2020/lib/api/models/mappers.mjs +2 -6
- package/esm2020/lib/api/models/query-mode.model.mjs +1 -2
- package/esm2020/lib/api/models/query-param.model.mjs +1 -2
- package/esm2020/lib/api/models/query-result.model.mjs +6 -34
- package/esm2020/lib/api/services/api.abstract.service.mjs +34 -0
- package/esm2020/lib/api/services/crud-api.abstract.service.mjs +15 -32
- package/esm2020/lib/api/services/get-all-api.abstract.service.mjs +23 -0
- package/esm2020/lib/api/services/index.mjs +3 -1
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +3 -3
- package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +22 -4
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -1
- package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
- package/esm2020/lib/descriptors/editor.descriptor.mjs +11 -12
- package/esm2020/lib/descriptors/table.descriptor.mjs +4 -1
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +5 -5
- package/esm2020/lib/pipes/enum.pipe.mjs +4 -1
- package/fesm2015/mediusinc-mng-commons.mjs +108 -82
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +108 -82
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/models/query-result.model.d.ts +4 -17
- package/lib/api/services/api.abstract.service.d.ts +19 -0
- package/lib/api/services/crud-api.abstract.service.d.ts +3 -11
- package/lib/api/services/get-all-api.abstract.service.d.ts +11 -0
- package/lib/api/services/index.d.ts +2 -0
- package/lib/components/tableview/route/tableview-route.component.d.ts +4 -1
- package/lib/descriptors/editor.descriptor.d.ts +4 -6
- package/lib/descriptors/tableview.descriptor.d.ts +2 -2
- package/package.json +1 -1
- /package/{assets/templates → templates}/tableview-route.component.html +0 -0
|
@@ -169,7 +169,6 @@ var MediusFilterMatchType;
|
|
|
169
169
|
MediusFilterMatchType["GreaterThan"] = "GREATER_THAN";
|
|
170
170
|
})(MediusFilterMatchType || (MediusFilterMatchType = {}));
|
|
171
171
|
|
|
172
|
-
/* tslint:disable:no-angle-bracket-type-assertion no-trailing-whitespace member-ordering object-literal-key-quotes */
|
|
173
172
|
class MediusFilterParam {
|
|
174
173
|
static getAttributeTypeMap() {
|
|
175
174
|
return MediusFilterParam.attributeTypeMap;
|
|
@@ -203,7 +202,6 @@ MediusFilterParam.attributeTypeMap = [
|
|
|
203
202
|
}
|
|
204
203
|
];
|
|
205
204
|
|
|
206
|
-
/* tslint:disable:no-angle-bracket-type-assertion no-trailing-whitespace member-ordering object-literal-key-quotes */
|
|
207
205
|
/**
|
|
208
206
|
* Generated API
|
|
209
207
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -222,7 +220,6 @@ var MediusQueryMode;
|
|
|
222
220
|
MediusQueryMode["All"] = "ALL";
|
|
223
221
|
})(MediusQueryMode || (MediusQueryMode = {}));
|
|
224
222
|
|
|
225
|
-
/* tslint:disable:no-angle-bracket-type-assertion no-trailing-whitespace member-ordering object-literal-key-quotes */
|
|
226
223
|
class MediusQueryParam {
|
|
227
224
|
static getAttributeTypeMap() {
|
|
228
225
|
return MediusQueryParam.attributeTypeMap;
|
|
@@ -291,45 +288,17 @@ MediusQueryParam.attributeTypeMap = [
|
|
|
291
288
|
}
|
|
292
289
|
];
|
|
293
290
|
|
|
294
|
-
|
|
295
|
-
|
|
291
|
+
class MediusQueryResult {
|
|
292
|
+
static getAttributeTypeMap() {
|
|
293
|
+
return MediusQueryResult.attributeTypeMap;
|
|
294
|
+
}
|
|
296
295
|
}
|
|
297
|
-
|
|
298
|
-
MediusQueryResultBase.attributeTypeMap = [
|
|
296
|
+
MediusQueryResult.attributeTypeMap = [
|
|
299
297
|
{
|
|
300
298
|
name: 'allDataCount',
|
|
301
299
|
baseName: 'all_data_count',
|
|
302
300
|
type: 'number'
|
|
303
301
|
},
|
|
304
|
-
{
|
|
305
|
-
name: 'selectInTwoSteps',
|
|
306
|
-
baseName: 'selectInTwoSteps',
|
|
307
|
-
type: 'boolean'
|
|
308
|
-
}
|
|
309
|
-
];
|
|
310
|
-
class MediusQueryResultWithObject extends MediusQueryResultBase {
|
|
311
|
-
static getAttributeTypeMap() {
|
|
312
|
-
return MediusQueryResultWithObject.attributeTypeMap;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
MediusQueryResultWithObject.discriminator = undefined;
|
|
316
|
-
MediusQueryResultWithObject.attributeTypeMap = [
|
|
317
|
-
...MediusQueryResultBase.attributeTypeMap,
|
|
318
|
-
{
|
|
319
|
-
name: 'pageData',
|
|
320
|
-
baseName: 'page_data',
|
|
321
|
-
type: 'Array<object>'
|
|
322
|
-
}
|
|
323
|
-
];
|
|
324
|
-
class MediusQueryResult extends MediusQueryResultBase {
|
|
325
|
-
static getAttributeTypeMap() {
|
|
326
|
-
return MediusQueryResultWithObject.attributeTypeMap;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
MediusQueryResult.discriminator = undefined;
|
|
330
|
-
MediusQueryResult.attributeTypeMapBase = MediusQueryResultBase.attributeTypeMap;
|
|
331
|
-
MediusQueryResult.attributeTypeMap = [
|
|
332
|
-
...MediusQueryResultBase.attributeTypeMap,
|
|
333
302
|
{
|
|
334
303
|
name: 'pageData',
|
|
335
304
|
baseName: 'page_data',
|
|
@@ -384,16 +353,13 @@ class MediusQueryParamBuilder {
|
|
|
384
353
|
}
|
|
385
354
|
}
|
|
386
355
|
|
|
387
|
-
/* tslint:disable:no-angle-bracket-type-assertion no-trailing-whitespace member-ordering object-literal-key-quotes */
|
|
388
356
|
const enumsMapBase = {
|
|
389
357
|
FilterMatchType: MediusFilterMatchType,
|
|
390
358
|
QueryMode: MediusQueryMode
|
|
391
359
|
};
|
|
392
360
|
const typeMapBase = {
|
|
393
361
|
FilterParam: MediusFilterParam,
|
|
394
|
-
QueryParam: MediusQueryParam
|
|
395
|
-
QueryResult: MediusQueryResult,
|
|
396
|
-
QueryResultWithObject: MediusQueryResultWithObject
|
|
362
|
+
QueryParam: MediusQueryParam
|
|
397
363
|
};
|
|
398
364
|
|
|
399
365
|
class TableDataProvider extends DataProvider {
|
|
@@ -1030,13 +996,13 @@ class EditorDescriptor {
|
|
|
1030
996
|
this.addFieldDescriptor(field);
|
|
1031
997
|
return field;
|
|
1032
998
|
}
|
|
1033
|
-
addFieldManyEditor(property,
|
|
1034
|
-
const field = new FieldManyEditorDescriptor(this, property,
|
|
999
|
+
addFieldManyEditor(property, tableviewDescriptor) {
|
|
1000
|
+
const field = new FieldManyEditorDescriptor(this, property, tableviewDescriptor);
|
|
1035
1001
|
this.addFieldDescriptor(field);
|
|
1036
1002
|
return field;
|
|
1037
1003
|
}
|
|
1038
|
-
addFieldManyToManyEditor(property,
|
|
1039
|
-
const field = new FieldManyToManyEditorDescriptor(this, property,
|
|
1004
|
+
addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor) {
|
|
1005
|
+
const field = new FieldManyToManyEditorDescriptor(this, property, mainTableDescriptor, lookupTableDescriptor);
|
|
1040
1006
|
this.addFieldDescriptor(field);
|
|
1041
1007
|
return field;
|
|
1042
1008
|
}
|
|
@@ -1605,7 +1571,7 @@ class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
|
1605
1571
|
}
|
|
1606
1572
|
}
|
|
1607
1573
|
class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
1608
|
-
constructor(editor, property,
|
|
1574
|
+
constructor(editor, property, mainTableDescriptor, lookupTableDescriptor) {
|
|
1609
1575
|
super(editor, property);
|
|
1610
1576
|
this._fieldType = FieldManyToManyEditorDescriptor.TypeEnum.DialogTableMultiselect;
|
|
1611
1577
|
this._lookupTableDataProvider = null;
|
|
@@ -1613,7 +1579,6 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
1613
1579
|
this._hasLookupExcludeValues = false;
|
|
1614
1580
|
this._excludeFilterProperty = '';
|
|
1615
1581
|
this._excludeValueProperty = '';
|
|
1616
|
-
this._model = new ModelDescriptor(modelType);
|
|
1617
1582
|
this._mainTableDescriptor = mainTableDescriptor;
|
|
1618
1583
|
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
1619
1584
|
this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);
|
|
@@ -1643,7 +1608,7 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
1643
1608
|
return this._lookupTableDescriptor;
|
|
1644
1609
|
}
|
|
1645
1610
|
withLookup(getAll, serviceType) {
|
|
1646
|
-
const dataProvider = new TableviewDataProvider(this.
|
|
1611
|
+
const dataProvider = new TableviewDataProvider(this._mainTableDescriptor.model.type);
|
|
1647
1612
|
if (serviceType) {
|
|
1648
1613
|
dataProvider.withServiceType(serviceType);
|
|
1649
1614
|
}
|
|
@@ -1666,7 +1631,7 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
1666
1631
|
return this;
|
|
1667
1632
|
}
|
|
1668
1633
|
copy() {
|
|
1669
|
-
const field = new FieldManyToManyEditorDescriptor(this._editor, this._property, this.
|
|
1634
|
+
const field = new FieldManyToManyEditorDescriptor(this._editor, this._property, this._mainTableDescriptor.copy(), this._lookupTableDescriptor.copy());
|
|
1670
1635
|
this.copyFieldsTo(field);
|
|
1671
1636
|
field._fieldType = this._fieldType;
|
|
1672
1637
|
field._actions = this._actions.map(a => a);
|
|
@@ -1689,12 +1654,12 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
1689
1654
|
})(ActionEnum = FieldManyToManyEditorDescriptor.ActionEnum || (FieldManyToManyEditorDescriptor.ActionEnum = {}));
|
|
1690
1655
|
})(FieldManyToManyEditorDescriptor || (FieldManyToManyEditorDescriptor = {}));
|
|
1691
1656
|
class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
1692
|
-
constructor(editor, property,
|
|
1657
|
+
constructor(editor, property, tableviewDescriptor) {
|
|
1693
1658
|
super(editor, property);
|
|
1694
1659
|
this._fieldType = FieldManyEditorDescriptor.TypeEnum.DialogEditor;
|
|
1695
1660
|
this._fieldActions = [];
|
|
1696
1661
|
this._actions = [];
|
|
1697
|
-
this._modelType = modelType;
|
|
1662
|
+
// this._modelType = modelType;
|
|
1698
1663
|
this._tableviewDescriptor = tableviewDescriptor;
|
|
1699
1664
|
this._fieldActions.push(FieldManyEditorDescriptor.ActionEnum.View, FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
|
|
1700
1665
|
}
|
|
@@ -1735,7 +1700,7 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
|
1735
1700
|
return this;
|
|
1736
1701
|
}
|
|
1737
1702
|
copy() {
|
|
1738
|
-
const field = new FieldManyEditorDescriptor(this._editor, this._property, this.
|
|
1703
|
+
const field = new FieldManyEditorDescriptor(this._editor, this._property, this._tableviewDescriptor.copy());
|
|
1739
1704
|
this.copyFieldsTo(field);
|
|
1740
1705
|
field._fieldType = this._fieldType;
|
|
1741
1706
|
field._fieldActions = this._fieldActions.map(a => a);
|
|
@@ -2189,6 +2154,9 @@ class ColumnDescriptor {
|
|
|
2189
2154
|
descriptor._isSortEnabled = this._isSortEnabled;
|
|
2190
2155
|
descriptor._columnType = this._columnType;
|
|
2191
2156
|
descriptor._filterDescriptor = (_a = this._filterDescriptor) === null || _a === void 0 ? void 0 : _a.copy();
|
|
2157
|
+
descriptor._enumType = this._enumType;
|
|
2158
|
+
descriptor._enumTitlePath = this._enumTitlePath;
|
|
2159
|
+
descriptor._enumNameAsValue = this._enumNameAsValue;
|
|
2192
2160
|
descriptor._booleanAsIcon = this._booleanAsIcon;
|
|
2193
2161
|
descriptor._booleanYes = this._booleanYes;
|
|
2194
2162
|
descriptor._booleanNo = this._booleanNo;
|
|
@@ -2533,14 +2501,14 @@ class TableviewDescriptor {
|
|
|
2533
2501
|
this._editEditor.addFieldDescriptor(field);
|
|
2534
2502
|
return field;
|
|
2535
2503
|
}
|
|
2536
|
-
addFieldManyEditor(property,
|
|
2537
|
-
const field = this._viewEditor.addFieldManyEditor(property,
|
|
2504
|
+
addFieldManyEditor(property, tableviewDescriptor) {
|
|
2505
|
+
const field = this._viewEditor.addFieldManyEditor(property, tableviewDescriptor);
|
|
2538
2506
|
this._addEditor.addFieldDescriptor(field);
|
|
2539
2507
|
this._editEditor.addFieldDescriptor(field);
|
|
2540
2508
|
return field;
|
|
2541
2509
|
}
|
|
2542
|
-
addFieldManyToManyEditor(property,
|
|
2543
|
-
const field = this._viewEditor.addFieldManyToManyEditor(property,
|
|
2510
|
+
addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor) {
|
|
2511
|
+
const field = this._viewEditor.addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor);
|
|
2544
2512
|
this._addEditor.addFieldDescriptor(field);
|
|
2545
2513
|
this._editEditor.addFieldDescriptor(field);
|
|
2546
2514
|
return field;
|
|
@@ -5224,13 +5192,13 @@ class MngActionEditorComponent {
|
|
|
5224
5192
|
// assign run operations
|
|
5225
5193
|
action.withRunNotificationSuccess(undefined, undefined, false);
|
|
5226
5194
|
if (action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit) {
|
|
5227
|
-
action.withRunFunction(
|
|
5195
|
+
action.withRunFunction(() => {
|
|
5228
5196
|
this.triggerSubmit();
|
|
5229
5197
|
return of(undefined);
|
|
5230
5198
|
});
|
|
5231
5199
|
}
|
|
5232
5200
|
else {
|
|
5233
|
-
action.withRunFunction(
|
|
5201
|
+
action.withRunFunction(() => {
|
|
5234
5202
|
this.cancel();
|
|
5235
5203
|
return of(undefined);
|
|
5236
5204
|
});
|
|
@@ -5587,6 +5555,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
5587
5555
|
|
|
5588
5556
|
class MngEnumPipe {
|
|
5589
5557
|
transform(value, enumObj, i18nPath, nameAsValue = false) {
|
|
5558
|
+
if (!value || !enumObj) {
|
|
5559
|
+
return value;
|
|
5560
|
+
}
|
|
5590
5561
|
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);
|
|
5591
5562
|
if (typeof i18nPath === 'undefined') {
|
|
5592
5563
|
i18nPath = TypeUtil.findEnumName(enumObj);
|
|
@@ -6070,12 +6041,18 @@ class MngTableviewRouteComponent extends AMngTableviewRouteComponent {
|
|
|
6070
6041
|
this.route = route;
|
|
6071
6042
|
}
|
|
6072
6043
|
createTableviewDescriptor() {
|
|
6044
|
+
if (this.descriptorInit) {
|
|
6045
|
+
return this.descriptorInit;
|
|
6046
|
+
}
|
|
6073
6047
|
if (!this.route.snapshot.data['tableviewData'].descriptor) {
|
|
6074
6048
|
throw Error('Tableview requires a descriptor.');
|
|
6075
6049
|
}
|
|
6076
6050
|
return this.route.snapshot.data['tableviewData'].descriptor;
|
|
6077
6051
|
}
|
|
6078
6052
|
createTableviewDataProvider() {
|
|
6053
|
+
if (this.dataProviderInit) {
|
|
6054
|
+
return this.dataProviderInit;
|
|
6055
|
+
}
|
|
6079
6056
|
if (!this.route.snapshot.data['tableviewData'].dataProvider) {
|
|
6080
6057
|
throw Error('Tableview requires a data provider.');
|
|
6081
6058
|
}
|
|
@@ -6083,15 +6060,27 @@ class MngTableviewRouteComponent extends AMngTableviewRouteComponent {
|
|
|
6083
6060
|
}
|
|
6084
6061
|
createActionDescriptors() {
|
|
6085
6062
|
var _a;
|
|
6063
|
+
if (this.actionsInit) {
|
|
6064
|
+
return this.actionsInit;
|
|
6065
|
+
}
|
|
6086
6066
|
return (_a = this.route.snapshot.data['tableviewData'].fieldActions) !== null && _a !== void 0 ? _a : super.createActionDescriptors();
|
|
6087
6067
|
}
|
|
6088
6068
|
}
|
|
6089
6069
|
MngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewRouteComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
6090
|
-
MngTableviewRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableviewRouteComponent, selector: "mng-tableview-route", usesInheritance: true, ngImport: i0, template: "<div class=\"grid\">\n <div class=\"col-12\">\n <mng-tableview [descriptor]=\"descriptor\" [dataProvider]=\"dataProvider\" [actions]=\"actions\"></mng-tableview>\n </div>\n</div>\n", components: [{ type: MngTableviewComponent, selector: "mng-tableview", inputs: ["descriptor", "dataProvider", "actions"] }] });
|
|
6070
|
+
MngTableviewRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableviewRouteComponent, selector: "mng-tableview-route", inputs: { descriptorInit: ["descriptor", "descriptorInit"], dataProviderInit: ["dataProvider", "dataProviderInit"], actionsInit: ["actions", "actionsInit"] }, usesInheritance: true, ngImport: i0, template: "<div class=\"grid\">\n <div class=\"col-12\">\n <mng-tableview [descriptor]=\"descriptor\" [dataProvider]=\"dataProvider\" [actions]=\"actions\"></mng-tableview>\n </div>\n</div>\n", components: [{ type: MngTableviewComponent, selector: "mng-tableview", inputs: ["descriptor", "dataProvider", "actions"] }] });
|
|
6091
6071
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewRouteComponent, decorators: [{
|
|
6092
6072
|
type: Component,
|
|
6093
6073
|
args: [{ selector: 'mng-tableview-route', template: "<div class=\"grid\">\n <div class=\"col-12\">\n <mng-tableview [descriptor]=\"descriptor\" [dataProvider]=\"dataProvider\" [actions]=\"actions\"></mng-tableview>\n </div>\n</div>\n" }]
|
|
6094
|
-
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }]; }
|
|
6074
|
+
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }]; }, propDecorators: { descriptorInit: [{
|
|
6075
|
+
type: Input,
|
|
6076
|
+
args: ['descriptor']
|
|
6077
|
+
}], dataProviderInit: [{
|
|
6078
|
+
type: Input,
|
|
6079
|
+
args: ['dataProvider']
|
|
6080
|
+
}], actionsInit: [{
|
|
6081
|
+
type: Input,
|
|
6082
|
+
args: ['actions']
|
|
6083
|
+
}] } });
|
|
6095
6084
|
|
|
6096
6085
|
class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
6097
6086
|
constructor(injector) {
|
|
@@ -7658,37 +7647,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
7658
7647
|
}]
|
|
7659
7648
|
}] });
|
|
7660
7649
|
|
|
7661
|
-
class
|
|
7662
|
-
constructor(type,
|
|
7650
|
+
class AMngApiService {
|
|
7651
|
+
constructor(type, http) {
|
|
7663
7652
|
this.type = type;
|
|
7664
|
-
this.queryResultType = queryResultType;
|
|
7665
7653
|
this.http = http;
|
|
7666
7654
|
this.objectSerializer = ObjectSerializer.get();
|
|
7667
7655
|
}
|
|
7668
|
-
|
|
7669
|
-
|
|
7656
|
+
getUrl(...pathSegments) {
|
|
7657
|
+
let path = pathSegments.join('/');
|
|
7658
|
+
if (!path.startsWith('/')) {
|
|
7659
|
+
path = path.substring(1);
|
|
7660
|
+
}
|
|
7661
|
+
return `${this.getBasePath()}${this.getServiceBasePath()}${path}`;
|
|
7662
|
+
}
|
|
7663
|
+
deserialize(item) {
|
|
7664
|
+
return this.deserializeClass(item, this.type);
|
|
7665
|
+
}
|
|
7666
|
+
serialize(item) {
|
|
7667
|
+
return this.serializeClass(item, this.type);
|
|
7668
|
+
}
|
|
7669
|
+
serializeQueryParam(queryParam, type = 'QueryParam') {
|
|
7670
|
+
return this.objectSerializer.serialize(queryParam, type);
|
|
7671
|
+
}
|
|
7672
|
+
deserializeQueryResult(item, qrType) {
|
|
7673
|
+
return this.deserializeClass(item, qrType);
|
|
7674
|
+
}
|
|
7675
|
+
deserializeClass(item, type) {
|
|
7676
|
+
return this.objectSerializer.deserializeClass(item, type);
|
|
7677
|
+
}
|
|
7678
|
+
serializeClass(item, type) {
|
|
7679
|
+
return this.objectSerializer.serializeClass(item, type);
|
|
7680
|
+
}
|
|
7681
|
+
}
|
|
7682
|
+
|
|
7683
|
+
class AMngGetAllApiService extends AMngApiService {
|
|
7684
|
+
constructor(type, queryResultType, http) {
|
|
7685
|
+
super(type, http);
|
|
7686
|
+
this.queryResultType = queryResultType;
|
|
7687
|
+
}
|
|
7688
|
+
getAllPost(queryParamBody, params) {
|
|
7689
|
+
const url = this.getUrl(this.getGetAllPostPath());
|
|
7670
7690
|
return this.http
|
|
7671
|
-
.post(url, this.
|
|
7691
|
+
.post(url, queryParamBody ? this.serializeQueryParam(queryParamBody) : undefined, {
|
|
7672
7692
|
withCredentials: true,
|
|
7673
7693
|
observe: 'body',
|
|
7674
7694
|
reportProgress: false,
|
|
7675
7695
|
params: params
|
|
7676
7696
|
})
|
|
7677
|
-
.pipe(map(res => this.
|
|
7697
|
+
.pipe(map(res => this.deserializeQueryResult(res, this.queryResultType)));
|
|
7678
7698
|
}
|
|
7679
|
-
|
|
7680
|
-
|
|
7699
|
+
getGetAllPostPath() {
|
|
7700
|
+
return '/get-all';
|
|
7701
|
+
}
|
|
7702
|
+
}
|
|
7703
|
+
|
|
7704
|
+
class AMngCrudApiService extends AMngGetAllApiService {
|
|
7705
|
+
constructor(type, queryResultType, http) {
|
|
7706
|
+
super(type, queryResultType, http);
|
|
7707
|
+
}
|
|
7708
|
+
createPost(item, params) {
|
|
7709
|
+
const url = this.getUrl(this.getCreatePostPath());
|
|
7681
7710
|
return this.http
|
|
7682
|
-
.post(url, this.
|
|
7711
|
+
.post(url, this.serialize(item), {
|
|
7683
7712
|
withCredentials: true,
|
|
7684
7713
|
observe: 'body',
|
|
7685
7714
|
reportProgress: false,
|
|
7686
7715
|
params: params
|
|
7687
7716
|
})
|
|
7688
|
-
.pipe(map(res => this.
|
|
7717
|
+
.pipe(map(res => this.deserialize(res)));
|
|
7689
7718
|
}
|
|
7690
7719
|
getByIdGet(id, params) {
|
|
7691
|
-
const url =
|
|
7720
|
+
const url = this.getUrl(this.getGetByIdGetPath(id));
|
|
7692
7721
|
return this.http
|
|
7693
7722
|
.get(url, {
|
|
7694
7723
|
withCredentials: true,
|
|
@@ -7696,33 +7725,30 @@ class AMngCrudApiService {
|
|
|
7696
7725
|
reportProgress: false,
|
|
7697
7726
|
params: params
|
|
7698
7727
|
})
|
|
7699
|
-
.pipe(map(res => this.
|
|
7728
|
+
.pipe(map(res => this.deserialize(res)));
|
|
7700
7729
|
}
|
|
7701
7730
|
updatePut(id, item, params) {
|
|
7702
|
-
const url =
|
|
7731
|
+
const url = this.getUrl(this.getUpdatePutPath(id, item));
|
|
7703
7732
|
return this.http
|
|
7704
|
-
.put(url, this.
|
|
7733
|
+
.put(url, this.serialize(item), {
|
|
7705
7734
|
withCredentials: true,
|
|
7706
7735
|
observe: 'body',
|
|
7707
7736
|
reportProgress: false,
|
|
7708
7737
|
params: params
|
|
7709
7738
|
})
|
|
7710
|
-
.pipe(map(res => this.
|
|
7739
|
+
.pipe(map(res => this.deserialize(res)));
|
|
7711
7740
|
}
|
|
7712
7741
|
removeDelete(id, item, params) {
|
|
7713
|
-
const url =
|
|
7742
|
+
const url = this.getUrl(this.getRemoveDeletePath(id, item));
|
|
7714
7743
|
return this.http
|
|
7715
7744
|
.request('delete', url, {
|
|
7716
7745
|
withCredentials: true,
|
|
7717
7746
|
observe: 'body',
|
|
7718
7747
|
reportProgress: false,
|
|
7719
|
-
body: item ? this.
|
|
7748
|
+
body: item ? this.serialize(item) : undefined,
|
|
7720
7749
|
params: params
|
|
7721
7750
|
})
|
|
7722
|
-
.pipe(map(res => this.
|
|
7723
|
-
}
|
|
7724
|
-
getGetAllPostPath() {
|
|
7725
|
-
return '/get-all';
|
|
7751
|
+
.pipe(map(res => this.deserialize(res)));
|
|
7726
7752
|
}
|
|
7727
7753
|
getCreatePostPath() {
|
|
7728
7754
|
return '';
|
|
@@ -8202,5 +8228,5 @@ class RouteDataBuilder {
|
|
|
8202
8228
|
* Generated bundle index. Do not edit.
|
|
8203
8229
|
*/
|
|
8204
8230
|
|
|
8205
|
-
export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult,
|
|
8231
|
+
export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngPropertyPathPipe, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, ObjectSerializer, RouteBuilder, RouteDataBuilder, RoutesBuilder, TableDataProvider, TableDescriptor, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
|
|
8206
8232
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|