imng-kendo-schematics 7.292.2 → 7.348.1
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/package.json +1 -1
- package/schematics/imng-sub-list/files/__pluralizedName@dasherize__-list/list.component.html.template +18 -0
- package/schematics/imng-sub-list/files/__pluralizedName@dasherize__-list/list.component.spec.ts.template +5 -1
- package/schematics/imng-sub-list/files/__pluralizedName@dasherize__-list/list.component.ts.template +2 -1
package/package.json
CHANGED
|
@@ -33,6 +33,24 @@
|
|
|
33
33
|
<ng-template kendoGridFilterMenuTemplate let-filter>
|
|
34
34
|
<imng-uuid-filter [filter]="filter"></imng-uuid-filter>
|
|
35
35
|
</ng-template>
|
|
36
|
+
<%} else if (swaggerProperty.enum) { %>
|
|
37
|
+
<kendo-grid-column
|
|
38
|
+
[field]="props.<%= swaggerProperty.snakeCaseName.toUpperCase() %>"
|
|
39
|
+
[width]="100"
|
|
40
|
+
title="<%= swaggerProperty.startCaseName %>"
|
|
41
|
+
filter="<%= swaggerProperty.filterExpression %>">
|
|
42
|
+
<ng-template kendoGridFilterMenuTemplate let-column="column">
|
|
43
|
+
<imng-multi-select-filter
|
|
44
|
+
[isPrimitive]="false"
|
|
45
|
+
[odataState]="facade.gridODataState$ | async"
|
|
46
|
+
[textField]="EnumProperties.DISPLAY_TEXT"
|
|
47
|
+
[valueField]="EnumProperties.NAME"
|
|
48
|
+
[data]="<%= camelize(swaggerProperty.pluralizedPropertyTypeName) %>"
|
|
49
|
+
[field]="props.<%= swaggerProperty.snakeCaseName.toUpperCase() %>"></imng-multi-select-filter>
|
|
50
|
+
</ng-template>
|
|
51
|
+
<ng-template kendoGridCellTemplate let-dataItem>
|
|
52
|
+
{{ getEnumText(<%= camelize(swaggerProperty.pluralizedPropertyTypeName) %>, dataItem[props.<%= swaggerProperty.snakeCaseName.toUpperCase() %>]) }}
|
|
53
|
+
</ng-template>
|
|
36
54
|
<%} else if (swaggerProperty.htmlInputType === 'object') { %>
|
|
37
55
|
<kendo-grid-column
|
|
38
56
|
[field]="getRelatedField(props.<%= swaggerProperty.snakeCaseName.toUpperCase() %>, <%= camelize(swaggerProperty.name) %>Props.<%= swaggerProperty.firstProperty?.snakeCaseName.toUpperCase() %>)"
|
|
@@ -2,6 +2,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
|
2
2
|
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
3
|
import { createDataDeleteMockFacade } from 'imng-kendo-data-entry/testing';
|
|
4
4
|
import { createODataGridMockFacade } from 'imng-kendo-grid-odata/testing';
|
|
5
|
+
import { StoreModule, Store } from '@ngrx/store';
|
|
5
6
|
|
|
6
7
|
import { <%= classify(singularizedName) %>ListComponent } from './list.component';
|
|
7
8
|
import { <%= classify(singularizedName) %>ListFacade } from './list.facade';
|
|
@@ -15,7 +16,10 @@ describe('<%= classify(singularizedName) %>ListComponent', () => {
|
|
|
15
16
|
beforeEach(waitForAsync(() => {
|
|
16
17
|
TestBed.configureTestingModule({
|
|
17
18
|
declarations: [<%= classify(singularizedName) %>ListComponent],
|
|
18
|
-
imports: [
|
|
19
|
+
imports: [
|
|
20
|
+
StoreModule.forRoot({})
|
|
21
|
+
StoreModule.forFeature(<%= camelize(pluralizedStoreName) %>Feature),
|
|
22
|
+
],
|
|
19
23
|
providers: [
|
|
20
24
|
{ provide: <%= classify(singularizedName) %>ListFacade, useValue: createODataGridMockFacade(createDataDeleteMockFacade()) },
|
|
21
25
|
],
|
package/schematics/imng-sub-list/files/__pluralizedName@dasherize__-list/list.component.ts.template
CHANGED
|
@@ -13,7 +13,8 @@ import { <%= camelize(singularizedName) %>GridState } from './list.grid-state';
|
|
|
13
13
|
})
|
|
14
14
|
export class <%= classify(singularizedName) %>ListComponent extends KendoODataBasedComponent<I<%= classify(singularizedName) %>, <%= classify(singularizedName) %>ListFacade> {
|
|
15
15
|
public readonly props = <%= classify(singularizedName) %>Properties;<% swaggerObjectProperties.filter(t=> !t.enum).forEach(function(swaggerProperty){ %>
|
|
16
|
-
public readonly <%= camelize(swaggerProperty.name) %>Props = <%= classify(swaggerProperty.propertyTypeName) %>Properties;<% }) %>
|
|
16
|
+
public readonly <%= camelize(swaggerProperty.name) %>Props = <%= classify(swaggerProperty.propertyTypeName) %>Properties;<% }) %><% swaggerObjectProperties.filter(t=> t.enum).forEach(function(swaggerProperty){ %>
|
|
17
|
+
public readonly <%= camelize(swaggerProperty.pluralizedPropertyTypeName) %> = <%= camelize(swaggerProperty.singularizedPropertyTypeName) %>Values;<% }) %>
|
|
17
18
|
public currentItem: I<%= classify(singularizedName) %> | undefined;
|
|
18
19
|
|
|
19
20
|
constructor(facade: <%= classify(singularizedName) %>ListFacade) {
|