@mediusinc/mng-commons 0.2.13 → 0.2.16

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.
Files changed (25) hide show
  1. package/esm2020/lib/api/models/filter-match-type.model.mjs +11 -12
  2. package/esm2020/lib/api/models/filter-param.model.mjs +11 -12
  3. package/esm2020/lib/api/models/query-mode.model.mjs +4 -4
  4. package/esm2020/lib/api/models/query-param.model.mjs +29 -30
  5. package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +1 -4
  6. package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +11 -11
  7. package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  8. package/esm2020/lib/components/layout/main-layout.component.mjs +1 -3
  9. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -1
  10. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +5 -3
  11. package/esm2020/lib/descriptors/editor.descriptor.mjs +1 -2
  12. package/esm2020/lib/descriptors/table.descriptor.mjs +1 -2
  13. package/fesm2015/mediusinc-mng-commons.mjs +85 -96
  14. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  15. package/fesm2020/mediusinc-mng-commons.mjs +85 -95
  16. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  17. package/lib/api/models/filter-match-type.model.d.ts +10 -10
  18. package/lib/api/models/filter-param.model.d.ts +7 -7
  19. package/lib/api/models/query-mode.model.d.ts +3 -3
  20. package/lib/api/models/query-param.model.d.ts +14 -14
  21. package/lib/components/form/dropdown/dropdown.component.d.ts +4 -1
  22. package/lib/components/layout/main-layout.component.d.ts +2 -3
  23. package/openapi/templates/model.mustache +82 -0
  24. package/openapi/templates/models.mustache +50 -0
  25. package/package.json +1 -1
@@ -10,14 +10,14 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export declare enum MediusFilterMatchType {
13
- Equals,
14
- NotEquals,
15
- Contains,
16
- EndsWith,
17
- StartsWith,
18
- FromTo,
19
- SmallerThan,
20
- GreaterThan,
21
- In,
22
- NotIn
13
+ Equals = "EQUALS",
14
+ NotEquals = "NOT_EQUALS",
15
+ FromTo = "FROM_TO",
16
+ Contains = "CONTAINS",
17
+ StartsWith = "STARTS_WITH",
18
+ EndsWith = "ENDS_WITH",
19
+ In = "IN",
20
+ NotIn = "NOT_IN",
21
+ SmallerThan = "SMALLER_THAN",
22
+ GreaterThan = "GREATER_THAN"
23
23
  }
@@ -9,15 +9,15 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { MediusFilterMatchType } from './filter-match-type.model';
13
12
  import { AttributeDef } from './serialization.model';
