mat-table-ext 0.0.9 → 0.0.11

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 (89) hide show
  1. package/esm2020/lib/components/column-pinning/column-pinning.component.mjs +58 -0
  2. package/esm2020/lib/components/editing/editing.component.mjs +122 -0
  3. package/esm2020/lib/components/filter-columns-component/filter-columns-component.component.mjs +68 -0
  4. package/esm2020/lib/directives/resize-column.directive.mjs +99 -0
  5. package/esm2020/lib/mat-table-ext.component.mjs +1020 -0
  6. package/esm2020/lib/mat-table-ext.module.mjs +237 -0
  7. package/esm2020/lib/mat-table-ext.service.mjs +20 -0
  8. package/esm2020/lib/models/tableExtModels.mjs +2 -0
  9. package/esm2020/mat-table-ext.mjs +5 -0
  10. package/esm2020/public-api.mjs +11 -0
  11. package/fesm2015/mat-table-ext.mjs +1584 -0
  12. package/fesm2015/mat-table-ext.mjs.map +1 -0
  13. package/fesm2020/mat-table-ext.mjs +1581 -0
  14. package/fesm2020/mat-table-ext.mjs.map +1 -0
  15. package/index.d.ts +5 -0
  16. package/lib/components/column-pinning/column-pinning.component.d.ts +27 -0
  17. package/lib/components/editing/editing.component.d.ts +42 -0
  18. package/lib/components/filter-columns-component/filter-columns-component.component.d.ts +26 -0
  19. package/lib/directives/resize-column.directive.d.ts +27 -0
  20. package/lib/mat-table-ext.component.d.ts +348 -0
  21. package/lib/mat-table-ext.module.d.ts +58 -0
  22. package/lib/mat-table-ext.service.d.ts +11 -0
  23. package/lib/models/tableExtModels.d.ts +76 -0
  24. package/package.json +58 -46
  25. package/{projects/mat-table-ext/src/public-api.ts → public-api.d.ts} +1 -5
  26. package/.editorconfig +0 -16
  27. package/.vscode/extensions.json +0 -4
  28. package/.vscode/launch.json +0 -20
  29. package/.vscode/tasks.json +0 -42
  30. package/LICENSE +0 -21
  31. package/angular.json +0 -150
  32. package/projects/mat-table-ext/.browserslistrc +0 -16
  33. package/projects/mat-table-ext/README.md +0 -57
  34. package/projects/mat-table-ext/karma.conf.js +0 -44
  35. package/projects/mat-table-ext/ng-package.json +0 -9
  36. package/projects/mat-table-ext/package.json +0 -38
  37. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.html +0 -7
  38. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.scss +0 -9
  39. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.spec.ts +0 -23
  40. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.ts +0 -48
  41. package/projects/mat-table-ext/src/lib/components/editing/editing.component.html +0 -55
  42. package/projects/mat-table-ext/src/lib/components/editing/editing.component.scss +0 -19
  43. package/projects/mat-table-ext/src/lib/components/editing/editing.component.spec.ts +0 -23
  44. package/projects/mat-table-ext/src/lib/components/editing/editing.component.ts +0 -110
  45. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.html +0 -26
  46. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.scss +0 -0
  47. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.spec.ts +0 -23
  48. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.ts +0 -54
  49. package/projects/mat-table-ext/src/lib/directives/resize-column.directive.ts +0 -103
  50. package/projects/mat-table-ext/src/lib/mat-table-ext.component.html +0 -285
  51. package/projects/mat-table-ext/src/lib/mat-table-ext.component.spec.ts +0 -25
  52. package/projects/mat-table-ext/src/lib/mat-table-ext.component.ts +0 -985
  53. package/projects/mat-table-ext/src/lib/mat-table-ext.module.ts +0 -127
  54. package/projects/mat-table-ext/src/lib/mat-table-ext.scss +0 -181
  55. package/projects/mat-table-ext/src/lib/mat-table-ext.service.spec.ts +0 -16
  56. package/projects/mat-table-ext/src/lib/mat-table-ext.service.ts +0 -12
  57. package/projects/mat-table-ext/src/lib/models/tableExtModels.ts +0 -85
  58. package/projects/mat-table-ext/src/test.ts +0 -27
  59. package/projects/mat-table-ext/tsconfig.lib.json +0 -15
  60. package/projects/mat-table-ext/tsconfig.lib.prod.json +0 -10
  61. package/projects/mat-table-ext/tsconfig.spec.json +0 -17
  62. package/projects/mat-table-ext-example/.browserslistrc +0 -16
  63. package/projects/mat-table-ext-example/karma.conf.js +0 -44
  64. package/projects/mat-table-ext-example/src/app/app.component.html +0 -576
  65. package/projects/mat-table-ext-example/src/app/app.component.scss +0 -0
  66. package/projects/mat-table-ext-example/src/app/app.component.spec.ts +0 -31
  67. package/projects/mat-table-ext-example/src/app/app.component.ts +0 -173
  68. package/projects/mat-table-ext-example/src/app/app.module.ts +0 -40
  69. package/projects/mat-table-ext-example/src/app/service/custom-table.service.spec.ts +0 -16
  70. package/projects/mat-table-ext-example/src/app/service/custom-table.service.ts +0 -18
  71. package/projects/mat-table-ext-example/src/assets/.gitkeep +0 -0
  72. package/projects/mat-table-ext-example/src/assets/data.json +0 -100003
  73. package/projects/mat-table-ext-example/src/environments/environment.prod.ts +0 -3
  74. package/projects/mat-table-ext-example/src/environments/environment.ts +0 -16
  75. package/projects/mat-table-ext-example/src/favicon.ico +0 -0
  76. package/projects/mat-table-ext-example/src/index.html +0 -14
  77. package/projects/mat-table-ext-example/src/main.ts +0 -12
  78. package/projects/mat-table-ext-example/src/polyfills.ts +0 -53
  79. package/projects/mat-table-ext-example/src/styles.scss +0 -23
  80. package/projects/mat-table-ext-example/src/test.ts +0 -26
  81. package/projects/mat-table-ext-example/tsconfig.app.json +0 -15
  82. package/projects/mat-table-ext-example/tsconfig.spec.json +0 -18
  83. package/tsconfig.json +0 -38
  84. /package/{projects/mat-table-ext/assets → assets}/_theming.scss +0 -0
  85. /package/{projects/mat-table-ext/assets → assets}/pinIcon.svg +0 -0
  86. /package/{projects/mat-table-ext/assets → assets}/pinLeft.svg +0 -0
  87. /package/{projects/mat-table-ext/assets → assets}/pinNone.svg +0 -0
  88. /package/{projects/mat-table-ext/assets → assets}/pinRight.svg +0 -0
  89. /package/{projects/mat-table-ext/assets → assets}/pinned.svg +0 -0
