clean code
This commit is contained in:
parent
11c4893d37
commit
d4eb3c135c
18
angular.json
18
angular.json
@ -15,12 +15,15 @@
|
|||||||
"prefix": "ps",
|
"prefix": "ps",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:application",
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/ngx-cdk-ui",
|
"outputPath": {
|
||||||
|
"base": "dist/ngx-cdk-ui"
|
||||||
|
},
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
"polyfills": [
|
||||||
"polyfills": "src/polyfills.ts",
|
"src/polyfills.ts"
|
||||||
|
],
|
||||||
"tsConfig": "tsconfig.app.json",
|
"tsConfig": "tsconfig.app.json",
|
||||||
"assets": [
|
"assets": [
|
||||||
"src/favicon.ico",
|
"src/favicon.ico",
|
||||||
@ -31,12 +34,11 @@
|
|||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
],
|
],
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"vendorChunk": true,
|
|
||||||
"extractLicenses": false,
|
"extractLicenses": false,
|
||||||
"buildOptimizer": false,
|
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"optimization": false,
|
"optimization": false,
|
||||||
"namedChunks": true
|
"namedChunks": true,
|
||||||
|
"browser": "src/main.ts"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@ -51,8 +53,6 @@
|
|||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"namedChunks": false,
|
"namedChunks": false,
|
||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"vendorChunk": false,
|
|
||||||
"buildOptimizer": true,
|
|
||||||
"budgets": [
|
"budgets": [
|
||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
|
28
package.json
28
package.json
@ -15,14 +15,14 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^17.3.12",
|
"@angular/animations": "^18.2.1",
|
||||||
"@angular/common": "^17.3.12",
|
"@angular/common": "^18.2.1",
|
||||||
"@angular/compiler": "^17.3.12",
|
"@angular/compiler": "^18.2.1",
|
||||||
"@angular/core": "^17.3.12",
|
"@angular/core": "^18.2.1",
|
||||||
"@angular/forms": "^17.3.12",
|
"@angular/forms": "^18.2.1",
|
||||||
"@angular/platform-browser": "^17.3.12",
|
"@angular/platform-browser": "^18.2.1",
|
||||||
"@angular/platform-browser-dynamic": "^17.3.12",
|
"@angular/platform-browser-dynamic": "^18.2.1",
|
||||||
"@angular/router": "^17.3.12",
|
"@angular/router": "^18.2.1",
|
||||||
"@ng-select/ng-select": "^13.0.0",
|
"@ng-select/ng-select": "^13.0.0",
|
||||||
"@openharbor/ngx-data": "^18.0.0-alpha.3",
|
"@openharbor/ngx-data": "^18.0.0-alpha.3",
|
||||||
"@poweredsoft/data": "^0.0.36",
|
"@poweredsoft/data": "^0.0.36",
|
||||||
@ -41,10 +41,10 @@
|
|||||||
"zone.js": "~0.14.10"
|
"zone.js": "~0.14.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^17.3.8",
|
"@angular-devkit/build-angular": "^18.2.1",
|
||||||
"@angular/cli": "^17.3.8",
|
"@angular/cli": "^18.2.1",
|
||||||
"@angular/compiler-cli": "^17.3.12",
|
"@angular/compiler-cli": "^18.2.1",
|
||||||
"@angular/language-service": "^17.3.12",
|
"@angular/language-service": "^18.2.1",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "~3.6.0",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@types/jasminewd2": "~2.0.3",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "^12.11.1",
|
||||||
@ -56,13 +56,13 @@
|
|||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-jasmine": "~4.0.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
"karma-jasmine-html-reporter": "^1.5.0",
|
||||||
"ng-packagr": "^17.3.0",
|
"ng-packagr": "^18.2.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-node": "~8.3.0",
|
"ts-node": "~8.3.0",
|
||||||
"tslint": "~6.1.0",
|
"tslint": "~6.1.0",
|
||||||
"typescript": "~5.2",
|
"typescript": "~5.5.4",
|
||||||
"wait-on": "^5.0.1"
|
"wait-on": "^5.0.1"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
|
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
|
||||||
|
@ -3,7 +3,9 @@ import {EventEmitter, Injectable, TemplateRef} from '@angular/core';
|
|||||||
import {IDataSource} from '@poweredsoft/data';
|
import {IDataSource} from '@poweredsoft/data';
|
||||||
import {BsModalService} from 'ngx-bootstrap/modal';
|
import {BsModalService} from 'ngx-bootstrap/modal';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
export class CommandModalService {
|
export class CommandModalService {
|
||||||
constructor(private modalService: BsModalService) {
|
constructor(private modalService: BsModalService) {
|
||||||
}
|
}
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {CommandDirective} from './directives/command.directive';
|
|
||||||
import {ConfirmModalModule} from '../confirm-modal/confirm-modal.module';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [CommandDirective],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
ConfirmModalModule
|
|
||||||
],
|
|
||||||
exports:[CommandDirective]
|
|
||||||
})
|
|
||||||
export class CommandModule { }
|
|
@ -4,7 +4,8 @@ import {finalize} from 'rxjs/operators';
|
|||||||
import {ConfirmModalService} from '../../confirm-modal/confirm-modal.service';
|
import {ConfirmModalService} from '../../confirm-modal/confirm-modal.service';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[bsxCommand]'
|
selector: '[bsxCommand]',
|
||||||
|
standalone: true
|
||||||
})
|
})
|
||||||
export class CommandDirective {
|
export class CommandDirective {
|
||||||
constructor(private confirmModalService: ConfirmModalService) { }
|
constructor(private confirmModalService: ConfirmModalService) { }
|
||||||
@ -57,7 +58,6 @@ export class CommandDirective {
|
|||||||
|
|
||||||
@HostListener('click')
|
@HostListener('click')
|
||||||
wasClicked() {
|
wasClicked() {
|
||||||
|
|
||||||
if (this.confirm) {
|
if (this.confirm) {
|
||||||
this.confirmModalService.confirm({
|
this.confirmModalService.confirm({
|
||||||
message: this.confirmMessage,
|
message: this.confirmMessage,
|
||||||
@ -73,5 +73,4 @@ export class CommandDirective {
|
|||||||
this.doCommand();
|
this.doCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
import {Component, Inject, OnInit} from '@angular/core';
|
import {Component, Inject} from '@angular/core';
|
||||||
import {BsModalRef} from 'ngx-bootstrap/modal';
|
import {BsModalRef} from 'ngx-bootstrap/modal';
|
||||||
import {Observer} from 'rxjs';
|
import {Observer} from 'rxjs';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-confirm-modal',
|
selector: 'bsx-confirm-modal',
|
||||||
templateUrl: './confirm-modal.component.html',
|
templateUrl: './confirm-modal.component.html',
|
||||||
styleUrls: ['./confirm-modal.component.scss']
|
styleUrls: ['./confirm-modal.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
CommonModule
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class ConfirmModalComponent {
|
export class ConfirmModalComponent {
|
||||||
@Inject(BsModalRef) modelRef!: BsModalRef;
|
@Inject(BsModalRef) modelRef!: BsModalRef;
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {ConfirmModalComponent} from './confirm-modal-components/confirm-modal/confirm-modal.component';
|
|
||||||
import {ModalModule} from 'ngx-bootstrap/modal';
|
|
||||||
import {ConfirmModalService} from './confirm-modal.service';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [ConfirmModalComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
ModalModule.forRoot(),
|
|
||||||
],
|
|
||||||
exports: [],
|
|
||||||
providers: [ConfirmModalService]
|
|
||||||
})
|
|
||||||
export class ConfirmModalModule { }
|
|
@ -12,7 +12,9 @@ export interface IConfirmModalOptions
|
|||||||
noText?: string;
|
noText?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable()
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
export class ConfirmModalService {
|
export class ConfirmModalService {
|
||||||
constructor(private modalService: BsModalService) { }
|
constructor(private modalService: BsModalService) { }
|
||||||
|
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {DataSourceTextFilterComponent} from './text-filter/data-source-text-filter.component';
|
|
||||||
import {FormsModule} from '@angular/forms';
|
|
||||||
import {DataSourceNumberFilterComponent} from './number-filter/data-source-number-filter.component';
|
|
||||||
import {DataSourceDatetimeFilterComponent} from './datetime-filter/data-source-datetime-filter.component';
|
|
||||||
import {BsDatepickerModule} from 'ngx-bootstrap/datepicker';
|
|
||||||
import {PopoverModule} from 'ngx-bootstrap/popover';
|
|
||||||
import {BsDropdownModule} from 'ngx-bootstrap/dropdown';
|
|
||||||
import {TooltipModule} from 'ngx-bootstrap/tooltip';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [DataSourceTextFilterComponent, DataSourceNumberFilterComponent,DataSourceDatetimeFilterComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
FormsModule,
|
|
||||||
BsDatepickerModule.forRoot(),
|
|
||||||
PopoverModule.forRoot(),
|
|
||||||
BsDropdownModule.forRoot(),
|
|
||||||
TooltipModule.forRoot()
|
|
||||||
],
|
|
||||||
exports: [DataSourceTextFilterComponent, DataSourceNumberFilterComponent,DataSourceDatetimeFilterComponent]
|
|
||||||
})
|
|
||||||
export class DataSourceFilterModule { }
|
|
@ -75,8 +75,8 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button> -->
|
</button> -->
|
||||||
|
|
||||||
<svg id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
<svg id="Capa_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
||||||
viewBox="0 0 477.875 477.875" style="enable-background:new 0 0 477.875 477.875;" xml:space="preserve" fill-opacity="0.5" [tooltip]="showTooltip()" [tooltipEnable]="!filterPopUpOpened" width="13px" height="13px" [ngStyle]="{'fill': isFiltering ? 'red': 'black', 'fill-opacity': isFiltering ? '1': '0.5'}" [popover]="popTemplate" [(isOpen)]="filterPopUpOpened" [outsideClick]="true" #pop="bs-popover">
|
viewBox="0 0 477.875 477.875" fill-opacity="0.5" [tooltip]="showTooltip()" [isDisabled]="filterPopUpOpened" width="13px" height="13px" [ngStyle]="{'fill': isFiltering ? 'red': 'black', 'fill-opacity': isFiltering ? '1': '0.5'}" [popover]="popTemplate" [isOpen]="filterPopUpOpened" [outsideClick]="true" #pop="bs-popover">
|
||||||
<g>
|
<g>
|
||||||
<g>
|
<g>
|
||||||
<path d="M460.804,0H17.071C7.645,0,0.004,7.641,0.004,17.067V102.4c-0.004,4.842,2.05,9.458,5.649,12.698l165.018,148.514V460.8
|
<path d="M460.804,0H17.071C7.645,0,0.004,7.641,0.004,17.067V102.4c-0.004,4.842,2.05,9.458,5.649,12.698l165.018,148.514V460.8
|
||||||
|
@ -1,11 +1,24 @@
|
|||||||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||||
import {FilterType, ICompositeFilter, IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
import {FilterType, ICompositeFilter, IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
||||||
|
import {FormsModule} from "@angular/forms";
|
||||||
|
import {BsDatepickerModule} from "ngx-bootstrap/datepicker";
|
||||||
|
import {TooltipModule} from "ngx-bootstrap/tooltip";
|
||||||
|
import {PopoverModule} from "ngx-bootstrap/popover";
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-ds-datetime-filter',
|
selector: 'bsx-ds-datetime-filter',
|
||||||
templateUrl: './data-source-datetime-filter.component.html',
|
templateUrl: './data-source-datetime-filter.component.html',
|
||||||
styleUrls: ['./data-source-datetime-filter.component.scss']
|
styleUrls: ['./data-source-datetime-filter.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
BsDatepickerModule,
|
||||||
|
TooltipModule,
|
||||||
|
PopoverModule
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class DataSourceDatetimeFilterComponent implements OnInit {
|
export class DataSourceDatetimeFilterComponent implements OnInit {
|
||||||
@Input() path: string;
|
@Input() path: string;
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
</form>
|
</form>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
<svg id="Capa_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
||||||
viewBox="0 0 477.875 477.875" style="enable-background:new 0 0 477.875 477.875;" xml:space="preserve" fill-opacity="0.5" [tooltip]="showTooltip()" [tooltipEnable]="!filterIsOpened" width="13px" height="13px" [ngStyle]="{'fill': isFiltering ? 'red': 'black', 'fill-opacity': isFiltering ? '1': '0.5'}" [popover]="popTemplate" [(isOpen)]="filterIsOpened" [outsideClick]="true" #pop="bs-popover">
|
viewBox="0 0 477.875 477.875" fill-opacity="0.5" [tooltip]="showTooltip()" [isDisabled]="filterIsOpened" width="13px" height="13px" [ngStyle]="{'fill': isFiltering ? 'red': 'black', 'fill-opacity': isFiltering ? '1': '0.5'}" [popover]="popTemplate" [isOpen]="filterIsOpened" [outsideClick]="true" #pop="bs-popover">
|
||||||
<g>
|
<g>
|
||||||
<g>
|
<g>
|
||||||
<path d="M460.804,0H17.071C7.645,0,0.004,7.641,0.004,17.067V102.4c-0.004,4.842,2.05,9.458,5.649,12.698l165.018,148.514V460.8
|
<path d="M460.804,0H17.071C7.645,0,0.004,7.641,0.004,17.067V102.4c-0.004,4.842,2.05,9.458,5.649,12.698l165.018,148.514V460.8
|
||||||
|
@ -1,11 +1,22 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
import {IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
||||||
|
import {FormsModule} from "@angular/forms";
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
import {TooltipModule} from "ngx-bootstrap/tooltip";
|
||||||
|
import {PopoverModule} from "ngx-bootstrap/popover";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-ds-number-filter',
|
selector: 'bsx-ds-number-filter',
|
||||||
templateUrl: './data-source-number-filter.component.html',
|
templateUrl: './data-source-number-filter.component.html',
|
||||||
styleUrls: ['./data-source-number-filter.component.scss']
|
styleUrls: ['./data-source-number-filter.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
TooltipModule,
|
||||||
|
PopoverModule
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class DataSourceNumberFilterComponent {
|
export class DataSourceNumberFilterComponent {
|
||||||
@Input() dataSource : IDataSource<any>;
|
@Input() dataSource : IDataSource<any>;
|
||||||
|
@ -64,8 +64,8 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button> -->
|
</button> -->
|
||||||
|
|
||||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
<svg id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
viewBox="0 0 477.875 477.875" style="enable-background:new 0 0 477.875 477.875;" xml:space="preserve" fill-opacity="0.5" [tooltip]="showTooltip()" [tooltipEnable]="!filterIsOpened" width="13px" height="13px" [ngStyle]="{'fill': isFiltering ? 'red': 'black', 'fill-opacity': isFiltering ? '1': '0.5'}" [popover]="popTemplate" [(isOpen)]="filterIsOpened" [outsideClick]="true" #pop="bs-popover">
|
viewBox="0 0 477.875 477.875" fill-opacity="0.5" [tooltip]="showTooltip()" [isDisabled]="filterIsOpened" width="13px" height="13px" [ngStyle]="{'fill': isFiltering ? 'red': 'black', 'fill-opacity': isFiltering ? '1': '0.5'}" [popover]="popTemplate" [isOpen]="filterIsOpened" [outsideClick]="true" #pop="bs-popover">
|
||||||
<g>
|
<g>
|
||||||
<g>
|
<g>
|
||||||
<path d="M460.804,0H17.071C7.645,0,0.004,7.641,0.004,17.067V102.4c-0.004,4.842,2.05,9.458,5.649,12.698l165.018,148.514V460.8
|
<path d="M460.804,0H17.071C7.645,0,0.004,7.641,0.004,17.067V102.4c-0.004,4.842,2.05,9.458,5.649,12.698l165.018,148.514V460.8
|
||||||
|
@ -1,11 +1,21 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
import {IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
||||||
import {PopoverDirective} from 'ngx-bootstrap/popover';
|
import {PopoverDirective, PopoverModule} from 'ngx-bootstrap/popover';
|
||||||
|
import {FormsModule} from "@angular/forms";
|
||||||
|
import {TooltipModule} from "ngx-bootstrap/tooltip";
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-ds-text-filter',
|
selector: 'bsx-ds-text-filter',
|
||||||
templateUrl: './data-source-text-filter.component.html',
|
templateUrl: './data-source-text-filter.component.html',
|
||||||
styleUrls: ['./data-source-text-filter.component.scss']
|
styleUrls: ['./data-source-text-filter.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
TooltipModule,
|
||||||
|
PopoverModule,
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class DataSourceTextFilterComponent {
|
export class DataSourceTextFilterComponent {
|
||||||
@Input() dataSource : IDataSource<any>;
|
@Input() dataSource : IDataSource<any>;
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {DataSourceSortingComponent} from './ds-sorting/data-source-sorting.component';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [DataSourceSortingComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule
|
|
||||||
],
|
|
||||||
exports:[DataSourceSortingComponent]
|
|
||||||
})
|
|
||||||
export class DataSourceSortingModule { }
|
|
@ -1,10 +1,13 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {IDataSource} from '@poweredsoft/data';
|
import {IDataSource} from '@poweredsoft/data';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-ds-sorting',
|
selector: 'bsx-ds-sorting',
|
||||||
templateUrl: './data-source-sorting.component.html',
|
templateUrl: './data-source-sorting.component.html',
|
||||||
styleUrls: ['./data-source-sorting.component.scss']
|
styleUrls: ['./data-source-sorting.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule]
|
||||||
})
|
})
|
||||||
export class DataSourceSortingComponent {
|
export class DataSourceSortingComponent {
|
||||||
@Input() dataSource : IDataSource<any>;
|
@Input() dataSource : IDataSource<any>;
|
||||||
|
@ -14,7 +14,8 @@ export interface IModelFormCreateEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[bsxFormGroupCommandModal]'
|
selector: '[bsxFormGroupCommandModal]',
|
||||||
|
standalone: true
|
||||||
})
|
})
|
||||||
export class FormGroupCommandModalDirective {
|
export class FormGroupCommandModalDirective {
|
||||||
@Inject(BsModalService) private modalService!: BsModalService;
|
@Inject(BsModalService) private modalService!: BsModalService;
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {FormGroupCommandModalComponent} from './form-group-command-modal/form-group-command-modal.component';
|
|
||||||
import {FormGroupCommandModalDirective} from './directives/form-group-command-modal.directive';
|
|
||||||
import {ModalModule} from 'ngx-bootstrap/modal';
|
|
||||||
import {ReactiveFormsModule} from '@angular/forms';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
ModalModule.forRoot(),
|
|
||||||
ReactiveFormsModule
|
|
||||||
],
|
|
||||||
declarations: [FormGroupCommandModalComponent, FormGroupCommandModalDirective],
|
|
||||||
exports: [FormGroupCommandModalDirective]
|
|
||||||
})
|
|
||||||
export class FormGroupCommandModalModule { }
|
|
@ -4,11 +4,14 @@ import {IDataSource} from '@poweredsoft/data';
|
|||||||
import {finalize} from 'rxjs/operators';
|
import {finalize} from 'rxjs/operators';
|
||||||
import {Subscription} from 'rxjs'
|
import {Subscription} from 'rxjs'
|
||||||
import {UntypedFormGroup} from '@angular/forms';
|
import {UntypedFormGroup} from '@angular/forms';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-form-group-command-modal',
|
selector: 'bsx-form-group-command-modal',
|
||||||
templateUrl: './form-group-command-modal.component.html',
|
templateUrl: './form-group-command-modal.component.html',
|
||||||
styleUrls: ['./form-group-command-modal.component.scss']
|
styleUrls: ['./form-group-command-modal.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule]
|
||||||
})
|
})
|
||||||
export class FormGroupCommandModalComponent implements OnInit, OnDestroy {
|
export class FormGroupCommandModalComponent implements OnInit, OnDestroy {
|
||||||
@Inject(BsModalRef) public modalRef!: BsModalRef;
|
@Inject(BsModalRef) public modalRef!: BsModalRef;
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
import {ChangeDetectorRef, Component, Inject, Input, OnDestroy, OnInit} from '@angular/core';
|
import {ChangeDetectorRef, Component, Inject, Input, OnDestroy, OnInit} from '@angular/core';
|
||||||
import {IDataSource} from '@poweredsoft/data';
|
import {IDataSource} from '@poweredsoft/data';
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
import {PaginationModule} from "ngx-bootstrap/pagination";
|
||||||
|
import {FormsModule} from "@angular/forms";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-ds-pagination',
|
selector: 'bsx-ds-pagination',
|
||||||
templateUrl: './data-source-pagination.component.html',
|
templateUrl: './data-source-pagination.component.html',
|
||||||
styleUrls: ['./data-source-pagination.component.scss']
|
styleUrls: ['./data-source-pagination.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, PaginationModule, FormsModule]
|
||||||
})
|
})
|
||||||
export class DataSourcePaginationComponent implements OnInit, OnDestroy {
|
export class DataSourcePaginationComponent implements OnInit, OnDestroy {
|
||||||
@Inject(ChangeDetectorRef) private cdf!: ChangeDetectorRef;
|
@Inject(ChangeDetectorRef) private cdf!: ChangeDetectorRef;
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {DataSourcePaginationComponent} from './data-source-pagination/data-source-pagination.component';
|
|
||||||
import {PaginationModule as ValorPaginationModule} from 'ngx-bootstrap/pagination';
|
|
||||||
import {FormsModule} from '@angular/forms';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [DataSourcePaginationComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
ValorPaginationModule.forRoot(),
|
|
||||||
FormsModule
|
|
||||||
],
|
|
||||||
exports: [DataSourcePaginationComponent]
|
|
||||||
})
|
|
||||||
export class PaginationModule { }
|
|
@ -1,13 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {SpinnerComponent} from './spinner/spinner.component';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [SpinnerComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule
|
|
||||||
],
|
|
||||||
exports:[SpinnerComponent]
|
|
||||||
})
|
|
||||||
export class SpinnerModule { }
|
|
@ -1,9 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bsx-spinner',
|
selector: 'bsx-spinner',
|
||||||
templateUrl: './spinner.component.html',
|
templateUrl: './spinner.component.html',
|
||||||
styleUrls: ['./spinner.component.scss']
|
styleUrls: ['./spinner.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule]
|
||||||
})
|
})
|
||||||
export class SpinnerComponent {
|
export class SpinnerComponent {
|
||||||
|
|
||||||
|
@ -2,22 +2,14 @@
|
|||||||
* Public API Surface of ngx-bootstrap
|
* Public API Surface of ngx-bootstrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './lib/command-modal/command-modal.module';
|
|
||||||
export * from './lib/command-modal/command-modal.service';
|
export * from './lib/command-modal/command-modal.service';
|
||||||
export * from './lib/command-modal/directives/command-modal.directive';
|
export * from './lib/command-modal/directives/command-modal.directive';
|
||||||
export * from './lib/form-group-command-modal/form-group-command-modal.module';
|
|
||||||
export * from './lib/form-group-command-modal/directives/form-group-command-modal.directive';
|
export * from './lib/form-group-command-modal/directives/form-group-command-modal.directive';
|
||||||
export * from './lib/pagination/data-source-pagination/data-source-pagination.component';
|
export * from './lib/pagination/data-source-pagination/data-source-pagination.component';
|
||||||
export * from './lib/confirm-modal/confirm-modal.module';
|
|
||||||
export * from './lib/confirm-modal/confirm-modal.service';
|
export * from './lib/confirm-modal/confirm-modal.service';
|
||||||
export * from './lib/spinner/spinner.module';
|
|
||||||
export * from './lib/spinner/spinner/spinner.component';
|
export * from './lib/spinner/spinner/spinner.component';
|
||||||
export * from './lib/data-source-filter/data-source-filter.module';
|
|
||||||
export * from './lib/data-source-filter/text-filter/data-source-text-filter.component';
|
export * from './lib/data-source-filter/text-filter/data-source-text-filter.component';
|
||||||
export * from './lib/data-source-filter/number-filter/data-source-number-filter.component';
|
export * from './lib/data-source-filter/number-filter/data-source-number-filter.component';
|
||||||
export * from './lib/data-source-filter/datetime-filter/data-source-datetime-filter.component';
|
export * from './lib/data-source-filter/datetime-filter/data-source-datetime-filter.component';
|
||||||
export * from './lib/data-source-sorting/data-source-sorting.module';
|
|
||||||
export * from './lib/data-source-sorting/ds-sorting/data-source-sorting.component';
|
export * from './lib/data-source-sorting/ds-sorting/data-source-sorting.component';
|
||||||
export * from './lib/command/command.module';
|
|
||||||
export * from './lib/command/directives/command.directive';
|
export * from './lib/command/directives/command.directive';
|
||||||
export * from './lib/pagination/pagination.module';
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-item">
|
<div class="flex-item">
|
||||||
|
|
||||||
<ng-container *ngIf="hasSortingTemplate(column)">
|
<ng-container *ngIf="hasSortingTemplate(column)">
|
||||||
<ng-container [ngTemplateOutlet]="getSortingTemplate(column)"></ng-container>
|
<ng-container [ngTemplateOutlet]="getSortingTemplate(column)"></ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
@ -28,7 +27,6 @@
|
|||||||
<ng-container [ngTemplateOutlet]="getFilterTemplate(column)"></ng-container>
|
<ng-container [ngTemplateOutlet]="getFilterTemplate(column)"></ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';
|
import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';
|
||||||
import {IDataSource, IQueryExecutionGroupResult, IQueryExecutionResult} from '@poweredsoft/data';
|
import {IDataSource, IQueryExecutionGroupResult, IQueryExecutionResult} from '@poweredsoft/data';
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cdk-ds-pager',
|
selector: 'cdk-ds-pager',
|
||||||
templateUrl: './ds-pager.component.html',
|
templateUrl: './ds-pager.component.html',
|
||||||
styleUrls: ['./ds-pager.component.scss']
|
styleUrls: ['./ds-pager.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule]
|
||||||
})
|
})
|
||||||
export class DsPagerComponent implements OnInit, OnDestroy {
|
export class DsPagerComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {DsPagerComponent} from './ds-pager.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [DsPagerComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule
|
|
||||||
],
|
|
||||||
exports: [DsPagerComponent]
|
|
||||||
})
|
|
||||||
export class DsPagerModule { }
|
|
@ -1,6 +1,6 @@
|
|||||||
<form (submit)="applySearch()">
|
<form (submit)="applySearch()">
|
||||||
<div [ngClass]="classes">
|
<div [ngClass]="classes">
|
||||||
<input type="search" (onSearch)="onSearch()" [placeholder]="finalSearchText" [ngClass]="searchClasses"
|
<input type="search" (input)="onSearch()" [placeholder]="finalSearchText" [ngClass]="searchClasses"
|
||||||
[(ngModel)]="filterValue" [ngModelOptions]="{standalone: true}">
|
[(ngModel)]="filterValue" [ngModelOptions]="{standalone: true}">
|
||||||
<button type="submit" [ngClass]="submitButtonClasses">{{ finalSearchText }}</button>
|
<button type="submit" [ngClass]="submitButtonClasses">{{ finalSearchText }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
import {Component, Input, OnInit} from '@angular/core';
|
import {Component, Input, OnInit} from '@angular/core';
|
||||||
import {FilterType, ICompositeFilter, IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
import {FilterType, ICompositeFilter, IDataSource, ISimpleFilter} from '@poweredsoft/data';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
import {FormsModule} from "@angular/forms";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cdk-ds-search',
|
selector: 'cdk-ds-search',
|
||||||
templateUrl: './ds-search.component.html',
|
templateUrl: './ds-search.component.html',
|
||||||
styleUrls: ['./ds-search.component.scss']
|
styleUrls: ['./ds-search.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, FormsModule]
|
||||||
})
|
})
|
||||||
export class DsSearchComponent implements OnInit {
|
export class DsSearchComponent {
|
||||||
@Input() dataSource: IDataSource<any>;
|
@Input() dataSource: IDataSource<any>;
|
||||||
@Input() filterType: string;
|
@Input() filterType: string;
|
||||||
@Input() filterPaths: string[];
|
@Input() filterPaths: string[];
|
||||||
@ -33,7 +37,6 @@ export class DsSearchComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
applySearch() {
|
applySearch() {
|
||||||
|
|
||||||
const existingFilters = this.dataSource.filters;
|
const existingFilters = this.dataSource.filters;
|
||||||
|
|
||||||
|
|
||||||
@ -68,8 +71,4 @@ export class DsSearchComponent implements OnInit {
|
|||||||
filters: finalNewFilters
|
filters: finalNewFilters
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { DsSearchComponent } from './ds-search.component';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [DsSearchComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
FormsModule
|
|
||||||
],
|
|
||||||
exports: [DsSearchComponent]
|
|
||||||
})
|
|
||||||
export class DsSearchModule { }
|
|
@ -1,11 +1,14 @@
|
|||||||
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
||||||
import {IDataSource} from '@poweredsoft/data';
|
import {IDataSource} from '@poweredsoft/data';
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cdk-ds-validation-error',
|
selector: 'cdk-ds-validation-error',
|
||||||
templateUrl: './ds-validation-error.component.html',
|
templateUrl: './ds-validation-error.component.html',
|
||||||
styleUrls: ['./ds-validation-error.component.scss']
|
styleUrls: ['./ds-validation-error.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule]
|
||||||
})
|
})
|
||||||
export class DsValidationErrorComponent implements OnInit, OnDestroy {
|
export class DsValidationErrorComponent implements OnInit, OnDestroy {
|
||||||
@Input() dataSource: IDataSource<any>;
|
@Input() dataSource: IDataSource<any>;
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {DsValidationErrorComponent} from './ds-validation-error.component';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [DsValidationErrorComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule
|
|
||||||
],
|
|
||||||
exports: [DsValidationErrorComponent]
|
|
||||||
})
|
|
||||||
export class DsValidationErrorModule { }
|
|
@ -23,11 +23,9 @@ export * from './lib/list-view/directives/list-view-footer.directive';
|
|||||||
export * from './lib/list-view/directives/list-view-separator.directive';
|
export * from './lib/list-view/directives/list-view-separator.directive';
|
||||||
|
|
||||||
// search
|
// search
|
||||||
export * from './lib/ds-search/ds-search.module';
|
|
||||||
export * from './lib/ds-search/ds-search.component';
|
export * from './lib/ds-search/ds-search.component';
|
||||||
|
|
||||||
// ds validation
|
// ds validation
|
||||||
export * from './lib/ds-validation-error/ds-validation-error.module';
|
|
||||||
export * from './lib/ds-validation-error/ds-validation-error.component';
|
export * from './lib/ds-validation-error/ds-validation-error.component';
|
||||||
|
|
||||||
// view
|
// view
|
||||||
@ -48,5 +46,4 @@ export * from './lib/ds-command/directives/ds-command-no-command.directive';
|
|||||||
export * from './lib/ds-command/directives/ds-command-error.directive';
|
export * from './lib/ds-command/directives/ds-command-error.directive';
|
||||||
|
|
||||||
// ds-pager
|
// ds-pager
|
||||||
export * from './lib/ds-pager/ds-pager.module';
|
|
||||||
export * from './lib/ds-pager/ds-pager.component';
|
export * from './lib/ds-pager/ds-pager.component';
|
||||||
|
@ -10,7 +10,7 @@ import {HttpLink, HttpLinkModule} from 'apollo-angular-link-http';
|
|||||||
import {DefaultOptions} from 'apollo-client';
|
import {DefaultOptions} from 'apollo-client';
|
||||||
import {InMemoryCache} from 'apollo-cache-inmemory';
|
import {InMemoryCache} from 'apollo-cache-inmemory';
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import {HttpClientModule} from "@angular/common/http";
|
import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
|
||||||
|
|
||||||
|
|
||||||
export function app_Init(apollo: Apollo, httpLink: HttpLink) {
|
export function app_Init(apollo: Apollo, httpLink: HttpLink) {
|
||||||
@ -47,29 +47,22 @@ export function app_Init(apollo: Apollo, httpLink: HttpLink) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({ declarations: [
|
||||||
declarations: [
|
|
||||||
AppComponent,
|
AppComponent,
|
||||||
HomeComponent,
|
HomeComponent,
|
||||||
//SelectLabelTemplateDirective,
|
//SelectLabelTemplateDirective,
|
||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
bootstrap: [AppComponent], imports: [BrowserModule,
|
||||||
BrowserModule,
|
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
HttpClientModule,
|
|
||||||
ApolloModule,
|
ApolloModule,
|
||||||
HttpLinkModule,
|
HttpLinkModule,
|
||||||
BrowserAnimationsModule
|
BrowserAnimationsModule], providers: [
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
{
|
{
|
||||||
provide: APP_INITIALIZER,
|
provide: APP_INITIALIZER,
|
||||||
useFactory: app_Init,
|
useFactory: app_Init,
|
||||||
deps: [Apollo, HttpLink],
|
deps: [Apollo, HttpLink],
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
],
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
bootstrap: [AppComponent]
|
] })
|
||||||
})
|
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* You can add global styles to this file, and also import other style files */
|
/* You can add global styles to this file, and also import other style files */
|
||||||
@import '~bootstrap/scss/bootstrap';
|
@import 'bootstrap/scss/bootstrap';
|
||||||
@import '~ngx-bootstrap/datepicker/bs-datepicker.css';
|
@import 'ngx-bootstrap/datepicker/bs-datepicker.css';
|
||||||
@import "~@ng-select/ng-select/themes/default.theme.css";
|
@import "@ng-select/ng-select/themes/default.theme.css";
|
@ -4,8 +4,8 @@
|
|||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./dist/out-tsc",
|
"outDir": "./dist/out-tsc",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"downlevelIteration": true,
|
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"module": "es2020",
|
"module": "es2020",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
Loading…
Reference in New Issue
Block a user