@skyux/list-builder-common 5.0.0 → 5.5.0-alpha.0

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 (52) hide show
  1. package/README.md +6 -4
  2. package/bundles/skyux-list-builder-common.umd.js +23 -10
  3. package/documentation.json +20 -266
  4. package/esm2015/index.js +12 -0
  5. package/esm2015/index.js.map +1 -0
  6. package/esm2015/lib/helpers.js +60 -0
  7. package/esm2015/lib/helpers.js.map +1 -0
  8. package/esm2015/lib/rxstate/async-item.js +12 -0
  9. package/esm2015/lib/rxstate/async-item.js.map +1 -0
  10. package/esm2015/lib/rxstate/async-list.js +13 -0
  11. package/esm2015/lib/rxstate/async-list.js.map +1 -0
  12. package/esm2015/lib/rxstate/helpers.js +12 -0
  13. package/esm2015/lib/rxstate/helpers.js.map +1 -0
  14. package/esm2015/lib/rxstate/state-dispatcher.js +7 -0
  15. package/esm2015/lib/rxstate/state-dispatcher.js.map +1 -0
  16. package/esm2015/lib/rxstate/state-node.js +37 -0
  17. package/esm2015/lib/rxstate/state-node.js.map +1 -0
  18. package/esm2015/lib/rxstate/state-orchestrator.js +39 -0
  19. package/esm2015/lib/rxstate/state-orchestrator.js.map +1 -0
  20. package/esm2015/lib/state/items/item.model.js +15 -0
  21. package/esm2015/lib/state/items/item.model.js.map +1 -0
  22. package/esm2015/lib/state/sort/field-selector.model.js +13 -0
  23. package/esm2015/lib/state/sort/field-selector.model.js.map +1 -0
  24. package/esm2015/skyux-list-builder-common.js +2 -2
  25. package/esm2015/skyux-list-builder-common.js.map +1 -0
  26. package/fesm2015/skyux-list-builder-common.js +20 -7
  27. package/fesm2015/skyux-list-builder-common.js.map +1 -1
  28. package/index.d.ts +9 -0
  29. package/{helpers.d.ts → lib/helpers.d.ts} +4 -1
  30. package/{rxstate → lib/rxstate}/async-item.d.ts +0 -0
  31. package/{rxstate → lib/rxstate}/async-list.d.ts +0 -0
  32. package/{rxstate → lib/rxstate}/helpers.d.ts +1 -0
  33. package/{rxstate → lib/rxstate}/state-dispatcher.d.ts +0 -0
  34. package/{rxstate → lib/rxstate}/state-node.d.ts +0 -0
  35. package/{rxstate → lib/rxstate}/state-orchestrator.d.ts +0 -0
  36. package/{state → lib/state}/items/item.model.d.ts +0 -0
  37. package/{state → lib/state}/sort/field-selector.model.d.ts +0 -0
  38. package/package.json +4 -4
  39. package/skyux-list-builder-common.d.ts +1 -1
  40. package/LICENSE +0 -21
  41. package/bundles/skyux-list-builder-common.umd.js.map +0 -1
  42. package/esm2015/helpers.js +0 -55
  43. package/esm2015/public-api.js +0 -12
  44. package/esm2015/rxstate/async-item.js +0 -12
  45. package/esm2015/rxstate/async-list.js +0 -13
  46. package/esm2015/rxstate/helpers.js +0 -11
  47. package/esm2015/rxstate/state-dispatcher.js +0 -7
  48. package/esm2015/rxstate/state-node.js +0 -35
  49. package/esm2015/rxstate/state-orchestrator.js +0 -34
  50. package/esm2015/state/items/item.model.js +0 -15
  51. package/esm2015/state/sort/field-selector.model.js +0 -13
  52. package/public-api.d.ts +0 -9
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
- # @skyux/list-builder-common
1
+ # list-builder-common
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@skyux/list-builder-common.svg)](https://www.npmjs.com/package/@skyux/list-builder-common)
4
- ![SKY UX CI](https://github.com/blackbaud/skyux-list-builder-common/workflows/SKY%20UX%20CI/badge.svg)
5
- [![coverage](https://codecov.io/gh/blackbaud/skyux-list-builder-common/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/gh/blackbaud/skyux-list-builder-common/branch/master)
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test list-builder-common` to execute the unit tests.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) :
3
3
  typeof define === 'function' && define.amd ? define('@skyux/list-builder-common', ['exports', 'rxjs', 'rxjs/operators'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux['list-builder-common'] = {}), global.rxjs, global.rxjs.operators));
5
- }(this, (function (exports, rxjs, operators) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["list-builder-common"] = {}), global.rxjs, global.rxjs.operators));
5
+ })(this, (function (exports, rxjs, operators) { 'use strict';
6
6
 
7
7
  var ListItemModel = /** @class */ (function () {
8
8
  function ListItemModel(id, data, isSelected) {
@@ -34,6 +34,7 @@
34
34
  return ListSortFieldSelectorModel;
35
35
  }());
36
36
 
37
+ /** @internal */
37
38
  function getData(item, selector) {
38
39
  if (!selector) {
39
40
  return undefined;
@@ -59,6 +60,7 @@
59
60
  }
60
61
  return result;
61
62
  }
63
+ /** @internal */
62
64
  function compare(value1, value2) {
63
65
  /* tslint:disable:no-null-keyword */
64
66
  if (value1 === null) {
@@ -83,9 +85,12 @@
83
85
  Taken directly from rxjs's internal utility to determine whether an object is an Obserable.
84
86
  See: https://github.com/ReactiveX/rxjs/blob/master/src/internal/util/isObservable.ts
85
87
  */
88
+ /** @internal */
86
89
  function isObservable(obj) {
87
90
  /* istanbul ignore next */
88
- return !!obj && (obj instanceof rxjs.Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
91
+ return (!!obj &&
92
+ (obj instanceof rxjs.Observable ||
93
+ (typeof obj.lift === 'function' && typeof obj.subscribe === 'function')));
89
94
  }
90
95
 
91
96
  /**
@@ -122,6 +127,7 @@
122
127
  return AsyncList;
123
128
  }());
124
129
 
130
+ /** @internal */
125
131
  function getValue(property, callback) {
126
132
  if (property instanceof rxjs.Observable) {
127
133
  property.subscribe(function (value) { return callback(value); });
@@ -367,7 +373,7 @@
367
373
  ar[i] = from[i];
368
374
  }
369
375
  }
370
- return to.concat(ar || from);
376
+ return to.concat(ar || Array.prototype.slice.call(from));
371
377
  }
372
378
  function __await(v) {
373
379
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -484,8 +490,9 @@
484
490
  var _this = this;
485
491
  var stateKeys = Object.keys(this.stateMap);
486
492
  var init = this.initialState;
487
- var orchestrators = stateKeys.map(function (key) { return new (_this.stateMap[key])().scan(init[key], _this.dispatcher); });
488
- rxjs.zip.apply(this, orchestrators)
493
+ var orchestrators = stateKeys.map(function (key) { return new _this.stateMap[key]().scan(init[key], _this.dispatcher); });
494
+ rxjs.zip
495
+ .apply(this, orchestrators)
489
496
  .pipe(operators.map(function (s) {
490
497
  var result = {};
491
498
  for (var i = 0; i < stateKeys.length; i++) {
@@ -493,7 +500,8 @@
493
500
  result[key] = s[i];
494
501
  }
495
502
  return result;
496
- })).subscribe(function (s) { return _this.next(s); });
503
+ }))
504
+ .subscribe(function (s) { return _this.next(s); });
497
505
  };
498
506
  return StateNode;
499
507
  }(rxjs.BehaviorSubject));
@@ -523,8 +531,13 @@
523
531
  for (var i = 0; i < _this.registeredActions.length; i++) {
524
532
  var a = _this.registeredActions[i];
525
533
  // length is seemingly arbitrary but it's a stopgap to prevent checking via constructor name when code is minified
526
- if (action instanceof a || (a.name.length > 4 && action.constructor.name === a.name)) {
527
- return _this.registeredCallbacks[i].apply(_this, [state, action, initialState]);
534
+ if (action instanceof a ||
535
+ (a.name.length > 4 && action.constructor.name === a.name)) {
536
+ return _this.registeredCallbacks[i].apply(_this, [
537
+ state,
538
+ action,
539
+ initialState,
540
+ ]);
528
541
  }
529
542
  }
530
543
  return state;
@@ -551,5 +564,5 @@
551
564
 
552
565
  Object.defineProperty(exports, '__esModule', { value: true });
553
566
 
554
- })));
567
+ }));
555
568
  //# sourceMappingURL=skyux-list-builder-common.umd.js.map
@@ -1,16 +1,12 @@
1
1
  {
2
2
  "anchorIds": {
3
3
  "ListItemModel": "class-listitemmodel",
4
- "ListSortFieldSelectorModel": "class-listsortfieldselectormodel",
5
- "compare": "function-compare",
6
- "getData": "function-getdata",
7
- "getValue": "function-getvalue",
8
- "isObservable": "function-isobservable"
4
+ "ListSortFieldSelectorModel": "class-listsortfieldselectormodel"
9
5
  },
10
6
  "typedoc": {
11
7
  "id": 0,
12
8
  "name": "@skyux/list-builder-common",
13
- "kind": 0,
9
+ "kind": 1,
14
10
  "kindString": "Project",
15
11
  "flags": {},
16
12
  "originalName": "",
@@ -30,8 +26,8 @@
30
26
  "flags": {},
31
27
  "sources": [
32
28
  {
33
- "fileName": "projects/list-builder-common/src/state/items/item.model.ts",
34
- "line": 20,
29
+ "fileName": "libs/components/list-builder-common/src/lib/state/items/item.model.ts",
30
+ "line": 19,
35
31
  "character": 2
36
32
  }
37
33
  ],
@@ -102,8 +98,8 @@
102
98
  },
103
99
  "sources": [
104
100
  {
105
- "fileName": "projects/list-builder-common/src/state/items/item.model.ts",
106
- "line": 6,
101
+ "fileName": "libs/components/list-builder-common/src/lib/state/items/item.model.ts",
102
+ "line": 5,
107
103
  "character": 9
108
104
  }
109
105
  ],
@@ -131,8 +127,8 @@
131
127
  },
132
128
  "sources": [
133
129
  {
134
- "fileName": "projects/list-builder-common/src/state/items/item.model.ts",
135
- "line": 12,
130
+ "fileName": "libs/components/list-builder-common/src/lib/state/items/item.model.ts",
131
+ "line": 11,
136
132
  "character": 9
137
133
  }
138
134
  ],
@@ -161,8 +157,8 @@
161
157
  },
162
158
  "sources": [
163
159
  {
164
- "fileName": "projects/list-builder-common/src/state/items/item.model.ts",
165
- "line": 18,
160
+ "fileName": "libs/components/list-builder-common/src/lib/state/items/item.model.ts",
161
+ "line": 17,
166
162
  "character": 9
167
163
  }
168
164
  ],
@@ -192,7 +188,7 @@
192
188
  ],
193
189
  "sources": [
194
190
  {
195
- "fileName": "projects/list-builder-common/src/state/items/item.model.ts",
191
+ "fileName": "libs/components/list-builder-common/src/lib/state/items/item.model.ts",
196
192
  "line": 1,
197
193
  "character": 13
198
194
  }
@@ -213,8 +209,8 @@
213
209
  "flags": {},
214
210
  "sources": [
215
211
  {
216
- "fileName": "projects/list-builder-common/src/state/sort/field-selector.model.ts",
217
- "line": 13,
212
+ "fileName": "libs/components/list-builder-common/src/lib/state/sort/field-selector.model.ts",
213
+ "line": 12,
218
214
  "character": 2
219
215
  }
220
216
  ],
@@ -261,8 +257,8 @@
261
257
  },
262
258
  "sources": [
263
259
  {
264
- "fileName": "projects/list-builder-common/src/state/sort/field-selector.model.ts",
265
- "line": 6,
260
+ "fileName": "libs/components/list-builder-common/src/lib/state/sort/field-selector.model.ts",
261
+ "line": 5,
266
262
  "character": 9
267
263
  }
268
264
  ],
@@ -285,8 +281,8 @@
285
281
  },
286
282
  "sources": [
287
283
  {
288
- "fileName": "projects/list-builder-common/src/state/sort/field-selector.model.ts",
289
- "line": 11,
284
+ "fileName": "libs/components/list-builder-common/src/lib/state/sort/field-selector.model.ts",
285
+ "line": 10,
290
286
  "character": 9
291
287
  }
292
288
  ],
@@ -315,243 +311,11 @@
315
311
  ],
316
312
  "sources": [
317
313
  {
318
- "fileName": "projects/list-builder-common/src/state/sort/field-selector.model.ts",
314
+ "fileName": "libs/components/list-builder-common/src/lib/state/sort/field-selector.model.ts",
319
315
  "line": 1,
320
316
  "character": 13
321
317
  }
322
318
  ]
323
- },
324
- {
325
- "id": 20,
326
- "name": "compare",
327
- "kind": 64,
328
- "kindString": "Function",
329
- "flags": {},
330
- "sources": [
331
- {
332
- "fileName": "projects/list-builder-common/src/helpers.ts",
333
- "line": 36,
334
- "character": 16
335
- }
336
- ],
337
- "signatures": [
338
- {
339
- "id": 21,
340
- "name": "compare",
341
- "kind": 4096,
342
- "kindString": "Call signature",
343
- "flags": {},
344
- "parameters": [
345
- {
346
- "id": 22,
347
- "name": "value1",
348
- "kind": 32768,
349
- "kindString": "Parameter",
350
- "flags": {},
351
- "type": {
352
- "type": "intrinsic",
353
- "name": "any"
354
- }
355
- },
356
- {
357
- "id": 23,
358
- "name": "value2",
359
- "kind": 32768,
360
- "kindString": "Parameter",
361
- "flags": {},
362
- "type": {
363
- "type": "intrinsic",
364
- "name": "any"
365
- }
366
- }
367
- ],
368
- "type": {
369
- "type": "union",
370
- "types": [
371
- {
372
- "type": "literal",
373
- "value": 1
374
- },
375
- {
376
- "type": "literal",
377
- "value": -1
378
- },
379
- {
380
- "type": "literal",
381
- "value": 0
382
- }
383
- ]
384
- }
385
- }
386
- ]
387
- },
388
- {
389
- "id": 16,
390
- "name": "getData",
391
- "kind": 64,
392
- "kindString": "Function",
393
- "flags": {},
394
- "sources": [
395
- {
396
- "fileName": "projects/list-builder-common/src/helpers.ts",
397
- "line": 5,
398
- "character": 16
399
- }
400
- ],
401
- "signatures": [
402
- {
403
- "id": 17,
404
- "name": "getData",
405
- "kind": 4096,
406
- "kindString": "Call signature",
407
- "flags": {},
408
- "parameters": [
409
- {
410
- "id": 18,
411
- "name": "item",
412
- "kind": 32768,
413
- "kindString": "Parameter",
414
- "flags": {},
415
- "type": {
416
- "type": "intrinsic",
417
- "name": "any"
418
- }
419
- },
420
- {
421
- "id": 19,
422
- "name": "selector",
423
- "kind": 32768,
424
- "kindString": "Parameter",
425
- "flags": {},
426
- "type": {
427
- "type": "intrinsic",
428
- "name": "string"
429
- }
430
- }
431
- ],
432
- "type": {
433
- "type": "intrinsic",
434
- "name": "any"
435
- }
436
- }
437
- ]
438
- },
439
- {
440
- "id": 52,
441
- "name": "getValue",
442
- "kind": 64,
443
- "kindString": "Function",
444
- "flags": {},
445
- "sources": [
446
- {
447
- "fileName": "projects/list-builder-common/src/rxstate/helpers.ts",
448
- "line": 5,
449
- "character": 16
450
- }
451
- ],
452
- "signatures": [
453
- {
454
- "id": 53,
455
- "name": "getValue",
456
- "kind": 4096,
457
- "kindString": "Call signature",
458
- "flags": {},
459
- "parameters": [
460
- {
461
- "id": 54,
462
- "name": "property",
463
- "kind": 32768,
464
- "kindString": "Parameter",
465
- "flags": {},
466
- "type": {
467
- "type": "intrinsic",
468
- "name": "any"
469
- }
470
- },
471
- {
472
- "id": 55,
473
- "name": "callback",
474
- "kind": 32768,
475
- "kindString": "Parameter",
476
- "flags": {},
477
- "type": {
478
- "type": "intrinsic",
479
- "name": "any"
480
- }
481
- }
482
- ],
483
- "type": {
484
- "type": "reference",
485
- "typeArguments": [
486
- {
487
- "type": "intrinsic",
488
- "name": "any"
489
- }
490
- ],
491
- "name": "Observable"
492
- }
493
- }
494
- ]
495
- },
496
- {
497
- "id": 24,
498
- "name": "isObservable",
499
- "kind": 64,
500
- "kindString": "Function",
501
- "flags": {},
502
- "sources": [
503
- {
504
- "fileName": "projects/list-builder-common/src/helpers.ts",
505
- "line": 63,
506
- "character": 16
507
- }
508
- ],
509
- "signatures": [
510
- {
511
- "id": 25,
512
- "name": "isObservable",
513
- "kind": 4096,
514
- "kindString": "Call signature",
515
- "flags": {},
516
- "typeParameter": [
517
- {
518
- "id": 26,
519
- "name": "T",
520
- "kind": 131072,
521
- "kindString": "Type parameter",
522
- "flags": {}
523
- }
524
- ],
525
- "parameters": [
526
- {
527
- "id": 27,
528
- "name": "obj",
529
- "kind": 32768,
530
- "kindString": "Parameter",
531
- "flags": {},
532
- "type": {
533
- "type": "intrinsic",
534
- "name": "any"
535
- }
536
- }
537
- ],
538
- "type": {
539
- "type": "predicate",
540
- "name": "obj",
541
- "asserts": false,
542
- "targetType": {
543
- "type": "reference",
544
- "typeArguments": [
545
- {
546
- "type": "reference",
547
- "name": "T"
548
- }
549
- ],
550
- "name": "Observable"
551
- }
552
- }
553
- }
554
- ]
555
319
  }
556
320
  ],
557
321
  "groups": [
@@ -562,25 +326,15 @@
562
326
  1,
563
327
  10
564
328
  ]
565
- },
566
- {
567
- "title": "Functions",
568
- "kind": 64,
569
- "children": [
570
- 20,
571
- 16,
572
- 52,
573
- 24
574
- ]
575
329
  }
576
330
  ],
577
331
  "sources": [
578
332
  {
579
- "fileName": "projects/list-builder-common/src/public-api.ts",
333
+ "fileName": "libs/components/list-builder-common/src/index.ts",
580
334
  "line": 1,
581
335
  "character": 0
582
336
  }
583
337
  ]
584
338
  },
585
339
  "codeExamples": []
586
- }
340
+ }
@@ -0,0 +1,12 @@
1
+ export * from './lib/state/items/item.model';
2
+ export * from './lib/state/sort/field-selector.model';
3
+ export * from './lib/helpers';
4
+ // The following exports were migrated from `microedge-rxstate`.
5
+ // See: https://github.com/blackbaud/microedge-rxstate
6
+ export * from './lib/rxstate/async-item';
7
+ export * from './lib/rxstate/async-list';
8
+ export * from './lib/rxstate/helpers';
9
+ export * from './lib/rxstate/state-dispatcher';
10
+ export * from './lib/rxstate/state-node';
11
+ export * from './lib/rxstate/state-orchestrator';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/list-builder-common/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,eAAe,CAAC;AAE9B,gEAAgE;AAChE,sDAAsD;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './lib/state/items/item.model';\nexport * from './lib/state/sort/field-selector.model';\nexport * from './lib/helpers';\n\n// The following exports were migrated from `microedge-rxstate`.\n// See: https://github.com/blackbaud/microedge-rxstate\nexport * from './lib/rxstate/async-item';\nexport * from './lib/rxstate/async-list';\nexport * from './lib/rxstate/helpers';\nexport * from './lib/rxstate/state-dispatcher';\nexport * from './lib/rxstate/state-node';\nexport * from './lib/rxstate/state-orchestrator';\n"]}
@@ -0,0 +1,60 @@
1
+ import { Observable } from 'rxjs';
2
+ /** @internal */
3
+ export function getData(item, selector) {
4
+ if (!selector) {
5
+ return undefined;
6
+ }
7
+ let resultFieldParts = selector.split('.');
8
+ if (resultFieldParts.length > 0 && resultFieldParts[0] === '') {
9
+ resultFieldParts.shift();
10
+ }
11
+ let result = item;
12
+ /* istanbul ignore else */
13
+ if (resultFieldParts.length > 0) {
14
+ for (let index = 0; index < resultFieldParts.length; index++) {
15
+ let part = resultFieldParts[index];
16
+ /* tslint:disable:no-null-keyword */
17
+ /* istanbul ignore else */
18
+ if (result[part] === null || result[part] === undefined) {
19
+ result = null;
20
+ break;
21
+ }
22
+ /* tslint:enable:no-null-keyword */
23
+ result = result[part];
24
+ }
25
+ }
26
+ return result;
27
+ }
28
+ /** @internal */
29
+ export function compare(value1, value2) {
30
+ /* tslint:disable:no-null-keyword */
31
+ if (value1 === null) {
32
+ return 1;
33
+ }
34
+ else if (value2 === null) {
35
+ return -1;
36
+ }
37
+ /* tslint:enable:no-null-keyword */
38
+ if (value1 && typeof value1 === 'string') {
39
+ value1 = value1.toLowerCase();
40
+ }
41
+ if (value2 && typeof value2 === 'string') {
42
+ value2 = value2.toLowerCase();
43
+ }
44
+ if (value1 === value2) {
45
+ return 0;
46
+ }
47
+ return value1 > value2 ? 1 : -1;
48
+ }
49
+ /*
50
+ Taken directly from rxjs's internal utility to determine whether an object is an Obserable.
51
+ See: https://github.com/ReactiveX/rxjs/blob/master/src/internal/util/isObservable.ts
52
+ */
53
+ /** @internal */
54
+ export function isObservable(obj) {
55
+ /* istanbul ignore next */
56
+ return (!!obj &&
57
+ (obj instanceof Observable ||
58
+ (typeof obj.lift === 'function' && typeof obj.subscribe === 'function')));
59
+ }
60
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../libs/components/list-builder-common/src/lib/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,gBAAgB;AAChB,MAAM,UAAU,OAAO,CAAC,IAAS,EAAE,QAAgB;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,gBAAgB,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;QAC7D,gBAAgB,CAAC,KAAK,EAAE,CAAC;KAC1B;IAED,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,0BAA0B;IAC1B,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC5D,IAAI,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;YACnC,oCAAoC;YACpC,0BAA0B;YAC1B,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE;gBACvD,MAAM,GAAG,IAAI,CAAC;gBACd,MAAM;aACP;YACD,mCAAmC;YAEnC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;SACvB;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,OAAO,CAAC,MAAW,EAAE,MAAW;IAC9C,oCAAoC;IACpC,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,CAAC,CAAC;KACV;SAAM,IAAI,MAAM,KAAK,IAAI,EAAE;QAC1B,OAAO,CAAC,CAAC,CAAC;KACX;IACD,mCAAmC;IAEnC,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QACxC,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;KAC/B;IAED,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QACxC,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;KAC/B;IACD,IAAI,MAAM,KAAK,MAAM,EAAE;QACrB,OAAO,CAAC,CAAC;KACV;IAED,OAAO,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;EAGE;AACF,gBAAgB;AAChB,MAAM,UAAU,YAAY,CAAI,GAAQ;IACtC,0BAA0B;IAC1B,OAAO,CACL,CAAC,CAAC,GAAG;QACL,CAAC,GAAG,YAAY,UAAU;YACxB,CAAC,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,UAAU,CAAC,CAAC,CAC3E,CAAC;AACJ,CAAC","sourcesContent":["import { Observable } from 'rxjs';\n\n/** @internal */\nexport function getData(item: any, selector: string): any {\n if (!selector) {\n return undefined;\n }\n\n let resultFieldParts = selector.split('.');\n if (resultFieldParts.length > 0 && resultFieldParts[0] === '') {\n resultFieldParts.shift();\n }\n\n let result = item;\n\n /* istanbul ignore else */\n if (resultFieldParts.length > 0) {\n for (let index = 0; index < resultFieldParts.length; index++) {\n let part = resultFieldParts[index];\n /* tslint:disable:no-null-keyword */\n /* istanbul ignore else */\n if (result[part] === null || result[part] === undefined) {\n result = null;\n break;\n }\n /* tslint:enable:no-null-keyword */\n\n result = result[part];\n }\n }\n\n return result;\n}\n\n/** @internal */\nexport function compare(value1: any, value2: any) {\n /* tslint:disable:no-null-keyword */\n if (value1 === null) {\n return 1;\n } else if (value2 === null) {\n return -1;\n }\n /* tslint:enable:no-null-keyword */\n\n if (value1 && typeof value1 === 'string') {\n value1 = value1.toLowerCase();\n }\n\n if (value2 && typeof value2 === 'string') {\n value2 = value2.toLowerCase();\n }\n if (value1 === value2) {\n return 0;\n }\n\n return value1 > value2 ? 1 : -1;\n}\n\n/*\n Taken directly from rxjs's internal utility to determine whether an object is an Obserable.\n See: https://github.com/ReactiveX/rxjs/blob/master/src/internal/util/isObservable.ts\n*/\n/** @internal */\nexport function isObservable<T>(obj: any): obj is Observable<T> {\n /* istanbul ignore next */\n return (\n !!obj &&\n (obj instanceof Observable ||\n (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'))\n );\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export class AsyncItem {
5
+ /* tslint:disable:no-null-keyword */
6
+ constructor(item = {}, lastUpdate = null, loading = false) {
7
+ this.item = item;
8
+ this.lastUpdate = lastUpdate;
9
+ this.loading = loading;
10
+ }
11
+ }
12
+ //# sourceMappingURL=async-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-item.js","sourceRoot":"","sources":["../../../../../../../libs/components/list-builder-common/src/lib/rxstate/async-item.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,SAAS;IACpB,oCAAoC;IACpC,YACS,OAAa,EAAE,EACf,aAAkB,IAAI,EACtB,UAAmB,KAAK;QAFxB,SAAI,GAAJ,IAAI,CAAW;QACf,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAiB;IAC9B,CAAC;CACL","sourcesContent":["/**\n * @internal\n */\nexport class AsyncItem<T> {\n /* tslint:disable:no-null-keyword */\n constructor(\n public item: T = <T>{},\n public lastUpdate: any = null,\n public loading: boolean = false\n ) {}\n}\n"]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export class AsyncList {
5
+ /* tslint:disable:no-null-keyword */
6
+ constructor(items = [], lastUpdate = null, loading = false, count = items.length) {
7
+ this.items = items;
8
+ this.lastUpdate = lastUpdate;
9
+ this.loading = loading;
10
+ this.count = count;
11
+ }
12
+ }
13
+ //# sourceMappingURL=async-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-list.js","sourceRoot":"","sources":["../../../../../../../libs/components/list-builder-common/src/lib/rxstate/async-list.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,SAAS;IACpB,oCAAoC;IACpC,YACS,QAAa,EAAE,EACf,aAAkB,IAAI,EACtB,UAAmB,KAAK,EACxB,QAAgB,KAAK,CAAC,MAAM;QAH5B,UAAK,GAAL,KAAK,CAAU;QACf,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAiB;QACxB,UAAK,GAAL,KAAK,CAAuB;IAClC,CAAC;CACL","sourcesContent":["/**\n * @internal\n */\nexport class AsyncList<T> {\n /* tslint:disable:no-null-keyword */\n constructor(\n public items: T[] = [],\n public lastUpdate: any = null,\n public loading: boolean = false,\n public count: number = items.length\n ) {}\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { Observable } from 'rxjs';
2
+ /** @internal */
3
+ export function getValue(property, callback) {
4
+ if (property instanceof Observable) {
5
+ property.subscribe((value) => callback(value));
6
+ return property;
7
+ }
8
+ else {
9
+ return callback(property);
10
+ }
11
+ }
12
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../libs/components/list-builder-common/src/lib/rxstate/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,gBAAgB;AAChB,MAAM,UAAU,QAAQ,CAAC,QAAa,EAAE,QAAa;IACnD,IAAI,QAAQ,YAAY,UAAU,EAAE;QAClC,QAAQ,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/C,OAAO,QAAQ,CAAC;KACjB;SAAM;QACL,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC3B;AACH,CAAC","sourcesContent":["import { Observable } from 'rxjs';\n\n/** @internal */\nexport function getValue(property: any, callback: any): Observable<any> {\n if (property instanceof Observable) {\n property.subscribe((value) => callback(value));\n return property;\n } else {\n return callback(property);\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { Subject } from 'rxjs';
2
+ /**
3
+ * @internal
4
+ */
5
+ export class StateDispatcher extends Subject {
6
+ }
7
+ //# sourceMappingURL=state-dispatcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-dispatcher.js","sourceRoot":"","sources":["../../../../../../../libs/components/list-builder-common/src/lib/rxstate/state-dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,OAAO,eAAyB,SAAQ,OAAgB;CAAG","sourcesContent":["import { Subject } from 'rxjs';\n\n/**\n * @internal\n */\nexport class StateDispatcher<TAction> extends Subject<TAction> {}\n"]}