Skip to content

Commit 1cf22d5

Browse files
committed
fix: missed Vue.js build
1 parent 3a4f9e1 commit 1cf22d5

File tree

4 files changed

+299
-60
lines changed

4 files changed

+299
-60
lines changed

packages/cubejs-client-ngx/dist/cubejs-client-ngx.umd.js

Lines changed: 107 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
return store[key] || (store[key] = value !== undefined ? value : {});
4444
})('versions', []).push({
4545
version: _core.version,
46-
mode: _library ? 'pure' : 'global',
46+
mode: 'global',
4747
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
4848
});
4949
});
@@ -614,7 +614,7 @@
614614

615615
var defineProperty = _objectDp.f;
616616
var _wksDefine = function (name) {
617-
var $Symbol = _core.Symbol || (_core.Symbol = _library ? {} : _global.Symbol || {});
617+
var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {});
618618
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: _wksExt.f(name) });
619619
};
620620

@@ -3950,7 +3950,7 @@
39503950

39513951
function getPromiseCtor(promiseCtor) {
39523952
if (!promiseCtor) {
3953-
promiseCtor = Promise;
3953+
promiseCtor = config.Promise || Promise;
39543954
}
39553955

39563956
if (!promiseCtor) {
@@ -10794,7 +10794,7 @@
1079410794
*
1079510795
* Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
1079610796
* runtime representation) such as when injecting an interface, callable type, array or
10797-
* parametrized type.
10797+
* parameterized type.
1079810798
*
1079910799
* `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
1080010800
* the `Injector`. This provides additional level of type safety.
@@ -10851,15 +10851,16 @@
1085110851
* Use of this source code is governed by an MIT-style license that can be
1085210852
* found in the LICENSE file at https://angular.io/license
1085310853
*/ /**
10854-
* This token can be used to create a virtual provider that will populate the
10855-
* `entryComponents` fields of components and ng modules based on its `useValue`.
10854+
* A DI token that you can use to create a virtual [provider](guide/glossary#provider)
10855+
* that will populate the `entryComponents` field of components and NgModules
10856+
* based on its `useValue` property value.
1085610857
* All components that are referenced in the `useValue` value (either directly
10857-
* or in a nested array or map) will be added to the `entryComponents` property.
10858+
* or in a nested array or map) are added to the `entryComponents` property.
1085810859
*
1085910860
* @usageNotes
10860-
* ### Example
10861+
*
1086110862
* The following example shows how the router can populate the `entryComponents`
10862-
* field of an NgModule based on the router configuration which refers
10863+
* field of an NgModule based on a router configuration that refers
1086310864
* to components.
1086410865
*
1086510866
* ```typescript
@@ -10936,6 +10937,7 @@
1093610937
* Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
1093710938
* until reactivated by setting the strategy to `Default` (`CheckAlways`).
1093810939
* Change detection can still be explicitly invoked.
10940+
* This strategy applies to all child directives and cannot be overridden.
1093910941
*/ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"]=0]="OnPush";/**
1094010942
* Use the default `CheckAlways` strategy, in which change detection is automatic until
1094110943
* explicitly deactivated.
@@ -12679,7 +12681,7 @@
1267912681
* @publicApi
1268012682
*/var Version=/** @class */function(){function Version(full){this.full=full;this.major=full.split('.')[0];this.minor=full.split('.')[1];this.patch=full.split('.').slice(2).join('.');}return Version;}();/**
1268112683
* @publicApi
12682-
*/var VERSION=new Version('7.2.0');/**
12684+
*/var VERSION=new Version('7.2.14');/**
1268312685
* @license
1268412686
* Copyright Google Inc. All Rights Reserved.
1268512687
*
@@ -12762,7 +12764,12 @@
1276212764
// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those
1276312765
// can be sanitized, but they increase security surface area without a legitimate use case, so they
1276412766
// are left out here.
12765-
var VALID_ATTRS=merge$1$1(URI_ATTRS,SRCSET_ATTRS,HTML_ATTRS);var Plural;(function(Plural){Plural[Plural["Zero"]=0]="Zero";Plural[Plural["One"]=1]="One";Plural[Plural["Two"]=2]="Two";Plural[Plural["Few"]=3]="Few";Plural[Plural["Many"]=4]="Many";Plural[Plural["Other"]=5]="Other";})(Plural||(Plural={}));/**
12767+
var VALID_ATTRS=merge$1$1(URI_ATTRS,SRCSET_ATTRS,HTML_ATTRS);// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.
12768+
//
12769+
// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)
12770+
// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we
12771+
// don't want to preserve the content, if the elements themselves are going to be removed.
12772+
var SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS=tagSet('script,style,template');var Plural;(function(Plural){Plural[Plural["Zero"]=0]="Zero";Plural[Plural["One"]=1]="One";Plural[Plural["Two"]=2]="Two";Plural[Plural["Few"]=3]="Few";Plural[Plural["Many"]=4]="Many";Plural[Plural["Other"]=5]="Other";})(Plural||(Plural={}));/**
1276612773
* @license
1276712774
* Copyright Google Inc. All Rights Reserved.
1276812775
*
@@ -12990,7 +12997,7 @@
1299012997
* @Annotation
1299112998
* @publicApi
1299212999
*/var Pipe=makeDecorator('Pipe',function(p){return _assign({pure:true},p);},undefined,undefined,function(type,meta){return SWITCH_COMPILE_PIPE(type,meta);});var initializeBaseDef=function initializeBaseDef(target){var constructor=target.constructor;var inheritedBaseDef=constructor.ngBaseDef;var baseDef=constructor.ngBaseDef={inputs:{},outputs:{},declaredInputs:{}};if(inheritedBaseDef){fillProperties(baseDef.inputs,inheritedBaseDef.inputs);fillProperties(baseDef.outputs,inheritedBaseDef.outputs);fillProperties(baseDef.declaredInputs,inheritedBaseDef.declaredInputs);}};/**
12993-
* Does the work of creating the `ngBaseDef` property for the @Input and @Output decorators.
13000+
* Does the work of creating the `ngBaseDef` property for the `Input` and `Output` decorators.
1299413001
* @param key "inputs" or "outputs"
1299513002
*/var updateBaseDefFromIOProp=function updateBaseDefFromIOProp(getProp){return function(target,name){var args=[];for(var _i=2;_i<arguments.length;_i++){args[_i-2]=arguments[_i];}var constructor=target.constructor;if(!constructor.hasOwnProperty(NG_BASE_DEF)){initializeBaseDef(target);}var baseDef=constructor.ngBaseDef;var defProp=getProp(baseDef);defProp[name]=args[0];};};/**
1299613003
* @Annotation
@@ -13886,6 +13893,94 @@
1388613893
throw e;}}function optionsReducer(dst,objs){if(Array.isArray(objs)){dst=objs.reduce(optionsReducer,dst);}else{dst=_assign({},dst,objs);}return dst;}/**
1388713894
* A reference to an Angular application running on a page.
1388813895
*
13896+
* @usageNotes
13897+
*
13898+
* {@a is-stable-examples}
13899+
* ### isStable examples and caveats
13900+
*
13901+
* Note two important points about `isStable`, demonstrated in the examples below:
13902+
* - the application will never be stable if you start any kind
13903+
* of recurrent asynchronous task when the application starts
13904+
* (for example for a polling process, started with a `setInterval`, a `setTimeout`
13905+
* or using RxJS operators like `interval`);
13906+
* - the `isStable` Observable runs outside of the Angular zone.
13907+
*
13908+
* Let's imagine that you start a recurrent task
13909+
* (here incrementing a counter, using RxJS `interval`),
13910+
* and at the same time subscribe to `isStable`.
13911+
*
13912+
* ```
13913+
* constructor(appRef: ApplicationRef) {
13914+
* appRef.isStable.pipe(
13915+
* filter(stable => stable)
13916+
* ).subscribe(() => console.log('App is stable now');
13917+
* interval(1000).subscribe(counter => console.log(counter));
13918+
* }
13919+
* ```
13920+
* In this example, `isStable` will never emit `true`,
13921+
* and the trace "App is stable now" will never get logged.
13922+
*
13923+
* If you want to execute something when the app is stable,
13924+
* you have to wait for the application to be stable
13925+
* before starting your polling process.
13926+
*
13927+
* ```
13928+
* constructor(appRef: ApplicationRef) {
13929+
* appRef.isStable.pipe(
13930+
* first(stable => stable),
13931+
* tap(stable => console.log('App is stable now')),
13932+
* switchMap(() => interval(1000))
13933+
* ).subscribe(counter => console.log(counter));
13934+
* }
13935+
* ```
13936+
* In this example, the trace "App is stable now" will be logged
13937+
* and then the counter starts incrementing every second.
13938+
*
13939+
* Note also that this Observable runs outside of the Angular zone,
13940+
* which means that the code in the subscription
13941+
* to this Observable will not trigger the change detection.
13942+
*
13943+
* Let's imagine that instead of logging the counter value,
13944+
* you update a field of your component
13945+
* and display it in its template.
13946+
*
13947+
* ```
13948+
* constructor(appRef: ApplicationRef) {
13949+
* appRef.isStable.pipe(
13950+
* first(stable => stable),
13951+
* switchMap(() => interval(1000))
13952+
* ).subscribe(counter => this.value = counter);
13953+
* }
13954+
* ```
13955+
* As the `isStable` Observable runs outside the zone,
13956+
* the `value` field will be updated properly,
13957+
* but the template will not be refreshed!
13958+
*
13959+
* You'll have to manually trigger the change detection to update the template.
13960+
*
13961+
* ```
13962+
* constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
13963+
* appRef.isStable.pipe(
13964+
* first(stable => stable),
13965+
* switchMap(() => interval(1000))
13966+
* ).subscribe(counter => {
13967+
* this.value = counter;
13968+
* cd.detectChanges();
13969+
* });
13970+
* }
13971+
* ```
13972+
*
13973+
* Or make the subscription callback run inside the zone.
13974+
*
13975+
* ```
13976+
* constructor(appRef: ApplicationRef, zone: NgZone) {
13977+
* appRef.isStable.pipe(
13978+
* first(stable => stable),
13979+
* switchMap(() => interval(1000))
13980+
* ).subscribe(counter => zone.run(() => this.value = counter));
13981+
* }
13982+
* ```
13983+
*
1388913984
* @publicApi
1389013985
*/var ApplicationRef=/** @class */function(){/** @internal */function ApplicationRef(_zone,_console,_injector,_exceptionHandler,_componentFactoryResolver,_initStatus){var _this=this;this._zone=_zone;this._console=_console;this._injector=_injector;this._exceptionHandler=_exceptionHandler;this._componentFactoryResolver=_componentFactoryResolver;this._initStatus=_initStatus;this._bootstrapListeners=[];this._views=[];this._runningTick=false;this._enforceNoNewChanges=false;this._stable=true;/**
1389113986
* Get a list of component types registered to this application.

packages/cubejs-vue/dist/cubejs-vue.esm.js

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,9 @@ var QueryBuilder = {
320320
availableMeasures: [],
321321
availableDimensions: [],
322322
availableTimeDimensions: [],
323-
availableSegments: []
323+
availableSegments: [],
324+
limit: null,
325+
offset: null
324326
};
325327
data.granularities = [{
326328
name: 'hour',
@@ -346,7 +348,7 @@ var QueryBuilder = {
346348
_regeneratorRuntime.mark(function _callee() {
347349
var _this = this;
348350

349-
var _this$query, measures, dimensions, segments, timeDimensions, filters;
351+
var _this$query, measures, dimensions, segments, timeDimensions, filters, limit, offset;
350352

351353
return _regeneratorRuntime.wrap(function _callee$(_context) {
352354
while (1) {
@@ -357,7 +359,7 @@ var QueryBuilder = {
357359

358360
case 2:
359361
this.meta = _context.sent;
360-
_this$query = this.query, measures = _this$query.measures, dimensions = _this$query.dimensions, segments = _this$query.segments, timeDimensions = _this$query.timeDimensions, filters = _this$query.filters;
362+
_this$query = this.query, measures = _this$query.measures, dimensions = _this$query.dimensions, segments = _this$query.segments, timeDimensions = _this$query.timeDimensions, filters = _this$query.filters, limit = _this$query.limit, offset = _this$query.offset;
361363
this.measures = (measures || []).map(function (m, i) {
362364
return _objectSpread({
363365
index: i
@@ -383,8 +385,9 @@ var QueryBuilder = {
383385
});
384386
this.filters = (filters || []).map(function (m, i) {
385387
return _objectSpread({}, m, {
386-
dimension: _this.meta.resolveMember(m.dimension, ['dimensions', 'measures']),
387-
operators: _this.meta.filterOperatorsForMember(m.dimension, ['dimensions', 'measures']),
388+
// using 'dimension' is deprecated, 'member' should be specified instead
389+
member: _this.meta.resolveMember(m.member || m.dimension, ['dimensions', 'measures']),
390+
operators: _this.meta.filterOperatorsForMember(m.member || m.dimension, ['dimensions', 'measures']),
388391
index: i
389392
});
390393
});
@@ -394,8 +397,10 @@ var QueryBuilder = {
394397
return m.type === 'time';
395398
});
396399
this.availableSegments = this.meta.membersForQuery({}, 'segments') || [];
400+
this.limit = limit || null;
401+
this.offset = offset || null;
397402

398-
case 13:
403+
case 15:
399404
case "end":
400405
return _context.stop();
401406
}
@@ -424,7 +429,13 @@ var QueryBuilder = {
424429
availableSegments = this.availableSegments,
425430
availableTimeDimensions = this.availableTimeDimensions,
426431
availableDimensions = this.availableDimensions,
427-
availableMeasures = this.availableMeasures;
432+
availableMeasures = this.availableMeasures,
433+
limit = this.limit,
434+
offset = this.offset,
435+
setLimit = this.setLimit,
436+
removeLimit = this.removeLimit,
437+
setOffset = this.setOffset,
438+
removeOffset = this.removeOffset;
428439
var builderProps = {};
429440

430441
if (meta) {
@@ -442,7 +453,13 @@ var QueryBuilder = {
442453
availableTimeDimensions: availableTimeDimensions,
443454
availableDimensions: availableDimensions,
444455
availableMeasures: availableMeasures,
445-
updateChartType: this.updateChart
456+
updateChartType: this.updateChart,
457+
limit: limit,
458+
offset: offset,
459+
setLimit: setLimit,
460+
removeLimit: removeLimit,
461+
setOffset: setOffset,
462+
removeOffset: removeOffset
446463
};
447464
QUERY_ELEMENTS.forEach(function (e) {
448465
var name = e.charAt(0).toUpperCase() + e.slice(1);
@@ -492,10 +509,15 @@ var QueryBuilder = {
492509

493510
var toQuery = function toQuery(member) {
494511
return member.name;
495-
}; // TODO: implement order, limit, timezone, renewQuery
512+
}; // TODO: implement order, timezone, renewQuery
496513

497514

515+
var hasElements = false;
498516
QUERY_ELEMENTS.forEach(function (e) {
517+
if (!_this3[e]) {
518+
return;
519+
}
520+
499521
if (e === 'timeDimensions') {
500522
toQuery = function toQuery(member) {
501523
return {
@@ -507,7 +529,7 @@ var QueryBuilder = {
507529
} else if (e === 'filters') {
508530
toQuery = function toQuery(member) {
509531
return {
510-
dimension: member.dimension.name,
532+
member: member.member.name,
511533
operator: member.operator,
512534
values: member.values
513535
};
@@ -518,13 +540,27 @@ var QueryBuilder = {
518540
validatedQuery[e] = _this3[e].map(function (x) {
519541
return toQuery(x);
520542
});
543+
hasElements = true;
521544
}
522545
}); // TODO: implement default heuristics
523546

524547
if (validatedQuery.filters) {
525548
validatedQuery.filters = validatedQuery.filters.filter(function (f) {
526549
return f.operator;
527550
});
551+
} // only set limit and offset if there are elements otherwise an invalid request with just limit/offset
552+
// gets sent when the component is first mounted, but before the actual query is constructed.
553+
554+
555+
if (hasElements) {
556+
if (this.limit) {
557+
validatedQuery.limit = this.limit;
558+
}
559+
560+
if (this.offset) {
561+
validatedQuery.offset = this.offset;
562+
} // add order
563+
528564
}
529565

530566
return validatedQuery;
@@ -553,10 +589,10 @@ var QueryBuilder = {
553589
});
554590
}
555591
} else if (element === 'filters') {
556-
var _dimension = _objectSpread({}, this.meta.resolveMember(member.dimension, 'dimensions'));
592+
var filterMember = _objectSpread({}, this.meta.resolveMember(member.member || member.dimension, ['dimensions', 'measures']));
557593

558594
mem = _objectSpread({}, member, {
559-
dimension: _dimension
595+
member: filterMember
560596
});
561597
} else {
562598
mem = this["available".concat(name)].find(function (m) {
@@ -621,10 +657,10 @@ var QueryBuilder = {
621657
return x.dimension === old;
622658
});
623659

624-
var _dimension2 = _objectSpread({}, this.meta.resolveMember(member.dimension, 'dimensions'));
660+
var filterMember = _objectSpread({}, this.meta.resolveMember(member.member || member.dimension, ['dimensions', 'measures']));
625661

626662
mem = _objectSpread({}, member, {
627-
dimension: _dimension2
663+
member: filterMember
628664
});
629665
} else {
630666
index = this[element].findIndex(function (x) {
@@ -664,10 +700,10 @@ var QueryBuilder = {
664700
});
665701
}
666702
} else if (element === 'filters') {
667-
var _dimension3 = _objectSpread({}, _this4.meta.resolveMember(m.dimension, 'dimensions'));
703+
var member = _objectSpread({}, _this4.meta.resolveMember(m.member || m.dimension, ['dimensions', 'measures']));
668704

669705
mem = _objectSpread({}, m, {
670-
dimension: _dimension3
706+
member: member
671707
});
672708
} else {
673709
mem = _this4["available".concat(name)].find(function (x) {
@@ -681,6 +717,18 @@ var QueryBuilder = {
681717
});
682718
this[element] = elements;
683719
},
720+
setLimit: function setLimit(limit) {
721+
this.limit = limit;
722+
},
723+
removeLimit: function removeLimit() {
724+
this.limit = null;
725+
},
726+
setOffset: function setOffset(offset) {
727+
this.offset = offset;
728+
},
729+
removeOffset: function removeOffset() {
730+
this.offset = null;
731+
},
684732
updateChart: function updateChart(chartType) {
685733
this.chartType = chartType;
686734
}

0 commit comments

Comments
 (0)