@@ -1,42 +0,0 @@
1
- {
2
- // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3
- "version": "2.0.0",
4
- "tasks": [
5
- {
6
- "type": "npm",
7
- "script": "start",
8
- "isBackground": true,
9
- "problemMatcher": {
10
- "owner": "typescript",
11
- "pattern": "$tsc",
12
- "background": {
13
- "activeOnStart": true,
14
- "beginsPattern": {
15
- "regexp": "(.*?)"
16
- },
17
- "endsPattern": {
18
- "regexp": "bundle generation complete"
19
- }
20
- }
21
- }
22
- },
23
- {
24
- "type": "npm",
25
- "script": "test",
26
- "isBackground": true,
27
- "problemMatcher": {
28
- "owner": "typescript",
29
- "pattern": "$tsc",
30
- "background": {
31
- "activeOnStart": true,
32
- "beginsPattern": {
33
- "regexp": "(.*?)"
34
- },
35
- "endsPattern": {
36
- "regexp": "bundle generation complete"
37
- }
38
- }
39
- }
40
- }
41
- ]
42
- }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/angular.json DELETED
@@ -1,150 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "mat-table-ext": {
7
- "projectType": "library",
8
- "root": "projects/mat-table-ext",
9
- "sourceRoot": "projects/mat-table-ext/src",
10
- "prefix": "lib",
11
- "architect": {
12
- "build": {
13
- "builder": "@angular-devkit/build-angular:ng-packagr",
14
- "options": {
15
- "project": "projects/mat-table-ext/ng-package.json"
16
- },
17
- "configurations": {
18
- "production": {
19
- "tsConfig": "projects/mat-table-ext/tsconfig.lib.prod.json"
20
- },
21
- "development": {
22
- "tsConfig": "projects/mat-table-ext/tsconfig.lib.json"
23
- }
24
- },
25
- "defaultConfiguration": "production"
26
- },
27
- "test": {
28
- "builder": "@angular-devkit/build-angular:karma",
29
- "options": {
30
- "main": "projects/mat-table-ext/src/test.ts",
31
- "tsConfig": "projects/mat-table-ext/tsconfig.spec.json",
32
- "karmaConfig": "projects/mat-table-ext/karma.conf.js"
33
- }
34
- }
35
- }
36
- },
37
- "mat-table-ext-example": {
38
- "projectType": "application",
39
- "schematics": {
40
- "@schematics/angular:component": {
41
- "style": "scss"
42
- },
43
- "@schematics/angular:application": {
44
- "strict": true
45
- }
46
- },
47
- "root": "projects/mat-table-ext-example",
48
- "sourceRoot": "projects/mat-table-ext-example/src",
49
- "prefix": "app",
50
- "architect": {
51
- "build": {
52
- "builder": "@angular-devkit/build-angular:browser",
53
- "options": {
54
- "outputPath": "dist/mat-table-ext-example",
55
- "index": "projects/mat-table-ext-example/src/index.html",
56
- "main": "projects/mat-table-ext-example/src/main.ts",
57
- "polyfills": "projects/mat-table-ext-example/src/polyfills.ts",
58
- "tsConfig": "projects/mat-table-ext-example/tsconfig.app.json",
59
- "inlineStyleLanguage": "scss",
60
- "assets": [
61
- "projects/mat-table-ext-example/src/favicon.ico",
62
- "projects/mat-table-ext-example/src/assets",
63
- {
64
- "glob": "**/*",
65
- "input": "projects/mat-table-ext/assets",
66
- "output": "/assets/"
67
- }
68
- ],
69
- "styles": [
70
- "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
71
- "projects/mat-table-ext-example/src/styles.scss"
72
- ],
73
- "scripts": []
74
- },
75
- "configurations": {
76
- "production": {
77
- "budgets": [
78
- {
79
- "type": "initial",
80
- "maximumWarning": "500kb",
81
- "maximumError": "1mb"
82
- },
83
- {
84
- "type": "anyComponentStyle",
85
- "maximumWarning": "2kb",
86
- "maximumError": "4kb"
87
- }
88
- ],
89
- "fileReplacements": [
90
- {
91
- "replace": "projects/mat-table-ext-example/src/environments/environment.ts",
92
- "with": "projects/mat-table-ext-example/src/environments/environment.prod.ts"
93
- }
94
- ],
95
- "outputHashing": "all"
96
- },
97
- "development": {
98
- "buildOptimizer": false,
99
- "optimization": false,
100
- "vendorChunk": true,
101
- "extractLicenses": false,
102
- "sourceMap": true,
103
- "namedChunks": true
104
- }
105
- },
106
- "defaultConfiguration": "production"
107
- },
108
- "serve": {
109
- "builder": "@angular-devkit/build-angular:dev-server",
110
- "configurations": {
111
- "production": {
112
- "browserTarget": "mat-table-ext-example:build:production"
113
- },
114
- "development": {
115
- "browserTarget": "mat-table-ext-example:build:development"
116
- }
117
- },
118
- "defaultConfiguration": "development"
119
- },
120
- "extract-i18n": {
121
- "builder": "@angular-devkit/build-angular:extract-i18n",
122
- "options": {
123
- "browserTarget": "mat-table-ext-example:build"
124
- }
125
- },
126
- "test": {
127
- "builder": "@angular-devkit/build-angular:karma",
128
- "options": {
129
- "main": "projects/mat-table-ext-example/src/test.ts",
130
- "polyfills": "projects/mat-table-ext-example/src/polyfills.ts",
131
- "tsConfig": "projects/mat-table-ext-example/tsconfig.spec.json",
132
- "karmaConfig": "projects/mat-table-ext-example/karma.conf.js",
133
- "inlineStyleLanguage": "scss",
134
- "assets": [
135
- "projects/mat-table-ext-example/src/favicon.ico",
136
- "projects/mat-table-ext-example/src/assets"
137
- ],
138
- "styles": [
139
- "projects/mat-table-ext-example/src/styles.scss"
140
- ],
141
- "scripts": []
142
- }
143
- }
144
- }
145
- }
146
- },
147
- "cli": {
148
- "analytics": false
149
- }
150
- }
@@ -1,16 +0,0 @@
1
- # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
- # For additional information regarding the format and rule options, please see:
3
- # https://github.com/browserslist/browserslist#queries
4
-
5
- # For the full list of supported browsers by the Angular framework, please see:
6
- # https://angular.io/guide/browser-support
7
-
8
- # You can see what browsers were selected by your queries by running:
9
- # npx browserslist
10
-
11
- last 1 Chrome version
12
- last 1 Firefox version
13
- last 2 Edge major versions
14
- last 2 Safari major versions
15
- last 2 iOS major versions
16
- Firefox ESR
@@ -1,57 +0,0 @@
1
- # Mat Table Extension
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.10.
4
- ## Documentation
5
-
6
- Check out the [demos and API](https://fastcode-inc.github.io/custom-table-doc).
7
- ## Installation
8
-
9
- First, you should install and set up Angular Material. [Learn more about the setup](https://material.angular.io/guide/getting-started).
10
-
11
- Install the Extension library:
12
-
13
- ```bash
14
- $ npm i mat-table-ext
15
- ```
16
-
17
- ## Setup
18
-
19
- Import the MatTableExtModule into imports array.
20
-
21
- ```ts
22
- import { MatTableExtModule } from 'mat-table-ext';
23
-
24
- @NgModule({
25
- ...
26
- imports: [MatTableExtModule,...],
27
- ...
28
- })
29
- export class YourAppModule {
30
- }
31
- ```
32
- ```
33
- After adding the MatTableExtModule to your application, add the path of assets of table to your application.
34
- Add the following to your angular.json file under build and test (if required).
35
- {
36
- "assets": [
37
- {
38
- "glob": "**/*",
39
- "input": "./node_modules/mat-table-ext/assets",
40
- "output": "/assets/"
41
- }
42
- ]
43
- }
44
- ```
45
- ## Theming
46
-
47
- After importing the module, you can pass your application theme to the mat-table-ext library by adding the following content to your theme file. [More details about theming.](https://material.angular.io/guide/theming).
48
-
49
-
50
- ```ts
51
- @use '../node_modules/mat-table-ext/assets/theming' as matext;
52
-
53
- @include matext.mat-table-ext-theme($your-theme);
54
- ```
55
- ## License
56
-
57
- MIT
@@ -1,44 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- },
22
- clearContext: false // leave Jasmine Spec Runner output visible in browser
23
- },
24
- jasmineHtmlReporter: {
25
- suppressAll: true // removes the duplicated traces
26
- },
27
- coverageReporter: {
28
- dir: require('path').join(__dirname, '../../coverage/mat-table-ext'),
29
- subdir: '.',
30
- reporters: [
31
- { type: 'html' },
32
- { type: 'text-summary' }
33
- ]
34
- },
35
- reporters: ['progress', 'kjhtml'],
36
- port: 9876,
37
- colors: true,
38
- logLevel: config.LOG_INFO,
39
- autoWatch: true,
40
- browsers: ['Chrome'],
41
- singleRun: false,
42
- restartOnFileChange: true
43
- });
44
- };
@@ -1,9 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/mat-table-ext",
4
- "assets": ["assets"],
5
- "lib": {
6
- "entryFile": "src/public-api.ts",
7
- "cssUrl": "inline"
8
- }
9
- }
@@ -1,38 +0,0 @@
1
- {
2
- "name": "mat-table-ext",
3
- "version": "0.0.9",
4
- "description": "The mat-table-ext is a powerful material table extension component used to display tabular data with extra features.",
5
- "homepage": "https://fastcode-inc.github.io/custom-table-doc",
6
- "keywords": [
7
- "mat-table",
8
- "mat-table-ext",
9
- "material table extension",
10
- "angular material",
11
- "data grid",
12
- "angular",
13
- "material data table",
14
- "angular-material",
15
- "angular-component"
16
- ],
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/fastcode-inc/custom-table"
20
- },
21
- "peerDependencies": {
22
- "@angular/animations": "^14.2.0",
23
- "@angular/cdk": "^14.2.4",
24
- "@angular/common": "^14.2.0",
25
- "@angular/compiler": "^14.2.0",
26
- "@angular/core": "^14.2.0",
27
- "@angular/forms": "^14.2.0",
28
- "@angular/material": "^14.2.4",
29
- "@angular/platform-browser": "^14.2.0",
30
- "@angular/platform-browser-dynamic": "^14.2.0",
31
- "@angular/router": "^14.2.0",
32
- "@ngx-translate/core": "^14.0.0",
33
- "xlsx": "^0.18.5"
34
- },
35
- "dependencies": {
36
- "tslib": "^2.3.0"
37
- }
38
- }
@@ -1,7 +0,0 @@
1
- <div class="pinning-list-item" *ngFor="let column of columns" style="display: flex; ">
2
- <button mat-icon-button >
3
- <mat-icon (click)="changeValue(column)" matTooltip="{{column['pinned'] ? (column['pinned'] | titlecase):'None'}}"
4
- svgIcon="{{column['pinned'] =='left'|| column['pinned'] =='right' ? icons[column['pinned']]:'pinNone'}}" class="pinning-icon"></mat-icon>
5
- </button>
6
- <span class="column-headers">{{column.header}}</span>
7
- </div>
@@ -1,9 +0,0 @@
1
- .pinning-list-item {
2
- display: flex;
3
- justify-content: flex-start;
4
- align-items: baseline;
5
- height: 3em;
6
- }
7
- .column-headers {
8
- font-family: Roboto, "Helvetica Neue", sans-serif;
9
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ColumnPinningComponent } from './column-pinning.component';
4
-
5
- describe('ColumnPinningComponent', () => {
6
- let component: ColumnPinningComponent;
7
- let fixture: ComponentFixture<ColumnPinningComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ColumnPinningComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(ColumnPinningComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,48 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
- import { MTExColumn } from '../../models/tableExtModels';
3
-
4
- @Component({
5
- selector: 'app-column-pinning',
6
- templateUrl: './column-pinning.component.html',
7
- styleUrls: ['./column-pinning.component.scss'],
8
- })
9
- export class ColumnPinningComponent implements OnInit {
10
- @Input() columns!: MTExColumn[];
11
- @Output() columnsChanged: EventEmitter<MTExColumn[]> = new EventEmitter();
12
- public icons = {
13
- left: 'pinLeft',
14
- right: 'pinRight',
15
- none: 'pinNone',
16
- };
17
-
18
- constructor() {}
19
- ngOnInit(): void {}
20
- /**
21
- * @description This method is called when pin value changes for a column.
22
- * @param column column of which to set the pin value
23
- */
24
- changeValue(column: MTExColumn) {
25
- if (column.pinned) {
26
- if (column.pinned == 'left') {
27
- this.setColumnPinValue(column, 'right');
28
- } else if (column.pinned == 'right') {
29
- this.setColumnPinValue(column, undefined);
30
- }
31
- } else {
32
- this.setColumnPinValue(column, 'left');
33
- }
34
- this.columnsChanged.emit(this.columns);
35
- }
36
- /**
37
- * @description This method is used to set the column pin value.
38
- * @param column column of which to set the pin value
39
- * @param value pin value to set
40
- */
41
- setColumnPinValue(column: MTExColumn, value: 'left' | 'right' | undefined) {
42
- this.columns.forEach((col) => {
43
- if (column?.header == col.header) {
44
- col.pinned = value;
45
- }
46
- });
47
- }
48
- }
@@ -1,55 +0,0 @@
1
- <div *ngIf="!templateRef" style="height: 100%;" class="main-dialog-container">
2
- <div mat-dialog-title class="dialog-title-container">
3
- <h2 style="margin: 0;">Edit Row</h2>
4
- <span class="example-spacer"></span>
5
- <button mat-icon-button aria-label="Example icon button with a vertical three dot icon">
6
- <mat-icon mat-dialog-close style="cursor: pointer;" fxFlex="5">close</mat-icon>
7
- </button>
8
- </div>
9
- <mat-dialog-content style="margin-right: 20px;">
10
- <div style="display: flex; flex-direction: column;">
11
- <ng-container *ngFor="let key of keys">
12
- <!-- Number Type -->
13
- <mat-form-field *ngIf="types[key] == 'number'" appearance="outline" class="inline-editing-field">
14
- <mat-label>{{key | titlecase}}</mat-label>
15
- <input matInput type="number" [(ngModel)]="dialogData['row'][key]" [ngModelOptions]="{standalone: true}">
16
- </mat-form-field>
17
-
18
- <!-- String Type -->
19
-
20
- <mat-form-field *ngIf="types[key] == 'string'" appearance="outline" class="inline-editing-field">
21
- <mat-label>{{key | titlecase}}</mat-label>
22
- <input matInput type="text" [(ngModel)]="dialogData['row'][key]" [ngModelOptions]="{standalone: true}">
23
- </mat-form-field>
24
- <mat-form-field *ngIf="types[key] == 'date'" appearance="outline" class="inline-editing-field">
25
- <mat-label>{{key | titlecase}}</mat-label>
26
- <input matInput type="text" [(ngModel)]="dialogData['row'][key]" [ngModelOptions]="{standalone: true}">
27
- </mat-form-field>
28
- <!-- Selection Type -->
29
-
30
- <mat-form-field *ngIf="types[key] == 'selection'" appearance="outline" class="inline-editing-field">
31
- <mat-label>{{key | titlecase}}</mat-label>
32
- <mat-select [value]="dialogData['row'][key].value" [(ngModel)]="dialogData['row'][key].value">
33
- <mat-option *ngFor="let option of dialogData['row'][key].options" [value]="option">
34
- {{option}}
35
- </mat-option>
36
- </mat-select>
37
- </mat-form-field>
38
- <!-- Boolean Type -->
39
- <p>
40
- <mat-checkbox *ngIf="types[key] == 'boolean'" color="primary" [(ngModel)]="dialogData['row'][key]">
41
- <mat-label>{{key | titlecase}}</mat-label>
42
- </mat-checkbox>
43
- </p>
44
- </ng-container>
45
- </div>
46
- </mat-dialog-content>
47
- <div class="spacer"></div>
48
- <mat-dialog-actions style="margin-top: 20px;" align="end">
49
- <button mat-raised-button color="warn" mat-dialog-close>
50
- Cancel
51
- </button>
52
- <button mat-raised-button color="primary" (click)="closeDialog()">Save</button>
53
- </mat-dialog-actions>
54
- </div>
55
- <ng-container *ngIf="templateRef" [ngTemplateOutlet]="templateRef" [ngTemplateOutletContext]="{data:{row:templateRow,columns:columns,columnKeys:templateKeys,columnTypes:templateTypes,closeDialog:closeTemplateDialog}}"></ng-container>
@@ -1,19 +0,0 @@
1
- .main-dialog-container {
2
- display: flex;
3
- flex-direction: column;
4
- }
5
-
6
- .main-dialog-container mat-dialog-content {
7
- overflow-y: auto;
8
- margin: 0px;
9
- padding: 0 0 0 20px;
10
- }
11
-
12
- .dialog-title-container {
13
- display: flex;
14
- align-items: center;
15
- }
16
-
17
- .spacer {
18
- flex-grow: 1;
19
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { PopupModalComponent } from './editing.component';
4
-
5
- describe('PopupModalComponent', () => {
6
- let component: PopupModalComponent;
7
- let fixture: ComponentFixture<PopupModalComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ PopupModalComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(PopupModalComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });