@coolon/angular-ui-powerups 3.10.0 → 3.10.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [3.10.2](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.10.1...v3.10.2) (2021-02-08)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * added placeRouter.waitUntilIdle ([7a52bf1](https://bitbucket.org/coolon/angular-ui-powerups/commit/7a52bf1d346a76d3730a7d1cda9aa2613033eb43))
11
+
12
+ ### [3.10.1](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.10.0...v3.10.1) (2021-02-08)
13
+
5
14
  ## [3.10.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.9.0...v3.10.0) (2021-02-07)
6
15
 
7
16
 
@@ -3840,6 +3840,16 @@
3840
3840
  return TreeToListModel;
3841
3841
  }(pectin.ComputedListModel));
3842
3842
 
3843
+ // TODO:
3844
+ // Selection Models:
3845
+ // - as simple navigation tree
3846
+ // - as editable grid (selecte all, even hidden etc?)
3847
+ // - fixing selection on underlying model changes.
3848
+ // - rendering selection: row highlighting, checkboxes (in the tree renderer or in separate column), both.
3849
+ // Expansion Models:
3850
+ // - Add ability to auto show to depth
3851
+ // - Add a predicate to check default expansion (i.e. has children of a certain type)
3852
+ //
3843
3853
  var TreeTableModel = /** @class */ (function (_super) {
3844
3854
  __extends(TreeTableModel, _super);
3845
3855
  function TreeTableModel(source, treeExpansionModel) {
@@ -3847,6 +3857,14 @@
3847
3857
  _this.treeExpansionModel = treeExpansionModel;
3848
3858
  return _this;
3849
3859
  }
3860
+ TreeTableModel.fromRoot = function (sourceOfTruth, builder) {
3861
+ var garbage = new pectin.GarbageCollector();
3862
+ var _a = pectin.Dsl.disposeWith(garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
3863
+ var children = chain(sourceOfTruth).mapToList(function (root) { return [root]; });
3864
+ var model = this.fromList(children, builder);
3865
+ model.registerDisposable(garbage);
3866
+ return model;
3867
+ };
3850
3868
  TreeTableModel.fromChildrenOf = function (sourceOfTruth, builder) {
3851
3869
  var garbage = new pectin.GarbageCollector();
3852
3870
  var _a = pectin.Dsl.disposeWith(garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
@@ -7344,6 +7362,16 @@
7344
7362
  PlaceRouter.prototype.isNavigating = function () {
7345
7363
  return this.navigationInProgress.value;
7346
7364
  };
7365
+ PlaceRouter.prototype.waitUntilIdle = function () {
7366
+ var _this = this;
7367
+ var when = pectin.Dsl.disposeWith(this).when;
7368
+ return new Promise(function (resolve) {
7369
+ when(_this.navigationInProgress).becomesFalsey(function () { return resolve(); }, {
7370
+ initialValue: 'evaluate',
7371
+ once: true
7372
+ });
7373
+ });
7374
+ };
7347
7375
  // @Trace()
7348
7376
  PlaceRouter.prototype.onPopState = function (event) {
7349
7377
  pectin.assert.isTruthy(event.navigationTrigger === 'popstate');
@@ -8452,7 +8480,7 @@
8452
8480
  return [4 /*yield*/, routeIdDef.sanitise(routeId, visit, this.placeHistory, this.injector, this.navigationSession.isPopState)];
8453
8481
  case 1:
8454
8482
  sanitisedValue = _a.sent();
8455
- console.log({ routeId: routeId, sanitisedValue: sanitisedValue });
8483
+ // console.log({routeId, sanitisedValue});
8456
8484
  // ###------- EARLY EXIT --------###
8457
8485
  if (routeIdDef.hasChanged(routeId, sanitisedValue)) {
8458
8486
  // if the route id has changed we redirect immediately as other