13
+ import { MediusFilterMatchType } from './filter-match-type.model';
14
14
  export declare class MediusFilterParam {
15
- 'property'?: string;
16
- 'filterMatchCaseSensitive'?: boolean;
17
- 'filterMatchType'?: MediusFilterMatchType;
18
- 'filterValue'?: object;
19
- 'filterValueTo'?: object;
20
- static discriminator: string | undefined;
15
+ property?: string;
16
+ filterValue?: object;
17
+ filterValueTo?: object;
18
+ filterMatchType?: MediusFilterMatchType;
19
+ filterMatchCaseSensitive?: boolean;
20
+ static discriminator?: string;
21
21
  static attributeTypeMap: Array<AttributeDef>;
22
22
  static getAttributeTypeMap(): AttributeDef[];
23
23
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export declare enum MediusQueryMode {
13
- All,
14
- Count,
15
- Data
13
+ Count = "COUNT",
14
+ Data = "DATA",
15
+ All = "ALL"
16
16
  }
@@ -9,23 +9,23 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { AttributeDef } from './serialization.model';
12
13
  import { MediusFilterParam } from './filter-param.model';
13
14
  import { MediusQueryMode } from './query-mode.model';
14
- import { AttributeDef } from './serialization.model';
15
15
  export declare class MediusQueryParam {
16
- 'filterAllParam'?: string;
17
- 'filterAllProperties'?: Array<string>;
18
- 'filterParams'?: Array<MediusFilterParam>;
19
- 'groupByProperties'?: Array<string>;
20
- 'itemsOffset': number;
21
- 'itemsPerPage': number;
22
- 'queryMode'?: MediusQueryMode;
23
- 'selectInTwoSteps'?: boolean;
24
- 'sortAsc'?: Array<boolean>;
25
- 'sortEnumByOrdinal'?: boolean;
26
- 'sortProperty'?: Array<string>;
27
- 'validateProperties'?: Array<string>;
28
- static discriminator: string | undefined;
16
+ sortProperty?: Array<string>;
17
+ sortAsc?: Array<boolean>;
18
+ itemsOffset?: number;
19
+ itemsPerPage?: number;
20
+ filterParams?: Array<MediusFilterParam>;
21
+ filterAllParam?: string;
22
+ filterAllProperties?: Array<string>;
23
+ validateProperties?: Array<string>;
24
+ selectInTwoSteps?: boolean;
25
+ sortEnumByOrdinal?: boolean;
26
+ groupByProperties?: Array<string>;
27
+ queryMode?: MediusQueryMode;
28
+ static discriminator?: string;
29
29
  static attributeTypeMap: Array<AttributeDef>;
30
30
  static getAttributeTypeMap(): AttributeDef[];
31
31
  }
@@ -14,6 +14,7 @@ export declare class MngDropdownComponent implements OnInit, ControlValueAccesso
14
14
  multiselect: boolean;
15
15
  placeholder?: string;
16
16
  showClear: boolean;
17
+ selectFirstItem: boolean;
17
18
  className: string | null;
18
19
  dropdownClassName: string | null;
19
20
  valueChangeEventEmitter: EventEmitter<any>;
@@ -24,6 +25,8 @@ export declare class MngDropdownComponent implements OnInit, ControlValueAccesso
24
25
  private onTouchedFn;
25
26
  dropdownFormControl: FormControl;
26
27
  items$: Observable<Array<any>>;
28
+ items: Array<any>;
29
+ itemsLoaded: boolean;
27
30
  constructor(injector: Injector);
28
31
  ngOnInit(): void;
29
32
  registerOnChange(fn: any): void;
@@ -31,5 +34,5 @@ export declare class MngDropdownComponent implements OnInit, ControlValueAccesso
31
34
  setDisabledState(isDisabled: boolean): void;
32
35
  writeValue(obj: any): void;
33
36
  static ɵfac: i0.ɵɵFactoryDeclaration<MngDropdownComponent, never>;
34
- static ɵcmp: i0.ɵɵComponentDeclaration<MngDropdownComponent, "mng-dropdown", never, { "dataProvider": "dataProvider"; "dataKeyProperty": "dataKeyProperty"; "itemsLabelProperty": "itemsLabelProperty"; "itemsValueProperty": "itemsValueProperty"; "multiselect": "multiselect"; "placeholder": "placeholder"; "showClear": "showClear"; "className": "className"; "dropdownClassName": "dropdownClassName"; }, { "valueChangeEventEmitter": "valueChange"; }, never, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<MngDropdownComponent, "mng-dropdown", never, { "dataProvider": "dataProvider"; "dataKeyProperty": "dataKeyProperty"; "itemsLabelProperty": "itemsLabelProperty"; "itemsValueProperty": "itemsValueProperty"; "multiselect": "multiselect"; "placeholder": "placeholder"; "showClear": "showClear"; "selectFirstItem": "selectFirstItem"; "className": "className"; "dropdownClassName": "dropdownClassName"; }, { "valueChangeEventEmitter": "valueChange"; }, never, never>;
35
38
  }
@@ -1,10 +1,10 @@
1
- import { AfterViewInit, OnInit, QueryList, Type } from '@angular/core';
1
+ import { OnInit, QueryList, Type } from '@angular/core';
2
2
  import { ActivatedRoute } from '@angular/router';
3
3
  import { MngTemplateDirective } from '../../directives';
4
4
  import { MngCommonsService } from '../../services';
5
5
  import { MngMainLayoutComponentService } from './services';
6
6
  import * as i0 from "@angular/core";
