Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 1c8e4604de | |
allan | e9624635ed | |
Sabir Hassan | f9beda1ddb | |
Sabir Hassan | 53400de110 | |
sabir | cf37ddab22 | |
allan | 802d8a3b08 | |
Sabir Hassan | 1a96bb1233 | |
Mihajlo Medjedovic | 8f796aec36 | |
Mihajlo Medjedovic | 6eb1aa85d2 |
|
@ -1,3 +1,10 @@
|
|||
# [6.5.0](https://git.datacontroller.io/dc/dc/compare/v6.4.0...v6.5.0) (2024-01-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* filtering by reference to Variables as well as Values ([6eb1aa8](https://git.datacontroller.io/dc/dc/commit/6eb1aa85d29294d63e6af377e622fbed7fd1fab8))
|
||||
|
||||
# [6.4.0](https://git.datacontroller.io/dc/dc/compare/v6.3.1...v6.4.0) (2024-01-24)
|
||||
|
||||
|
||||
|
|
|
@ -656,11 +656,10 @@ export class LineageComponent {
|
|||
this.flatdata = res.flatdata
|
||||
|
||||
if (this.libraryList) {
|
||||
let libraryToSelect = this.libraryList.find(
|
||||
(library: any) =>
|
||||
res.info[0]?.LIBURI?.toUpperCase()?.includes(
|
||||
library?.LIBRARYID?.toUpperCase()
|
||||
)
|
||||
let libraryToSelect = this.libraryList.find((library: any) =>
|
||||
res.info[0]?.LIBURI?.toUpperCase()?.includes(
|
||||
library?.LIBRARYID?.toUpperCase()
|
||||
)
|
||||
)
|
||||
|
||||
let tableToSelect: any
|
||||
|
|
|
@ -6,6 +6,7 @@ export interface FilterClause {
|
|||
operators: string[]
|
||||
type: string
|
||||
value: any
|
||||
valueVariable: boolean
|
||||
values: { formatted: string; unformatted: any }[]
|
||||
variable: string
|
||||
}
|
||||
|
|
|
@ -413,7 +413,10 @@
|
|||
>
|
||||
<app-soft-select
|
||||
label="Value"
|
||||
[secondLabel]="'Variable'"
|
||||
[emitOnlySelected]="query.valueVariable"
|
||||
[inputId]="'vals_' + queryIndex + '_' + clauseIndex"
|
||||
(selectedLabelChange)="selectedLabelChange($event, query)"
|
||||
[(value)]="query.value"
|
||||
[enableLoadMore]="query.nobs > query.values.length"
|
||||
(onInputEvent)="
|
||||
|
@ -423,9 +426,19 @@
|
|||
onAutocompleteLoadingMore($event, query.variable, queryIndex, clauseIndex)
|
||||
"
|
||||
>
|
||||
<option [value]="column.unformatted" *ngFor="let column of query.values">
|
||||
{{ column.formatted.trim() }}
|
||||
</option>
|
||||
<div *ngIf="!query.valueVariable">
|
||||
<option [value]="column.unformatted" *ngFor="let column of query.values">
|
||||
{{ column.formatted.trim() }}
|
||||
</option>
|
||||
</div>
|
||||
|
||||
<div *ngIf="query.valueVariable">
|
||||
<ng-container *ngFor="let column of cols">
|
||||
<option [value]="column.NAME" *ngIf="column.TYPE === query.type">
|
||||
{{ column.NAME }}
|
||||
</option>
|
||||
</ng-container>
|
||||
</div>
|
||||
</app-soft-select>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ export class QueryComponent
|
|||
variable: null,
|
||||
operator: null,
|
||||
value: null,
|
||||
valueVariable: false,
|
||||
startrow: 0,
|
||||
rows: 0,
|
||||
nobs: 0,
|
||||
|
@ -193,6 +194,20 @@ export class QueryComponent
|
|||
*/
|
||||
usePickersChange() {
|
||||
this.queryDateTime = []
|
||||
if (this.usePickers) {
|
||||
this.clauses.queryObj.forEach((queryObj: any) => {
|
||||
queryObj.elements.forEach((element: any) => {
|
||||
const isDateOrTime = ['DATETIME', 'TIME', 'DATE'].includes(
|
||||
element.ddtype
|
||||
)
|
||||
|
||||
if (isDateOrTime && element.valueVariable) {
|
||||
element.value = ''
|
||||
element.valueVariable = false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -253,8 +268,6 @@ export class QueryComponent
|
|||
get(globals, objPath).filter.libds = this.libds
|
||||
}
|
||||
get(globals, objPath).filter.clauses = this.clauses
|
||||
|
||||
console.log('globals', globals)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -750,6 +763,12 @@ export class QueryComponent
|
|||
)
|
||||
}
|
||||
|
||||
public selectedLabelChange(label: string, query: any) {
|
||||
query.valueVariable = label === 'Variable'
|
||||
query.value = ''
|
||||
this.whereClauseFn()
|
||||
}
|
||||
|
||||
public variableInputChange(
|
||||
queryVariable: any,
|
||||
index: number,
|
||||
|
|
|
@ -416,14 +416,18 @@ export class SasStoreService {
|
|||
for (let index = 0; index < clauses.queryObj.length; index++) {
|
||||
let string = ''
|
||||
let clause = clauses.queryObj[index]
|
||||
|
||||
for (let ind = 0; ind < clause.elements.length; ind++) {
|
||||
let query = clause.elements[ind]
|
||||
|
||||
if (ind < clause.elements.length - 1) {
|
||||
opr = clause.clauseLogic
|
||||
} else {
|
||||
opr = ''
|
||||
}
|
||||
|
||||
let val: any
|
||||
|
||||
for (let k = 0; k < query.values.length; k++) {
|
||||
if (
|
||||
typeof query.value === 'string' &&
|
||||
|
@ -494,6 +498,8 @@ export class SasStoreService {
|
|||
}
|
||||
|
||||
let type = query.type
|
||||
//if the value is variable, omit quotes in the 'where' string
|
||||
const isValueVariable = query.valueVariable
|
||||
let variable = query.variable === null ? '' : query.variable
|
||||
let oper = query.operator === null ? '' : query.operator
|
||||
// let value = val === null ? "''" : val;
|
||||
|
@ -507,10 +513,14 @@ export class SasStoreService {
|
|||
if (type === 'char' && oper !== 'IN' && oper !== 'NOT IN') {
|
||||
if (typeof value === 'undefined') {
|
||||
value = ''
|
||||
value = " '" + value + "' "
|
||||
} else {
|
||||
value = " '" + value + "' "
|
||||
}
|
||||
|
||||
if (isValueVariable) {
|
||||
value = ' ' + value + ' ' //without quotes, with spaces
|
||||
} else {
|
||||
value = " '" + value + "' " //with quotes and spaces
|
||||
}
|
||||
|
||||
string = string + ' ' + variable + ' ' + oper + value + opr
|
||||
} else {
|
||||
if (type === 'num' && typeof value === 'undefined') {
|
||||
|
@ -604,7 +614,7 @@ export class SasStoreService {
|
|||
rawValue = '.'
|
||||
}
|
||||
} else {
|
||||
if (filterClause.type === 'char') {
|
||||
if (filterClause.type === 'char' && !filterClause.valueVariable) {
|
||||
rawValue = `'${filterClause.value.replace(/'/g, "''")}'`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,22 @@
|
|||
<label *ngIf="label" class="clr-control-label">{{ label }}</label>
|
||||
<label
|
||||
*ngIf="label"
|
||||
[class.secondLabelActive]="secondLabel && secondLabel.length > 0"
|
||||
class="clr-control-label"
|
||||
>
|
||||
<span
|
||||
(click)="onChangeLabel('first')"
|
||||
[class.value-type-selected]="labelSelected === 'first'"
|
||||
>{{ label }}</span
|
||||
>
|
||||
<ng-container *ngIf="secondLabel">
|
||||
/
|
||||
<span
|
||||
(click)="onChangeLabel('second')"
|
||||
[class.value-type-selected]="labelSelected === 'second'"
|
||||
>{{ secondLabel }}</span
|
||||
>
|
||||
</ng-container>
|
||||
</label>
|
||||
<ng-container [ngSwitch]="type">
|
||||
<ng-container *ngSwitchCase="'date'">
|
||||
<clr-date-container>
|
||||
|
|
|
@ -28,4 +28,12 @@ clr-date-container {
|
|||
margin-top: -5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label.secondLabelActive span {
|
||||
&:not(.value-type-selected) {
|
||||
text-decoration: line-through;
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ import { OnLoadingMoreEvent } from '../autocomplete/autocomplete.component'
|
|||
export class SoftSelectComponent implements OnInit, OnChanges {
|
||||
@Input() inputId: string = ''
|
||||
@Input() label: string | undefined
|
||||
@Input() secondLabel: string | undefined
|
||||
@Input() value: Date | string | null = ''
|
||||
@Input() disabled: boolean = false
|
||||
@Input() type: string = 'text'
|
||||
|
@ -30,20 +31,24 @@ export class SoftSelectComponent implements OnInit, OnChanges {
|
|||
@Output() focusinInput: EventEmitter<any> = new EventEmitter()
|
||||
@Output() onAutocompleteLoadingMore: EventEmitter<OnLoadingMoreEvent> =
|
||||
new EventEmitter()
|
||||
@Output() selectedLabelChange: EventEmitter<string> = new EventEmitter()
|
||||
|
||||
@ViewChild('input') inputElement: any
|
||||
|
||||
temp: Date | string | null = ''
|
||||
inputFocused: boolean = false
|
||||
|
||||
labelSelected: LabelTypes = 'first'
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (
|
||||
changes.value &&
|
||||
changes.value.currentValue !== changes.value.previousValue
|
||||
)
|
||||
) {
|
||||
this.valueChange.emit(changes.value.currentValue)
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
@ -85,4 +90,14 @@ export class SoftSelectComponent implements OnInit, OnChanges {
|
|||
onFocusinInput(event: any) {
|
||||
this.focusinInput.emit(event)
|
||||
}
|
||||
|
||||
onChangeLabel(label: LabelTypes) {
|
||||
this.labelSelected = label
|
||||
|
||||
const selectedLabelText = label === 'first' ? this.label : this.secondLabel
|
||||
|
||||
this.selectedLabelChange.emit(selectedLabelText)
|
||||
}
|
||||
}
|
||||
|
||||
export type LabelTypes = 'first' | 'second'
|
||||
|
|
|
@ -145,6 +145,13 @@ export class XLMapComponent implements AfterContentInit, AfterViewInit, OnInit {
|
|||
public xlmapOnClick(xlmap: XLMapListItem) {
|
||||
if (xlmap.id !== this.selectedXLMap?.id) {
|
||||
this.selectedXLMap = xlmap
|
||||
this.xlData = []
|
||||
this.filename = ''
|
||||
this.uploader.queue = []
|
||||
if (this.fileUploadInputCompList.first) {
|
||||
this.fileUploadInputCompList.first.nativeElement.value = ''
|
||||
}
|
||||
this.selectedTab = Tabs.Rules
|
||||
this.viewXLMapRules()
|
||||
this.router.navigateByUrl('/home/files/' + xlmap.id)
|
||||
}
|
||||
|
@ -270,6 +277,7 @@ export class XLMapComponent implements AfterContentInit, AfterViewInit, OnInit {
|
|||
this.isLoadingDesc = ''
|
||||
this.status = Status.ReadyToUpload
|
||||
this.xlData = []
|
||||
this.selectedTab = Tabs.Rules
|
||||
this.filename = ''
|
||||
this.uploader.queue = []
|
||||
if (this.fileUploadInputCompList.first) {
|
||||
|
|
|
@ -18,4 +18,4 @@ In any case, you must not make any such use of this software as to develop softw
|
|||
UNLESS EXPRESSLY AGREED OTHERWISE, 4GL APPS PROVIDES THIS SOFTWARE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO LEGAL THEORY, SHALL 4GL APPS BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM USE OR INABILITY TO USE THIS SOFTWARE.
|
||||
|
||||
|
||||
`
|
||||
`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dcfrontend",
|
||||
"version": "6.4.0",
|
||||
"version": "6.5.0",
|
||||
"description": "Data Controller",
|
||||
"devDependencies": {
|
||||
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||
|
|
Loading…
Reference in New Issue