Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 8b6bf95

Browse files
authored
Merge pull request #4 from ghiscoding/feature/graphql
GraphQL minor patches
2 parents e4af51e + a829bae commit 8b6bf95

File tree

13 files changed

+64
-13
lines changed

13 files changed

+64
-13
lines changed

dist/angular-slickgrid/angular-slickgrid.es5.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
2727
};
2828
import { Observable as Observable$1 } from 'rxjs/Observable';
2929
import 'rxjs/add/operator/first';
30+
import 'rxjs/add/operator/take';
3031
import 'rxjs/add/operator/toPromise';
3132
import 'rxjs/add/operator/map';
3233
import { Component, Injectable, Input, NgModule } from '@angular/core';
@@ -86,6 +87,7 @@ var booleanFilterCondition = function (options) {
8687
return parseBoolean(options.cellValue) === parseBoolean(options.searchTerm);
8788
};
8889
var OperatorType = {};
90+
OperatorType.contains = /** @type {?} */ ('Contains');
8991
OperatorType.lessThan = /** @type {?} */ ('LT');
9092
OperatorType.lessThanOrEqual = /** @type {?} */ ('LE');
9193
OperatorType.greaterThan = /** @type {?} */ ('GT');
@@ -96,6 +98,7 @@ OperatorType.endsWith = /** @type {?} */ ('EndsWith');
9698
OperatorType.startsWith = /** @type {?} */ ('StartsWith');
9799
OperatorType.in = /** @type {?} */ ('IN');
98100
OperatorType.notIn = /** @type {?} */ ('NIN');
101+
OperatorType[OperatorType.contains] = "contains";
99102
OperatorType[OperatorType.lessThan] = "lessThan";
100103
OperatorType[OperatorType.lessThanOrEqual] = "lessThanOrEqual";
101104
OperatorType[OperatorType.greaterThan] = "greaterThan";
@@ -8979,6 +8982,12 @@ var FilterService = /** @class */ (function () {
89798982
processPromise = observableOrPromise;
89808983
if (observableOrPromise instanceof Observable$1) {
89818984
processPromise = observableOrPromise.first().toPromise();
8985+
if (!(processPromise instanceof Promise)) {
8986+
processPromise = observableOrPromise.take(1).toPromise();
8987+
}
8988+
if (!(processPromise instanceof Promise)) {
8989+
throw new Error("Something went wrong, Angular-Slickgrid filter.service is not able to convert the Observable into a Promise.\n If you are using Angular HttpClient, you could try converting your http call to a Promise with \".toPromise()\"\n for example:: this.http.post('graphql', { query: graphqlQuery }).toPromise()\n ");
8990+
}
89828991
}
89838992
return [4 /*yield*/, processPromise];
89848993
case 2:
@@ -9506,9 +9515,11 @@ function mapOperatorType(operator) {
95069515
break;
95079516
case '=':
95089517
case '==':
9509-
default:
95109518
map$$1 = OperatorType.equal;
95119519
break;
9520+
default:
9521+
map$$1 = OperatorType.contains;
9522+
break;
95129523
}
95139524
return map$$1;
95149525
}

dist/angular-slickgrid/angular-slickgrid.es5.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-slickgrid/angular-slickgrid.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-slickgrid/angular-slickgrid.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bundles/angular-slickgrid.umd.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(function (global, factory) {
2-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs/Observable'), require('rxjs/add/operator/first'), require('rxjs/add/operator/toPromise'), require('rxjs/add/operator/map'), require('@angular/core'), require('@angular/router'), require('@angular/common')) :
3-
typeof define === 'function' && define.amd ? define(['exports', 'rxjs/Observable', 'rxjs/add/operator/first', 'rxjs/add/operator/toPromise', 'rxjs/add/operator/map', '@angular/core', '@angular/router', '@angular/common'], factory) :
4-
(factory((global['angular-slickgrid'] = {}),global.Rx,global.Rx.Observable.prototype,global.Rx.Observable.prototype,global.Rx.Observable.prototype,global.ng.core,global.ng.router,global.ng.common));
5-
}(this, (function (exports,Observable,first,toPromise,map,core,router,common) { 'use strict';
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs/Observable'), require('rxjs/add/operator/first'), require('rxjs/add/operator/take'), require('rxjs/add/operator/toPromise'), require('rxjs/add/operator/map'), require('@angular/core'), require('@angular/router'), require('@angular/common')) :
3+
typeof define === 'function' && define.amd ? define(['exports', 'rxjs/Observable', 'rxjs/add/operator/first', 'rxjs/add/operator/take', 'rxjs/add/operator/toPromise', 'rxjs/add/operator/map', '@angular/core', '@angular/router', '@angular/common'], factory) :
4+
(factory((global['angular-slickgrid'] = {}),global.Rx,global.Rx.Observable.prototype,global.Rx.Observable.prototype,global.Rx.Observable.prototype,global.Rx.Observable.prototype,global.ng.core,global.ng.router,global.ng.common));
5+
}(this, (function (exports,Observable,first,take,toPromise,map,core,router,common) { 'use strict';
66

77
var __generator = (this && this.__generator) || function (thisArg, body) {
88
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
@@ -85,6 +85,7 @@ var booleanFilterCondition = function (options) {
8585
return parseBoolean(options.cellValue) === parseBoolean(options.searchTerm);
8686
};
8787
var OperatorType = {};
88+
OperatorType.contains = /** @type {?} */ ('Contains');
8889
OperatorType.lessThan = /** @type {?} */ ('LT');
8990
OperatorType.lessThanOrEqual = /** @type {?} */ ('LE');
9091
OperatorType.greaterThan = /** @type {?} */ ('GT');
@@ -95,6 +96,7 @@ OperatorType.endsWith = /** @type {?} */ ('EndsWith');
9596
OperatorType.startsWith = /** @type {?} */ ('StartsWith');
9697
OperatorType.in = /** @type {?} */ ('IN');
9798
OperatorType.notIn = /** @type {?} */ ('NIN');
99+
OperatorType[OperatorType.contains] = "contains";
98100
OperatorType[OperatorType.lessThan] = "lessThan";
99101
OperatorType[OperatorType.lessThanOrEqual] = "lessThanOrEqual";
100102
OperatorType[OperatorType.greaterThan] = "greaterThan";
@@ -8978,6 +8980,12 @@ var FilterService = /** @class */ (function () {
89788980
processPromise = observableOrPromise;
89798981
if (observableOrPromise instanceof Observable.Observable) {
89808982
processPromise = observableOrPromise.first().toPromise();
8983+
if (!(processPromise instanceof Promise)) {
8984+
processPromise = observableOrPromise.take(1).toPromise();
8985+
}
8986+
if (!(processPromise instanceof Promise)) {
8987+
throw new Error("Something went wrong, Angular-Slickgrid filter.service is not able to convert the Observable into a Promise.\n If you are using Angular HttpClient, you could try converting your http call to a Promise with \".toPromise()\"\n for example:: this.http.post('graphql', { query: graphqlQuery }).toPromise()\n ");
8988+
}
89818989
}
89828990
return [4 /*yield*/, processPromise];
89838991
case 2:
@@ -9505,9 +9513,11 @@ function mapOperatorType(operator) {
95059513
break;
95069514
case '=':
95079515
case '==':
9508-
default:
95099516
map$$1 = OperatorType.equal;
95109517
break;
9518+
default:
9519+
map$$1 = OperatorType.contains;
9520+
break;
95119521
}
95129522
return map$$1;
95139523
}

dist/bundles/angular-slickgrid.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-slickgrid",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Slickgrid components made available in Angular",
55
"keywords": [
66
"angular",

dist/src/app/modules/angular-slickgrid/models/operatorType.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export declare enum OperatorType {
2+
contains,
23
lessThan,
34
lessThanOrEqual,
45
greaterThan,

dist/src/app/modules/angular-slickgrid/services/filter.service.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Column, ColumnFilters, GridOption } from '../models';
22
import 'rxjs/add/operator/first';
3+
import 'rxjs/add/operator/take';
34
import 'rxjs/add/operator/toPromise';
45
import 'rxjs/add/operator/map';
56
export declare class FilterService {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-slickgrid",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Slickgrid components made available in Angular",
55
"keywords": [
66
"angular",

0 commit comments

Comments
 (0)