ng-qubee 1.0.9 → 2.0.2

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 (72) hide show
  1. package/README.md +90 -67
  2. package/esm2022/lib/enums/sort.enum.mjs +6 -0
  3. package/esm2022/lib/errors/key-not-found.error.mjs +6 -0
  4. package/esm2022/lib/errors/unselectable-model.error.mjs +6 -0
  5. package/esm2022/lib/interfaces/config.interface.mjs +2 -0
  6. package/esm2022/lib/interfaces/fields.interface.mjs +2 -0
  7. package/esm2022/lib/interfaces/filters.interface.mjs +2 -0
  8. package/esm2022/lib/interfaces/normalized.interface.mjs +2 -0
  9. package/esm2022/lib/interfaces/paginated-object.interface.mjs +2 -0
  10. package/esm2022/lib/interfaces/pagination-config.interface.mjs +2 -0
  11. package/esm2022/lib/interfaces/query-builder-config.interface.mjs +2 -0
  12. package/esm2022/lib/interfaces/query-builder-state.interface.mjs +2 -0
  13. package/esm2022/lib/interfaces/sort.interface.mjs +2 -0
  14. package/esm2022/lib/models/paginated-collection.mjs +47 -0
  15. package/esm2022/lib/models/query-builder-options.mjs +12 -0
  16. package/esm2022/lib/models/response-options.mjs +17 -0
  17. package/esm2022/lib/ng-qubee.module.mjs +42 -0
  18. package/esm2022/lib/provide-ngqubee.mjs +39 -0
  19. package/esm2022/lib/services/nest.service.mjs +173 -0
  20. package/esm2022/lib/services/ng-qubee.service.mjs +319 -0
  21. package/esm2022/lib/services/pagination.service.mjs +23 -0
  22. package/esm2022/ng-qubee.mjs +5 -0
  23. package/esm2022/public-api.mjs +9 -0
  24. package/fesm2022/ng-qubee.mjs +678 -0
  25. package/fesm2022/ng-qubee.mjs.map +1 -0
  26. package/index.d.ts +5 -0
  27. package/lib/interfaces/normalized.interface.d.ts +3 -0
  28. package/lib/interfaces/paginated-object.interface.d.ts +3 -0
  29. package/lib/interfaces/query-builder-state.interface.d.ts +1 -2
  30. package/lib/interfaces/sort.interface.d.ts +2 -1
  31. package/lib/models/paginated-collection.d.ts +18 -16
  32. package/lib/ng-qubee.module.d.ts +4 -1
  33. package/lib/provide-ngqubee.d.ts +21 -0
  34. package/lib/services/nest.service.d.ts +81 -0
  35. package/lib/{ng-qubee.service.d.ts → services/ng-qubee.service.d.ts} +30 -8
  36. package/lib/services/pagination.service.d.ts +5 -1
  37. package/package.json +20 -18
  38. package/public-api.d.ts +3 -2
  39. package/bundles/ng-qubee.umd.js +0 -909
  40. package/bundles/ng-qubee.umd.js.map +0 -1
  41. package/bundles/ng-qubee.umd.min.js +0 -16
  42. package/bundles/ng-qubee.umd.min.js.map +0 -1
  43. package/esm2015/lib/actions/query-builder.actions.js +0 -17
  44. package/esm2015/lib/enums/sort.enum.js +0 -6
  45. package/esm2015/lib/errors/key-not-found.error.js +0 -6
  46. package/esm2015/lib/errors/unselectable-model.error.js +0 -6
  47. package/esm2015/lib/interfaces/config.interface.js +0 -2
  48. package/esm2015/lib/interfaces/fields.interface.js +0 -2
  49. package/esm2015/lib/interfaces/filters.interface.js +0 -2
  50. package/esm2015/lib/interfaces/nest-state.interface.js +0 -2
  51. package/esm2015/lib/interfaces/pagination-config.interface.js +0 -2
  52. package/esm2015/lib/interfaces/query-builder-config.interface.js +0 -2
  53. package/esm2015/lib/interfaces/query-builder-state.interface.js +0 -2
  54. package/esm2015/lib/interfaces/sort.interface.js +0 -2
  55. package/esm2015/lib/models/paginated-collection.js +0 -45
  56. package/esm2015/lib/models/query-builder-options.js +0 -12
  57. package/esm2015/lib/models/response-options.js +0 -17
  58. package/esm2015/lib/ng-qubee.module.js +0 -33
  59. package/esm2015/lib/ng-qubee.service.js +0 -280
  60. package/esm2015/lib/reducers/query-builder.reducer.js +0 -51
  61. package/esm2015/lib/services/pagination.service.js +0 -18
  62. package/esm2015/lib/services/store.service.js +0 -26
  63. package/esm2015/ng-qubee.js +0 -6
  64. package/esm2015/public-api.js +0 -8
  65. package/fesm2015/ng-qubee.js +0 -508
  66. package/fesm2015/ng-qubee.js.map +0 -1
  67. package/lib/actions/query-builder.actions.d.ts +0 -43
  68. package/lib/interfaces/nest-state.interface.d.ts +0 -4
  69. package/lib/reducers/query-builder.reducer.d.ts +0 -2
  70. package/lib/services/store.service.d.ts +0 -9
  71. package/ng-qubee.d.ts +0 -7
  72. package/ng-qubee.metadata.json +0 -1