7
- export declare class MngMainLayoutComponent implements OnInit, AfterViewInit {
7
+ export declare class MngMainLayoutComponent implements OnInit {
8
8
  private route;
9
9
  mngCommons: MngCommonsService;
10
10
  mainLayoutService: MngMainLayoutComponentService;
@@ -14,7 +14,6 @@ export declare class MngMainLayoutComponent implements OnInit, AfterViewInit {
14
14
  footerComponent: Type<any>;
15
15
  constructor(route: ActivatedRoute, mngCommons: MngCommonsService, mainLayoutService: MngMainLayoutComponentService);
16
16
  ngOnInit(): void;
17
- ngAfterViewInit(): void;
18
17
  onWindowResize(event: UIEvent): void;
19
18
  static ɵfac: i0.ɵɵFactoryDeclaration<MngMainLayoutComponent, never>;
20
19
  static ɵcmp: i0.ɵɵComponentDeclaration<MngMainLayoutComponent, "mng-main-layout", never, {}, {}, never, never>;
@@ -0,0 +1,82 @@
1
+ {{>licenseInfo}}
2
+ import {AttributeDef} from '@mediusinc/mng-commons';
3
+ {{#models}}
4
+ {{#model}}
5
+ {{#tsImports}}
6
+ {{=<% %>=}}
7
+ import {<%classname%>} from '<%filename%>';
8
+ <%={{ }}=%>
9
+ {{/tsImports}}
10
+ {{#description}}
11
+ /**
12
+ * {{{.}}}
13
+ */
14
+ {{/description}}
15
+ {{^isEnum}}
16
+ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
17
+ {{#vars}}
18
+ {{#description}}
19
+ /**
20
+ * {{{.}}}
21
+ */
22
+ {{/description}}
23
+ {{name}}?: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}}|null{{/isNullable}}{{/isEnum}}{{#jsonSchema.default}} = {{{.}}}{{/jsonSchema.default}}{{^jsonSchema.default}}{{#isNullable}} = null{{/isNullable}}{{/jsonSchema.default}};
24
+ {{/vars}}
25
+
26
+ {{#discriminator}}
27
+ public static discriminator?: string = '{{discriminatorName}}';
28
+ {{/discriminator}}
29
+ {{^discriminator}}
30
+ public static discriminator?: string;
31
+ {{/discriminator}}
32
+
33
+ {{^isArray}}
34
+ public static attributeTypeMap: Array<AttributeDef> = [
35
+ {{#vars}}
36
+ {
37
+ name: '{{name}}',
38
+ baseName: '{{baseName}}',
39
+ type: '{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}'
40
+ }{{^-last}},
41
+ {{/-last}}
42
+ {{/vars}}
43
+
44
+ ];
45
+
46
+ public static getAttributeTypeMap() {
47
+ {{#parent}}
48
+ return super.getAttributeTypeMap().concat({{classname}}.attributeTypeMap);
49
+ {{/parent}}
50
+ {{^parent}}
51
+ return {{classname}}.attributeTypeMap;
52
+ {{/parent}}
53
+ }
54
+ {{/isArray}}
55
+ }
56
+ {{#hasEnums}}
57
+ export namespace {{classname}} {
58
+ {{#vars}}
59
+ {{#isEnum}}
60
+ export enum {{enumName}} {
61
+ {{#allowableValues}}
62
+ {{#enumVars}}
63
+ {{name}} = {{{value}}}{{^-last}},{{/-last}}
64
+ {{/enumVars}}
65
+ {{/allowableValues}}
66
+ }
67
+ {{/isEnum}}
68
+ {{/vars}}
69
+ }
70
+ {{/hasEnums}}
71
+ {{/isEnum}}
72
+ {{#isEnum}}
73
+ export enum {{classname}} {
74
+ {{#allowableValues}}
75
+ {{#enumVars}}
76
+ {{name}} = {{{value}}}{{^-last}},{{/-last}}
77
+ {{/enumVars}}
78
+ {{/allowableValues}}
79
+ }
80
+ {{/isEnum}}
81
+ {{/model}}
82
+ {{/models}}
@@ -0,0 +1,50 @@
1
+ /* eslint-disable */
2
+ {{>licenseInfo}}
3
+ {{#models}}
4
+ {{#model}}
5
+ export * from '{{{ classFilename }}}';
6
+ {{/model}}
7
+ {{/models}}
8
+
9
+ {{#models}}
10
+ {{#model}}
11
+ import { {{classname}} } from '{{{ classFilename }}}';
12
+ {{/model}}
13
+ {{/models}}
14
+
15
+ /**
16
+ * Use this enums as the base for usage in exports and registering to ObjectSerializer.
17
+ * DO NOT FORGET to exclude FilterMatchTypeEnum and QueryModeEnum from enum map as they are already included in @mediusinc/mng-commons.
18
+ * Example for registering enumsMap: ObjectSerializer.get().registerEnums(enumsMap);
19
+ */
20
+ const enumsMap: {[index: string]: any} = {
21
+ {{#models}}
22
+ {{#model}}
23
+ {{#hasEnums}}
24
+ {{#vars}}
25
+ {{#isEnum}}
26
+ {{#isContainer}}'{{classname}}.{{enumName}}': {{classname}}.{{enumName}}{{/isContainer}}{{^isContainer}}'{{datatypeWithEnum}}': {{datatypeWithEnum}}{{/isContainer}},
27
+ {{/isEnum}}
28
+ {{/vars}}
29
+ {{/hasEnums}}
30
+ {{#isEnum}}
31
+ {{classname}}: {{classname}},
32
+ {{/isEnum}}
33
+ {{/model}}
34
+ {{/models}}
35
+ }
36
+
37
+ /**
38
+ * Use this types as the base for usage in exports and registering to ObjectSerializer.
39
+ * DO NOT FORGET to exclude FilterParam and QueryParam from types map as they are already included in @mediusinc/mng-commons.
40
+ * Example for registering enumsMap: ObjectSerializer.get().registerTypes(typeMap);
41
+ */
42
+ const typeMap: {[index: string]: any} = {
43
+ {{#models}}
44
+ {{#model}}
45
+ {{^isEnum}}
46
+ {{classname}}: {{classname}},
47
+ {{/isEnum}}
48
+ {{/model}}
49
+ {{/models}}
50
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.2.13",
3
+ "version": "0.2.16",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.1.0",
6
6
  "@angular/core": "^13.1.0",