@@ -1,508 +0,0 @@
1
- import { ɵɵdefineInjectable, Injectable, Inject, Optional, NgModule } from '@angular/core';
2
- import { stringify } from 'qs';
3
- import { createAction, createReducer } from '@reduxjs/toolkit';
4
- import { BehaviorSubject } from 'rxjs';
5
- import { filter } from 'rxjs/operators';
6
- import { createStore, combineReducers } from 'redux';
7
-
8
- class QueryBuilderOptions {
9
- constructor(options) {
10
- this.appends = options.appends || 'append';
11
- this.fields = options.fields || 'fields';
12
- this.filters = options.filters || 'filter';
13
- this.includes = options.includes || 'include';
14
- this.limit = options.limit || 'limit';
15
- this.page = options.page || 'page';
16
- this.sort = options.sort || 'sort';
17
- }
18
- }
19
-
20
- class UnselectableModelError extends Error {
21
- constructor(model) {
22
- super(`Unselectable Model: the selected model (${model}) is not present neither in the "model" property, nor in the includes object.`);
23
- }
24
- }
25
-
26
- var SortEnum;
27
- (function (SortEnum) {
28
- SortEnum["ASC"] = "asc";
29
- SortEnum["DESC"] = "desc";
30
- })(SortEnum || (SortEnum = {}));
31
-
32
- // Interfaces
33
- const addFields = createAction('[Query Buillder] Add Fields');
34
- const addFilters = createAction('[Query Buillder] Add Filters');
35
- const addIncludes = createAction('[Query Buillder] Add Includes');
36
- const addSorts = createAction('[Query Buillder] Add Sorts');
37
- const deleteFields = createAction('[Query Buillder] Delete Fields');
38
- const deleteFilters = createAction('[Query Buillder] Delete Filters');
39
- const deleteIncludes = createAction('[Query Buillder] Delete Includes');
40
- const deleteSorts = createAction('[Query Buillder] Delete Sorts');
41
- const reset = createAction('[Query Builder] Reset');
42
- const setBaseUrl = createAction('[Query Buillder] Set Base URL');
43
- const setLimit = createAction('[Query Buillder] Set Limit');
44
- const setModel = createAction('[Query Builder] Set Model');
45
- const setPage = createAction('[Query Builder] Set Page');
46
- const updateUri = createAction('[Query Builder] Update URI');
47
-
48
- const initialState = {
49
- baseUrl: '',
50
- fields: {},
51
- filters: {},
52
- includes: [],
53
- limit: 15,
54
- model: '',
55
- page: 1,
56
- sort: {},
57
- uri: ''
58
- };
59
- const ɵ0 = builder => {
60
- builder.addCase(addFields, (state, { payload: { fields } }) => (Object.assign(Object.assign({}, state), { fields: Object.assign(Object.assign({}, state.fields), fields) }))),
61
- builder.addCase(addFilters, (state, { payload: { filters } }) => (Object.assign(Object.assign({}, state), { filters: Object.assign(Object.assign({}, state.filters), filters) }))),
62
- builder.addCase(addIncludes, (state, { payload: { includes } }) => (Object.assign(Object.assign({}, state), { includes: [...state.includes, ...includes] }))),
63
- builder.addCase(addSorts, (state, { payload: { sorts } }) => (Object.assign(Object.assign({}, state), { sort: Object.assign(Object.assign({}, state.sort), sorts) }))),
64
- builder.addCase(deleteFields, (state, { payload: { fields } }) => {
65
- const f = Object.assign({}, state.fields);
66
- Object.keys(fields).forEach(k => {
67
- if (!(k in state.fields)) {
68
- return;
69
- }
70
- f[k] = state.fields[k].filter(v => !fields[k].includes(v));
71
- });
72
- return Object.assign(Object.assign({}, state), { fields: f });
73
- }),
74
- builder.addCase(deleteFilters, (state, { payload: { filters } }) => {
75
- const f = Object.assign({}, state.filters);
76
- filters.forEach(k => delete f[k]);
77
- return Object.assign(Object.assign({}, state), { filters: f });
78
- }),
79
- builder.addCase(deleteIncludes, (state, { payload: { includes } }) => {
80
- return Object.assign(Object.assign({}, state), { includes: state.includes.filter(v => !includes.includes(v)) });
81
- }),
82
- builder.addCase(deleteSorts, (state, { payload: { sorts } }) => {
83
- const s = Object.assign({}, state.sort);
84
- sorts.forEach(v => delete s[v]);
85
- return Object.assign(Object.assign({}, state), { sort: s });
86
- }),
87
- builder.addCase(reset, state => initialState),
88
- builder.addCase(setBaseUrl, (state, { payload: { baseUrl } }) => (Object.assign(Object.assign({}, state), { baseUrl }))),
89
- builder.addCase(setLimit, (state, { payload: { limit } }) => (Object.assign(Object.assign({}, state), { limit }))),
90
- builder.addCase(setModel, (state, { payload: { model } }) => (Object.assign(Object.assign({}, state), { model }))),
91
- builder.addCase(setPage, (state, { payload: { page } }) => (Object.assign(Object.assign({}, state), { page }))),
92
- builder.addCase(updateUri, (state, { payload: { uri } }) => (Object.assign(Object.assign({}, state), { uri })));
93
- };
94
- const queryBuilderReducer = createReducer(initialState, ɵ0);
95
-
96
- class StoreService {
97
- constructor() {
98
- this._store = createStore(combineReducers({ nest: queryBuilderReducer }));
99
- }
100
- get state() {
101
- return this._store.getState();
102
- }
103
- dispatch(action) {
104
- this._store.dispatch(action);
105
- }
106
- subscribe(listener) {
107
- this._store.subscribe(listener);
108
- }
109
- }
110
- StoreService.ɵprov = ɵɵdefineInjectable({ factory: function StoreService_Factory() { return new StoreService(); }, token: StoreService, providedIn: "root" });
111
- StoreService.decorators = [
112
- { type: Injectable, args: [{
113
- providedIn: 'root'
114
- },] }
115
- ];
116
- StoreService.ctorParameters = () => [];
117
-
118
- class NgQubeeService {
119
- constructor(_store, options = {}) {
120
- this._store = _store;
121
- /**
122
- * This property serves as an accumulator for holding the composed string with each query param
123
- */
124
- this._uri = '';
125
- this._uri$ = new BehaviorSubject('');
126
- this.uri$ = this._uri$.asObservable().pipe(filter(uri => !!uri));
127
- this._options = new QueryBuilderOptions(options);
128
- this._store.subscribe(() => {
129
- this._uri$.next(this._store.state.nest.uri);
130
- });
131
- }
132
- _parseFields(s) {
133
- if (!Object.keys(s.fields).length) {
134
- return this._uri;
135
- }
136
- if (!s.model) {
137
- throw new Error('While selecting fields, the -> model <- is required');
138
- }
139
- if (!(s.model in s.fields)) {
140
- throw new Error(`Key ${s.model} is missing in the fields object`);
141
- }
142
- const f = {};
143
- for (const k in s.fields) {
144
- if (s.fields.hasOwnProperty(k)) {
145
- // Check if the key is the model or is declared in "includes".
146
- // If not, it means that has not been selected anywhere and that will cause an error on the API
147
- if (k !== s.model && !s.includes.includes(k)) {
148
- throw new UnselectableModelError(k);
149
- }
150
- Object.assign(f, { [`${this._options.fields}[${k}]`]: s.fields[k].join(',') });
151
- }
152
- }
153
- const param = `${this._prepend(s.model)}${stringify(f, { encode: false })}`;
154
- this._uri += param;
155
- return param;
156
- }
157
- _parseFilters(s) {
158
- const keys = Object.keys(s.filters);
159
- if (!keys.length) {
160
- return this._uri;
161
- }
162
- const f = {
163
- [this._options.filters]: keys.reduce((acc, key) => {
164
- return Object.assign(acc, { [key]: s.filters[key].join(',') });
165
- }, {})
166
- };
167
- const param = `${this._prepend(s.model)}${stringify(f, { encode: false })}`;
168
- this._uri += param;
169
- return param;
170
- }
171
- _parseIncludes(s) {
172
- if (!s.includes.length) {
173
- return this._uri;
174
- }
175
- const param = `${this._prepend(s.model)}${this._options.includes}=${s.includes}`;
176
- this._uri += param;
177
- return param;
178
- }
179
- _parseLimit(s) {
180
- const param = `${this._prepend(s.model)}${this._options.limit}=${s.limit}`;
181
- this._uri += param;
182
- return param;
183
- }
184
- _parsePage(s) {
185
- const param = `${this._prepend(s.model)}${this._options.page}=${s.page}`;
186
- this._uri += param;
187
- return param;
188
- }
189
- _parseSort(s) {
190
- let param = '';
191
- const fields = Object.keys(s.sort);
192
- if (!fields.length) {
193
- return param;
194
- }
195
- param = `${this._prepend(s.model)}${this._options.sort}=`;
196
- fields.forEach((field, idx) => {
197
- param += `${s.sort[field] === SortEnum.DESC ? '-' : ''}${field}`;
198
- if (idx < fields.length - 1) {
199
- param += ',';
200
- }
201
- });
202
- this._uri += param;
203
- return param;
204
- }
205
- _parse(s) {
206
- if (!s.model) {
207
- throw new Error('Set the model property BEFORE adding filters or calling the url() / get() methods');
208
- }
209
- this._parseIncludes(s);
210
- this._parseFields(s);
211
- this._parseFilters(s);
212
- this._parseLimit(s);
213
- this._parsePage(s);
214
- this._parseSort(s);
215
- this._store.dispatch(updateUri({ uri: this._uri }));
216
- }
217
- _prepend(model) {
218
- return this._uri ? '&' : `/${model}?`;
219
- }
220
- /**
221
- * Add fields to the select statement for the given model
222
- *
223
- * @param model Model that holds the fields
224
- * @param fields Fields to select
225
- * @returns {this}
226
- */
227
- addFields(model, fields) {
228
- this._store.dispatch(addFields({
229
- fields: {
230
- [model]: fields
231
- }
232
- }));
233
- return this;
234
- }
235
- /**
236
- * Add a filter with the given value(s)
237
- * I.e. filter[field]=1 or filter[field]=1,2,3
238
- *
239
- * @param {string} field Name of the field to filter
240
- * @param {string[]} value The needle(s)
241
- * @returns {this}
242
- */
243
- addFilter(field, ...values) {
244
- this._store.dispatch(addFilters({
245
- filters: {
246
- [field]: values
247
- }
248
- }));
249
- return this;
250
- }
251
- /**
252
- * Add related entities to include in the request
253
- *
254
- * @param {string[]} models
255
- * @returns
256
- */
257
- addIncludes(...models) {
258
- this._store.dispatch(addIncludes({
259
- includes: models
260
- }));
261
- return this;
262
- }
263
- /**
264
- * Add a field with a sort criteria
265
- *
266
- * @param field Field to use for sorting
267
- * @param {SortEnum} value A value from the SortEnum enumeration
268
- * @returns {this}
269
- */
270
- addSort(field, value) {
271
- this._store.dispatch(addSorts({
272
- sorts: {
273
- [field]: value
274
- }
275
- }));
276
- return this;
277
- }
278
- /**
279
- * Delete selected fields for the given model in the current query builder state
280
- *
281
- * @param model Model that holds the fields
282
- * @param {string[]} fields Fields to delete from the state
283
- * @returns {this}
284
- */
285
- deleteFields(model, ...fields) {
286
- this._store.dispatch(deleteFields({ fields }));
287
- return this;
288
- }
289
- /**
290
- * Remove given filters from the query builder state
291
- *
292
- * @param {string[]} filters Filters to remove
293
- * @returns {this}
294
- */
295
- deleteFilters(...filters) {
296
- this._store.dispatch(deleteFilters({ filters }));
297
- return this;
298
- }
299
- /**
300
- * Remove selected related models from the query builder state
301
- *
302
- * @param {string[]} includes Models to remove
303
- * @returns
304
- */
305
- deleteIncludes(...includes) {
306
- this._store.dispatch(deleteIncludes({ includes }));
307
- return this;
308
- }
309
- /**
310
- * Remove sorts rules from the query builder state
311
- *
312
- * @param sorts Fields used for sorting to remove
313
- * @returns {this}
314
- */
315
- deleteSorts(...sorts) {
316
- this._store.dispatch(deleteSorts({ sorts }));
317
- return this;
318
- }
319
- /**
320
- * Generate an URI accordingly to the given data
321
- *
322
- * @returns {Observable<string>} An observable that emits the generated uri
323
- */
324
- generateUri() {
325
- // Cleanup the previously generated URI
326
- this._uri = '';
327
- this._parse(this._store.state.nest);
328
- return this.uri$;
329
- }
330
- /**
331
- * Clear the current state and reset the Query Builder to a fresh, clean condition
332
- *
333
- * @returns {this}
334
- */
335
- reset() {
336
- this._store.dispatch(reset());
337
- return this;
338
- }
339
- /**
340
- * Set the base url to use for composing the address
341
- *
342
- * @param {string} baseUrl
343
- * @returns {this}
344
- */
345
- setBaseUrl(baseUrl) {
346
- this._store.dispatch(setBaseUrl({ baseUrl }));
347
- return this;
348
- }
349
- /**
350
- * Set the items per page number
351
- *
352
- * @param limit
353
- * @returns {this}
354
- */
355
- setLimit(limit) {
356
- this._store.dispatch(setLimit({ limit }));
357
- return this;
358
- }
359
- /**
360
- * Set the model to use for running the query against
361
- * - I.e. the model "users" will return /users
362
- *
363
- * @param {string} model Model name
364
- * @returns {this}
365
- */
366
- setModel(model) {
367
- this._store.dispatch(setModel({ model }));
368
- return this;
369
- }
370
- /**
371
- * Set the page that the backend will use to paginate the result set
372
- *
373
- * @param page Page param
374
- * @returns {this}
375
- */
376
- setPage(page) {
377
- this._store.dispatch(setPage({ page }));
378
- return this;
379
- }
380
- }
381
- NgQubeeService.decorators = [
382
- { type: Injectable }
383
- ];
384
- NgQubeeService.ctorParameters = () => [
385
- { type: StoreService },
386
- { type: undefined, decorators: [{ type: Inject, args: ['QUERY_PARAMS_CONFIG',] }, { type: Optional }] }
387
- ];
388
-
389
- class KeyNotFoundError extends Error {
390
- constructor(key) {
391
- super(`Cannot find the key ${key} inside the collection item: does it really exists?`);
392
- }
393
- }
394
-
395
- class PaginatedCollection {
396
- constructor(data, page, from, to, total, perPage, prevPageUrl, nextPageUrl, lastPage, firstPageUrl, lastPageUrl) {
397
- this.data = data;
398
- this.page = page;
399
- this.from = from;
400
- this.to = to;
401
- this.total = total;
402
- this.perPage = perPage;
403
- this.prevPageUrl = prevPageUrl;
404
- this.nextPageUrl = nextPageUrl;
405
- this.lastPage = lastPage;
406
- this.firstPageUrl = firstPageUrl;
407
- this.lastPageUrl = lastPageUrl;
408
- //
409
- }
410
- /**
411
- * Normalize the collection to a paginated list of ids for state-managed applciations.
412
- *
413
- * This method returns a single key object, where the key is the page number and the associated value is
414
- * an array of ids. Each id is fetched by the collection items, looking up for the "id" key. If an id is supplied
415
- * to this method, it will be used instead of the default "id" key.
416
- *
417
- * Please note that in case the key doesn't exist in the collection's item, the array will be empty
418
- *
419
- * @param k A key to use instead of the default "id": this will be searched inside each element of the collection
420
- */
421
- normalize(id) {
422
- return {
423
- [this.page]: this.data.reduce((ids, value) => {
424
- if (id && value[id]) {
425
- ids.push(value[id]);
426
- }
427
- else if (value.hasOwnProperty('id')) {
428
- ids.push(value['id']);
429
- }
430
- else {
431
- throw new KeyNotFoundError(id || 'id');
432
- }
433
- return ids;
434
- }, [])
435
- };
436
- }
437
- }
438
-
439
- class ResponseOptions {
440
- constructor(options) {
441
- this.currentPage = options.currentPage || 'current_page';
442
- this.data = options.data || 'data';
443
- this.firstPageUrl = options.firstPageUrl || 'first_page_url';
444
- this.from = options.from || 'from';
445
- this.lastPage = options.lastPage || 'last_page';
446
- this.lastPageUrl = options.lastPageUrl || 'last_page_url';
447
- this.nextPageUrl = options.nextPageUrl || 'next_page_url';
448
- this.path = options.path || 'path';
449
- this.perPage = options.perPage || 'per_page';
450
- this.prevPageUrl = options.prevPageUrl || 'prev_page_url';
451
- this.to = options.to || 'to';
452
- this.total = options.total || 'total';
453
- }
454
- }
455
-
456
- class PaginationService {
457
- constructor(options = {}) {
458
- this._options = new ResponseOptions(options);
459
- }
460
- paginate(response) {
461
- return new PaginatedCollection(response[this._options.data], response[this._options.currentPage], response[this._options.from], response[this._options.to], response[this._options.total], response[this._options.perPage], response[this._options.prevPageUrl], response[this._options.nextPageUrl], response[this._options.lastPage], response[this._options.firstPageUrl], response[this._options.lastPageUrl]);
462
- }
463
- }
464
- PaginationService.decorators = [
465
- { type: Injectable }
466
- ];
467
- PaginationService.ctorParameters = () => [
468
- { type: undefined, decorators: [{ type: Inject, args: ['RESPONSE_OPTIONS',] }, { type: Optional }] }
469
- ];
470
-
471
- const ɵ0$1 = (store) => new NgQubeeService(store, {});
472
- // @dynamic
473
- class NgQubeeModule {
474
- static forRoot(config = {}) {
475
- return {
476
- ngModule: NgQubeeModule,
477
- providers: [{
478
- deps: [StoreService],
479
- provide: NgQubeeService,
480
- useFactory: (store) => new NgQubeeService(store, Object.assign({}, this._config.request, config.request))
481
- }, {
482
- provide: PaginationService,
483
- useFactory: () => new PaginationService(Object.assign({}, this._config.response, config.response))
484
- }]
485
- };
486
- }
487
- }
488
- NgQubeeModule._config = {};
489
- NgQubeeModule.decorators = [
490
- { type: NgModule, args: [{
491
- providers: [{
492
- deps: [StoreService],
493
- provide: NgQubeeService,
494
- useFactory: ɵ0$1
495
- }]
496
- },] }
497
- ];
498
-
499
- /*
500
- * Public API Surface of angular-query-builder
501
- */
502
-
503
- /**
504
- * Generated bundle index. Do not edit.
505
- */
506
-
507
- export { NgQubeeModule, NgQubeeService, PaginatedCollection, PaginationService, ɵ0$1 as ɵ0, StoreService as ɵa };
508
- //# sourceMappingURL=ng-qubee.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ng-qubee.js","sources":["../../../projects/angular-query-builder/src/lib/models/query-builder-options.ts","../../../projects/angular-query-builder/src/lib/errors/unselectable-model.error.ts","../../../projects/angular-query-builder/src/lib/enums/sort.enum.ts","../../../projects/angular-query-builder/src/lib/actions/query-builder.actions.ts","../../../projects/angular-query-builder/src/lib/reducers/query-builder.reducer.ts","../../../projects/angular-query-builder/src/lib/services/store.service.ts","../../../projects/angular-query-builder/src/lib/ng-qubee.service.ts","../../../projects/angular-query-builder/src/lib/errors/key-not-found.error.ts","../../../projects/angular-query-builder/src/lib/models/paginated-collection.ts","../../../projects/angular-query-builder/src/lib/models/response-options.ts","../../../projects/angular-query-builder/src/lib/services/pagination.service.ts","../../../projects/angular-query-builder/src/lib/ng-qubee.module.ts","../../../projects/angular-query-builder/src/public-api.ts","../../../projects/angular-query-builder/src/ng-qubee.ts"],"sourcesContent":["import { IQueryBuilderConfig } from '../interfaces/query-builder-config.interface';\n\nexport class QueryBuilderOptions {\n public readonly appends: string;\n public readonly fields: string;\n public readonly filters: string;\n public readonly includes: string;\n public readonly limit: string;\n public readonly page: string;\n public readonly sort: string;\n\n constructor(options: IQueryBuilderConfig) {\n this.appends = options.appends || 'append';\n this.fields = options.fields || 'fields';\n this.filters = options.filters || 'filter';\n this.includes = options.includes || 'include';\n this.limit = options.limit || 'limit';\n this.page = options.page || 'page';\n this.sort = options.sort || 'sort';\n }\n}","export class UnselectableModelError extends Error {\n constructor(model: string) {\n super(`Unselectable Model: the selected model (${model}) is not present neither in the \"model\" property, nor in the includes object.`);\n }\n}","export enum SortEnum {\n ASC = 'asc',\n DESC = 'desc'\n}","\n// Interfaces\nimport { createAction } from \"@reduxjs/toolkit\";\nimport { IFields } from \"../interfaces/fields.interface\";\nimport { IFilters } from \"../interfaces/filters.interface\";\nimport { ISort } from \"../interfaces/sort.interface\";\n\nexport const addFields = createAction<{fields: IFields}>('[Query Buillder] Add Fields');\n\nexport const addFilters = createAction<{filters: IFilters}>('[Query Buillder] Add Filters');\n\nexport const addIncludes = createAction<{includes: string[]}>('[Query Buillder] Add Includes');\n\nexport const addSorts = createAction<{sorts: ISort}>('[Query Buillder] Add Sorts');\n\nexport const deleteFields = createAction<{fields: string[]}>('[Query Buillder] Delete Fields');\n\nexport const deleteFilters = createAction<{filters: string[]}>('[Query Buillder] Delete Filters');\n\nexport const deleteIncludes = createAction<{includes: string[]}>('[Query Buillder] Delete Includes');\n\nexport const deleteSorts = createAction<{sorts: string[]}>('[Query Buillder] Delete Sorts');\n\nexport const reset = createAction('[Query Builder] Reset');\n\nexport const setBaseUrl = createAction<{baseUrl: string}>('[Query Buillder] Set Base URL');\n\nexport const setLimit = createAction<{limit: number}>('[Query Buillder] Set Limit');\n\nexport const setModel = createAction<{model: string}>('[Query Builder] Set Model');\n\nexport const setPage = createAction<{page: number}>('[Query Builder] Set Page');\n\nexport const updateUri = createAction<{uri: string}>('[Query Builder] Update URI');","import { createReducer } from \"@reduxjs/toolkit\";\nimport * as QueryBuilderActions from \"../actions/query-builder.actions\";\nimport { IQueryBuilderState } from \"../interfaces/query-builder-state.interface\";\n\nconst initialState: IQueryBuilderState = {\n baseUrl: '',\n fields: {},\n filters: {},\n includes: [],\n limit: 15,\n model: '',\n page: 1,\n sort: {},\n uri: ''\n};\n\nexport const queryBuilderReducer = createReducer(\n initialState,\n builder => {\n builder.addCase(QueryBuilderActions.addFields, (state, {payload: {fields}}) => ({...state, fields: {...state.fields, ...fields}})),\n builder.addCase(QueryBuilderActions.addFilters, (state, {payload: {filters}}) => ({...state, filters: {...state.filters, ...filters}})),\n builder.addCase(QueryBuilderActions.addIncludes, (state, {payload: {includes}}) => ({...state, includes: [...state.includes, ...includes]})),\n builder.addCase(QueryBuilderActions.addSorts, (state, {payload: {sorts}}) => ({...state, sort: {...state.sort, ...sorts}})),\n \n builder.addCase(QueryBuilderActions.deleteFields, (state, {payload: {fields}}) => {\n const f = Object.assign({}, state.fields);\n \n Object.keys(fields).forEach(k => {\n if ( !(k in state.fields) ) {\n return;\n }\n \n f[k] = state.fields[k].filter(v => !fields[k].includes(v));\n });\n \n return {\n ...state,\n fields: f\n };\n }),\n \n builder.addCase(QueryBuilderActions.deleteFilters, (state, {payload: {filters}}) => {\n const f = Object.assign({}, state.filters);\n \n filters.forEach(k => delete f[k]);\n \n return {\n ...state,\n filters: f\n };\n }),\n \n builder.addCase(QueryBuilderActions.deleteIncludes, (state, {payload: {includes}}) => {\n return {\n ...state,\n includes: state.includes.filter(v => !includes.includes(v))\n };\n }),\n \n builder.addCase(QueryBuilderActions.deleteSorts, (state, {payload: {sorts}}) => {\n const s = Object.assign({}, state.sort);\n \n sorts.forEach(v => delete s[v]);\n \n return {\n ...state,\n sort: s\n };\n }),\n \n builder.addCase(QueryBuilderActions.reset, state => initialState),\n \n builder.addCase(QueryBuilderActions.setBaseUrl, (state, {payload: {baseUrl}}) => ({...state, baseUrl})),\n builder.addCase(QueryBuilderActions.setLimit, (state, {payload: {limit}}) => ({...state, limit})),\n builder.addCase(QueryBuilderActions.setModel, (state, {payload: {model}}) => ({...state, model})),\n builder.addCase(QueryBuilderActions.setPage, (state, {payload: {page}}) => ({...state, page})),\n builder.addCase(QueryBuilderActions.updateUri, (state, {payload: {uri}}) => ({...state, uri}))\n }\n);","import { Injectable } from '@angular/core';\nimport { Action, combineReducers, createStore, Store } from 'redux';\nimport { INestState } from '../interfaces/nest-state.interface';\nimport { queryBuilderReducer } from '../reducers/query-builder.reducer';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StoreService {\n\n private _store: Store<INestState>;\n\n constructor() {\n this._store = createStore(combineReducers({nest: queryBuilderReducer}));\n }\n\n get state(): INestState {\n return this._store.getState();\n }\n\n public dispatch(action: Action): void {\n this._store.dispatch(action);\n }\n\n public subscribe(listener: () => void) {\n this._store.subscribe(listener);\n }\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { IQueryBuilderConfig } from './interfaces/query-builder-config.interface';\nimport * as qs from 'qs';\nimport { QueryBuilderOptions } from './models/query-builder-options';\nimport { UnselectableModelError } from './errors/unselectable-model.error';\nimport { SortEnum } from './enums/sort.enum';\nimport * as qbActions from './actions/query-builder.actions';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { IQueryBuilderState } from './interfaces/query-builder-state.interface';\nimport { StoreService } from './services/store.service';\n\n@Injectable()\nexport class NgQubeeService {\n\n private _options: QueryBuilderOptions;\n\n /**\n * This property serves as an accumulator for holding the composed string with each query param\n */\n private _uri = '';\n\n private _uri$: BehaviorSubject<string> = new BehaviorSubject('');\n\n public uri$: Observable<string> = this._uri$.asObservable().pipe(\n filter(uri => !!uri)\n );\n\n constructor(private _store: StoreService, @Inject('QUERY_PARAMS_CONFIG') @Optional() options: IQueryBuilderConfig = {}) {\n this._options = new QueryBuilderOptions(options);\n this._store.subscribe(() => {\n this._uri$.next(this._store.state.nest.uri);\n })\n }\n\n private _parseFields(s: IQueryBuilderState): string {\n if (!Object.keys(s.fields).length) {\n return this._uri;\n }\n\n if (!s.model) {\n throw new Error('While selecting fields, the -> model <- is required');\n }\n\n if ( !(s.model in s.fields) ) {\n throw new Error(`Key ${s.model} is missing in the fields object`);\n }\n\n const f = {};\n\n for (const k in s.fields) {\n if (s.fields.hasOwnProperty(k)) {\n // Check if the key is the model or is declared in \"includes\".\n // If not, it means that has not been selected anywhere and that will cause an error on the API\n if (k !== s.model && !s.includes.includes(k)) {\n throw new UnselectableModelError(k);\n }\n\n Object.assign(f, {[`${this._options.fields}[${k}]`]: s.fields[k].join(',')});\n }\n }\n\n const param = `${this._prepend(s.model)}${qs.stringify(f, {encode: false})}`;\n this._uri += param;\n\n return param;\n }\n\n private _parseFilters(s: IQueryBuilderState): string {\n const keys = Object.keys(s.filters);\n\n if (!keys.length) {\n return this._uri;\n }\n\n const f = { \n [this._options.filters]: keys.reduce((acc, key) => {\n return Object.assign(acc, {[key]: s.filters[key].join(',')});\n }, {})\n };\n const param = `${this._prepend(s.model)}${qs.stringify(f, {encode: false})}`;\n this._uri += param;\n\n return param;\n }\n\n private _parseIncludes(s: IQueryBuilderState): string {\n if (!s.includes.length) {\n return this._uri;\n }\n\n const param = `${this._prepend(s.model)}${this._options.includes}=${s.includes}`;\n this._uri += param;\n\n return param;\n }\n\n private _parseLimit(s: IQueryBuilderState): string {\n const param = `${this._prepend(s.model)}${this._options.limit}=${s.limit}`;\n this._uri += param;\n\n return param;\n }\n\n private _parsePage(s: IQueryBuilderState): string {\n const param = `${this._prepend(s.model)}${this._options.page}=${s.page}`;\n this._uri += param;\n\n return param;\n }\n\n private _parseSort(s: IQueryBuilderState): string {\n let param: string = '';\n const fields = Object.keys(s.sort);\n\n if (!fields.length) {\n return param;\n }\n\n param = `${this._prepend(s.model)}${this._options.sort}=`;\n\n fields.forEach((field, idx) => {\n param += `${s.sort[field] === SortEnum.DESC ? '-' : ''}${field}`;\n\n if (idx < fields.length - 1) {\n param += ','\n }\n });\n\n this._uri += param;\n\n return param;\n }\n\n private _parse(s: IQueryBuilderState): void {\n if (!s.model) {\n throw new Error('Set the model property BEFORE adding filters or calling the url() / get() methods');\n }\n\n this._parseIncludes(s);\n this._parseFields(s);\n this._parseFilters(s);\n this._parseLimit(s);\n this._parsePage(s);\n this._parseSort(s);\n\n this._store.dispatch(qbActions.updateUri({uri: this._uri}));\n }\n\n private _prepend(model: string): string {\n return this._uri ? '&' : `/${model}?`;\n }\n\n /**\n * Add fields to the select statement for the given model\n * \n * @param model Model that holds the fields\n * @param fields Fields to select\n * @returns {this}\n */\n public addFields(model: string, fields: string[]): this {\n this._store.dispatch(qbActions.addFields({\n fields: {\n [model]: fields\n }\n }));\n \n return this;\n }\n\n /**\n * Add a filter with the given value(s)\n * I.e. filter[field]=1 or filter[field]=1,2,3\n * \n * @param {string} field Name of the field to filter\n * @param {string[]} value The needle(s)\n * @returns {this}\n */\n public addFilter(field: string, ...values: (string | number | boolean)[]): this {\n this._store.dispatch(qbActions.addFilters({\n filters: {\n [field]: values\n }\n }));\n\n return this;\n }\n\n /**\n * Add related entities to include in the request\n * \n * @param {string[]} models \n * @returns \n */\n public addIncludes(...models: string[]): this {\n this._store.dispatch(qbActions.addIncludes({\n includes: models\n }));\n\n return this;\n }\n\n /**\n * Add a field with a sort criteria\n * \n * @param field Field to use for sorting\n * @param {SortEnum} value A value from the SortEnum enumeration\n * @returns {this}\n */\n public addSort(field: string, value: SortEnum): this {\n this._store.dispatch(qbActions.addSorts({\n sorts: {\n [field]: value\n }\n }));\n\n return this;\n }\n\n /**\n * Delete selected fields for the given model in the current query builder state\n * \n * @param model Model that holds the fields\n * @param {string[]} fields Fields to delete from the state\n * @returns {this}\n */\n public deleteFields(model: string, ...fields: string[]): this {\n this._store.dispatch(qbActions.deleteFields({fields}));\n return this;\n }\n\n /**\n * Remove given filters from the query builder state\n * \n * @param {string[]} filters Filters to remove\n * @returns {this}\n */\n public deleteFilters(...filters: string[]): this {\n this._store.dispatch(qbActions.deleteFilters({filters}));\n return this;\n }\n\n /**\n * Remove selected related models from the query builder state\n * \n * @param {string[]} includes Models to remove\n * @returns \n */\n public deleteIncludes(...includes: string[]): this {\n this._store.dispatch(qbActions.deleteIncludes({includes}));\n return this;\n }\n\n /**\n * Remove sorts rules from the query builder state\n * \n * @param sorts Fields used for sorting to remove\n * @returns {this}\n */\n public deleteSorts(...sorts: string[]): this {\n this._store.dispatch(qbActions.deleteSorts({sorts}));\n return this;\n }\n\n /**\n * Generate an URI accordingly to the given data\n *\n * @returns {Observable<string>} An observable that emits the generated uri\n */\n public generateUri(): Observable<string> {\n // Cleanup the previously generated URI\n this._uri = '';\n this._parse(this._store.state.nest);\n\n return this.uri$;\n }\n\n /**\n * Clear the current state and reset the Query Builder to a fresh, clean condition\n * \n * @returns {this}\n */\n public reset(): this {\n this._store.dispatch(qbActions.reset());\n return this;\n }\n\n /**\n * Set the base url to use for composing the address\n * \n * @param {string} baseUrl \n * @returns {this}\n */\n public setBaseUrl(baseUrl: string): this {\n this._store.dispatch(qbActions.setBaseUrl({baseUrl}));\n return this;\n }\n\n /**\n * Set the items per page number\n * \n * @param limit \n * @returns {this}\n */\n public setLimit(limit: number): this {\n this._store.dispatch(qbActions.setLimit({limit}));\n return this;\n }\n\n /**\n * Set the model to use for running the query against\n * - I.e. the model \"users\" will return /users\n * \n * @param {string} model Model name\n * @returns {this}\n */\n public setModel(model: string): this {\n this._store.dispatch(qbActions.setModel({model}));\n return this;\n }\n\n /**\n * Set the page that the backend will use to paginate the result set\n * \n * @param page Page param\n * @returns {this}\n */\n public setPage(page: number): this {\n this._store.dispatch(qbActions.setPage({page}));\n return this;\n }\n}\n","export class KeyNotFoundError extends Error {\n constructor(key: string) {\n super(`Cannot find the key ${key} inside the collection item: does it really exists?`);\n }\n}","import { KeyNotFoundError } from \"../errors/key-not-found.error\";\n\nexport class PaginatedCollection<T> {\n constructor(\n public data: T[],\n public readonly page: number,\n public readonly from?: number,\n public readonly to?: number,\n public readonly total?: number,\n public readonly perPage?: number,\n public readonly prevPageUrl?: string,\n public readonly nextPageUrl?: string,\n public readonly lastPage?: number,\n public readonly firstPageUrl?: string,\n public readonly lastPageUrl?: string\n ) {\n //\n }\n\n /**\n * Normalize the collection to a paginated list of ids for state-managed applciations.\n * \n * This method returns a single key object, where the key is the page number and the associated value is\n * an array of ids. Each id is fetched by the collection items, looking up for the \"id\" key. If an id is supplied\n * to this method, it will be used instead of the default \"id\" key.\n * \n * Please note that in case the key doesn't exist in the collection's item, the array will be empty\n * \n * @param k A key to use instead of the default \"id\": this will be searched inside each element of the collection\n */\n public normalize(id?: string) {\n return {\n [this.page]: this.data.reduce((ids: any[], value: {[k: string]: any}) => {\n if (id && value[id]) {\n ids.push(value[id]);\n } else if (value.hasOwnProperty('id')) {\n ids.push(value['id']);\n } else {\n throw new KeyNotFoundError(id || 'id');\n }\n\n return ids;\n }, [])\n }\n }\n}","import { IPaginationConfig } from '../interfaces/pagination-config.interface';\nimport { IQueryBuilderConfig } from '../interfaces/query-builder-config.interface';\n\nexport class ResponseOptions {\n public readonly currentPage: string;\n public readonly data: string;\n public readonly firstPageUrl: string;\n public readonly from: string;\n public readonly lastPage: string;\n public readonly lastPageUrl: string;\n public readonly nextPageUrl: string;\n public readonly path: string;\n public readonly perPage: string;\n public readonly prevPageUrl: string;\n public readonly to: string;\n public readonly total: string;\n\n constructor(options: IPaginationConfig) {\n this.currentPage = options.currentPage || 'current_page';\n this.data = options.data || 'data';\n this.firstPageUrl = options.firstPageUrl || 'first_page_url';\n this.from = options.from || 'from';\n this.lastPage = options.lastPage || 'last_page';\n this.lastPageUrl = options.lastPageUrl || 'last_page_url';\n this.nextPageUrl = options.nextPageUrl || 'next_page_url';\n this.path = options.path || 'path';\n this.perPage = options.perPage || 'per_page';\n this.prevPageUrl = options.prevPageUrl || 'prev_page_url';\n this.to = options.to || 'to';\n this.total = options.total || 'total';\n }\n}","import { Inject, Injectable, Optional } from \"@angular/core\";\nimport { IPaginationConfig } from \"../interfaces/pagination-config.interface\";\nimport { PaginatedCollection } from \"../models/paginated-collection\";\nimport { ResponseOptions } from \"../models/response-options\";\n\n@Injectable()\nexport class PaginationService {\n private _options: ResponseOptions;\n \n constructor(@Inject('RESPONSE_OPTIONS') @Optional() options: IPaginationConfig = {}) {\n this._options = new ResponseOptions(options);\n }\n\n public paginate<T>(response: {[key: string]: any}): PaginatedCollection<T> {\n return new PaginatedCollection(\n response[this._options.data],\n response[this._options.currentPage],\n response[this._options.from],\n response[this._options.to],\n response[this._options.total],\n response[this._options.perPage],\n response[this._options.prevPageUrl],\n response[this._options.nextPageUrl],\n response[this._options.lastPage],\n response[this._options.firstPageUrl],\n response[this._options.lastPageUrl]\n );\n }\n}","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { NgQubeeService } from './ng-qubee.service';\nimport { IConfig } from './interfaces/config.interface';\nimport { IPaginationConfig } from './interfaces/pagination-config.interface';\nimport { PaginationService } from './services/pagination.service';\nimport { StoreService } from './services/store.service';\n\n// @dynamic\n@NgModule({\n providers: [{\n deps: [StoreService],\n provide: NgQubeeService,\n useFactory: (store: StoreService) => new NgQubeeService(store, {})\n }]\n})\nexport class NgQubeeModule {\n private static _config: IConfig = {};\n\n public static forRoot(config: IConfig = {}): ModuleWithProviders<NgQubeeModule> {\n return {\n ngModule: NgQubeeModule,\n providers: [{\n deps: [StoreService],\n provide: NgQubeeService,\n useFactory: (store: StoreService) =>\n new NgQubeeService(store, Object.assign({}, this._config.request, config.request))\n }, {\n provide: PaginationService,\n useFactory: () =>\n new PaginationService(Object.assign({}, this._config.response, config.response))\n }]\n };\n }\n}\n","/*\n * Public API Surface of angular-query-builder\n */\n\nexport * from './lib/ng-qubee.service';\nexport * from './lib/ng-qubee.module';\nexport * from './lib/models/paginated-collection';\nexport * from './lib/services/pagination.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {IPaginationConfig as ɵc} from './lib/interfaces/pagination-config.interface';\nexport {IQueryBuilderConfig as ɵb} from './lib/interfaces/query-builder-config.interface';\nexport {StoreService as ɵa} from './lib/services/store.service';"],"names":["QueryBuilderActions.addFields","QueryBuilderActions.addFilters","QueryBuilderActions.addIncludes","QueryBuilderActions.addSorts","QueryBuilderActions.deleteFields","QueryBuilderActions.deleteFilters","QueryBuilderActions.deleteIncludes","QueryBuilderActions.deleteSorts","QueryBuilderActions.reset","QueryBuilderActions.setBaseUrl","QueryBuilderActions.setLimit","QueryBuilderActions.setModel","QueryBuilderActions.setPage","QueryBuilderActions.updateUri","qs.stringify","qbActions.updateUri","qbActions.addFields","qbActions.addFilters","qbActions.addIncludes","qbActions.addSorts","qbActions.deleteFields","qbActions.deleteFilters","qbActions.deleteIncludes","qbActions.deleteSorts","qbActions.reset","qbActions.setBaseUrl","qbActions.setLimit","qbActions.setModel","qbActions.setPage"],"mappings":";;;;;;;MAEa,mBAAmB;IAS5B,YAAY,OAA4B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC;QAC9C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,MAAM,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,EAChC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EACpC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CACpC,CAAC;KACH;;;YAtBF,UAAU;;;4CAII,MAAM,SAAC,kBAAkB,cAAG,QAAQ;;;aCGnC,CAAC,KAAmB,KAAK,IAAI,cAAc,CAAC,KAAK,EAAE,EAAE;AALrE;MAQa,aAAa;IAGjB,OAAO,OAAO,CAAC,SAAkB,EAAE;QACxC,OAAO;YACL,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,CAAC;oBACV,IAAI,EAAE,CAAC,YAAY,CAAC;oBACpB,OAAO,EAAE,cAAc;oBACvB,UAAU,EAAE,CAAC,KAAmB,KAC9B,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;iBACrF,EAAE;oBACD,OAAO,EAAE,iBAAiB;oBAC1B,UAAU,EAAE,MACV,IAAI,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;iBACnF,CAAC;SACH,CAAC;KACH;;AAhBc,qBAAO,GAAY,EAAE,CAAC;;YARtC,QAAQ,SAAC;gBACR,SAAS,EAAE,CAAC;wBACV,IAAI,EAAE,CAAC,YAAY,CAAC;wBACpB,OAAO,EAAE,cAAc;wBACvB,UAAU,MAAwD;qBACnE,CAAC;aACH;;;ACdD;;;;ACAA;;;;;;"}
@@ -1,43 +0,0 @@
1
- import { IFields } from "../interfaces/fields.interface";
2
- import { IFilters } from "../interfaces/filters.interface";
3
- import { ISort } from "../interfaces/sort.interface";
4
- export declare const addFields: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
5
- fields: IFields;
6
- }, string>;
7
- export declare const addFilters: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
8
- filters: IFilters;
9
- }, string>;
10
- export declare const addIncludes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
11
- includes: string[];
12
- }, string>;
13
- export declare const addSorts: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
14
- sorts: ISort;
15
- }, string>;
16
- export declare const deleteFields: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
17
- fields: string[];
18
- }, string>;
19
- export declare const deleteFilters: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
20
- filters: string[];
21
- }, string>;
22
- export declare const deleteIncludes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
23
- includes: string[];
24
- }, string>;
25
- export declare const deleteSorts: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
26
- sorts: string[];
27
- }, string>;
28
- export declare const reset: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"[Query Builder] Reset">;
29
- export declare const setBaseUrl: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
30
- baseUrl: string;
31
- }, string>;
32
- export declare const setLimit: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
33
- limit: number;
34
- }, string>;
35
- export declare const setModel: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
36
- model: string;
37
- }, string>;
38
- export declare const setPage: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
39
- page: number;
40
- }, string>;
41
- export declare const updateUri: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
42
- uri: string;
43
- }, string>;
@@ -1,4 +0,0 @@
1
- import { IQueryBuilderState } from "./query-builder-state.interface";
2
- export interface INestState {
3
- nest: IQueryBuilderState;
4
- }
@@ -1,2 +0,0 @@
1
- import { IQueryBuilderState } from "../interfaces/query-builder-state.interface";
2
- export declare const queryBuilderReducer: import("redux").Reducer<IQueryBuilderState, import("redux").AnyAction>;
@@ -1,9 +0,0 @@
1
- import { Action } from 'redux';
2
- import { INestState } from '../interfaces/nest-state.interface';
3
- export declare class StoreService {
4
- private _store;
5
- constructor();
6
- get state(): INestState;
7
- dispatch(action: Action): void;
8
- subscribe(listener: () => void): void;
9
- }
package/ng-qubee.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
5
- export { IPaginationConfig as ɵc } from './lib/interfaces/pagination-config.interface';
6
- export { IQueryBuilderConfig as ɵb } from './lib/interfaces/query-builder-config.interface';
7
- export { StoreService as ɵa } from './lib/services/store.service';