@ecodev/natural 36.1.5 → 38.0.1

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 (47) hide show
  1. package/bundles/ecodev-natural.umd.js +126 -103
  2. package/bundles/ecodev-natural.umd.js.map +1 -1
  3. package/ecodev-natural.metadata.json +1 -1
  4. package/esm2015/lib/classes/abstract-list.js +7 -5
  5. package/esm2015/lib/classes/abstract-navigable-list.js +32 -23
  6. package/esm2015/lib/classes/apollo-utils.js +4 -31
  7. package/esm2015/lib/classes/utility.js +32 -1
  8. package/esm2015/lib/classes/validators.js +2 -2
  9. package/esm2015/lib/modules/alert/confirm.component.js +1 -1
  10. package/esm2015/lib/modules/avatar/sources/gravatar.js +2 -2
  11. package/esm2015/lib/modules/detail-header/detail-header.component.js +1 -1
  12. package/esm2015/lib/modules/dialog-trigger/dialog-trigger.component.js +8 -4
  13. package/esm2015/lib/modules/dropdown-components/type-number/type-number.component.js +1 -1
  14. package/esm2015/lib/modules/dropdown-components/type-text/type-text.component.js +1 -1
  15. package/esm2015/lib/modules/file/component/file.component.js +1 -1
  16. package/esm2015/lib/modules/file/file-drop.directive.js +2 -4
  17. package/esm2015/lib/modules/fixed-button/fixed-button.component.js +1 -1
  18. package/esm2015/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.js +1 -1
  19. package/esm2015/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.js +1 -1
  20. package/esm2015/lib/modules/icon/icon.component.js +1 -1
  21. package/esm2015/lib/modules/relations/relations.component.js +1 -1
  22. package/esm2015/lib/modules/search/dropdown-container/dropdown-container.component.js +2 -2
  23. package/esm2015/lib/modules/search/dropdown-container/dropdown-ref.js +1 -1
  24. package/esm2015/lib/modules/search/facet-selector/facet-selector.component.js +1 -1
  25. package/esm2015/lib/modules/search/group/group.component.js +1 -1
  26. package/esm2015/lib/modules/search/input/input.component.js +4 -4
  27. package/esm2015/lib/modules/search/search/search.component.js +1 -1
  28. package/esm2015/lib/modules/select/select/select.component.js +1 -1
  29. package/esm2015/lib/modules/select/select-hierarchic/select-hierarchic.component.js +1 -1
  30. package/esm2015/lib/modules/sidenav/sidenav-container/sidenav-container.component.js +8 -3
  31. package/esm2015/lib/modules/sidenav/sidenav-content/sidenav-content.component.js +1 -1
  32. package/esm2015/lib/modules/table-button/table-button.component.js +1 -1
  33. package/fesm2015/ecodev-natural.js +109 -88
  34. package/fesm2015/ecodev-natural.js.map +1 -1
  35. package/lib/classes/abstract-list.d.ts +1 -1
  36. package/lib/classes/abstract-navigable-list.d.ts +4 -2
  37. package/lib/classes/utility.d.ts +9 -0
  38. package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +6 -6
  39. package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +1 -2
  40. package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +5 -0
  41. package/package.json +5 -5
  42. package/src/lib/modules/alert/_alert.theme.scss +1 -1
  43. package/src/lib/modules/file/component/_file.theme.scss +1 -1
  44. package/src/lib/modules/icon/_icon.theme.scss +1 -1
  45. package/src/lib/modules/search/dropdown-container/_dropdown-container.theme.scss +1 -1
  46. package/src/lib/modules/sidenav/_sidenav.theme.scss +1 -1
  47. package/src/lib/styles/_table.scss +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/localize/init'), require('@angular/core'), require('rxjs'), require('@angular/forms'), require('@angular/router'), require('lodash-es'), require('@angular/material/dialog'), require('@angular/material/snack-bar'), require('rxjs/operators'), require('@angular/material/table'), require('@angular/cdk/collections'), require('apollo-angular'), require('@apollo/client/core'), require('@angular/material/core'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/menu'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/material/tooltip'), require('@angular/material/tabs'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/list'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/a11y'), require('@angular/animations'), require('@angular/material/datepicker'), require('@angular/cdk/tree'), require('@angular/material/chips'), require('@angular/material/progress-spinner'), require('@angular/material/tree'), require('@angular/material/autocomplete'), require('@angular/cdk/coercion'), require('@angular/flex-layout'), require('@angular/flex-layout/core'), require('@angular/material/paginator'), require('@angular/material/sidenav'), require('ts-md5')) :
3
3
  typeof define === 'function' && define.amd ? define('@ecodev/natural', ['exports', '@angular/localize/init', '@angular/core', 'rxjs', '@angular/forms', '@angular/router', 'lodash-es', '@angular/material/dialog', '@angular/material/snack-bar', 'rxjs/operators', '@angular/material/table', '@angular/cdk/collections', 'apollo-angular', '@apollo/client/core', '@angular/material/core', '@angular/cdk/platform', '@angular/common', '@angular/material/button', '@angular/material/checkbox', '@angular/material/menu', '@angular/material/icon', '@angular/platform-browser', '@angular/material/tooltip', '@angular/material/tabs', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/list', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/a11y', '@angular/animations', '@angular/material/datepicker', '@angular/cdk/tree', '@angular/material/chips', '@angular/material/progress-spinner', '@angular/material/tree', '@angular/material/autocomplete', '@angular/cdk/coercion', '@angular/flex-layout', '@angular/flex-layout/core', '@angular/material/paginator', '@angular/material/sidenav', 'ts-md5'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ecodev = global.ecodev || {}, global.ecodev.natural = {}), global.ng.localize.init, global.ng.core, global.rxjs, global.ng.forms, global.ng.router, global['lodash-es'], global.ng.material.dialog, global.ng.material.snackBar, global.rxjs.operators, global.ng.material.table, global.ng.cdk.collections, global['apollo-angular'], global.core, global.ng.material.core, global.ng.cdk.platform, global.ng.common, global.ng.material.button, global.ng.material.checkbox, global.ng.material.menu, global.ng.material.icon, global.ng.platformBrowser, global.ng.material.tooltip, global.ng.material.tabs, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.list, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.animations, global.ng.material.datepicker, global.ng.cdk.tree, global.ng.material.chips, global.ng.material.progressSpinner, global.ng.material.tree, global.ng.material.autocomplete, global.ng.cdk.coercion, global.ng.flexLayout, global.ng.flexLayout.core, global.ng.material.paginator, global.ng.material.sidenav, global.tsMd5));
5
- }(this, (function (exports, init, i0, rxjs, forms, i1$1, lodashEs, i1, i2, operators, table, collections, i1$2, core, i1$3, i2$1, i1$4, button, checkbox, menu, icon, i2$2, tooltip, tabs, formField, input, select, list, i1$5, portal, a11y, animations, datepicker, tree$1, chips, progressSpinner, tree, autocomplete, coercion, flexLayout, i4, paginator, sidenav, tsMd5) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ecodev = global.ecodev || {}, global.ecodev.natural = {}), global.ng.localize.init, global.ng.core, global.rxjs, global.ng.forms, global.ng.router, global["lodash-es"], global.ng.material.dialog, global.ng.material.snackBar, global.rxjs.operators, global.ng.material.table, global.ng.cdk.collections, global["apollo-angular"], global.core, global.ng.material.core, global.ng.cdk.platform, global.ng.common, global.ng.material.button, global.ng.material.checkbox, global.ng.material.menu, global.ng.material.icon, global.ng.platformBrowser, global.ng.material.tooltip, global.ng.material.tabs, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.list, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.animations, global.ng.material.datepicker, global.ng.cdk.tree, global.ng.material.chips, global.ng.material.progressSpinner, global.ng.material.tree, global.ng.material.autocomplete, global.ng.cdk.coercion, global.ng.flexLayout, global.ng.flexLayout.core, global.ng.material.paginator, global.ng.material.sidenav, global.tsMd5));
5
+ })(this, (function (exports, init, i0, rxjs, forms, i1$1, lodashEs, i1, i2, operators, table, collections, i1$2, core, i1$3, i2$1, i1$4, button, checkbox, menu, icon, i2$2, tooltip, tabs, formField, input, select, list, i1$5, portal, a11y, animations, datepicker, tree$1, chips, progressSpinner, tree, autocomplete, coercion, flexLayout, i4, paginator, sidenav, tsMd5) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -13,14 +13,12 @@
13
13
  var d = Object.getOwnPropertyDescriptor(e, k);
14
14
  Object.defineProperty(n, k, d.get ? d : {
15
15
  enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
16
+ get: function () { return e[k]; }
19
17
  });
20
18
  }
21
19
  });
22
20
  }
23
- n['default'] = e;
21
+ n["default"] = e;
24
22
  return Object.freeze(n);
25
23
  }
26
24
 
@@ -299,7 +297,7 @@
299
297
  ar[i] = from[i];
300
298
  }
301
299
  }
302
- return to.concat(ar || from);
300
+ return to.concat(ar || Array.prototype.slice.call(from));
303
301
  }
304
302
  function __await(v) {
305
303
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -391,7 +389,7 @@
391
389
  NaturalConfirmComponent.decorators = [
392
390
  { type: i0.Component, args: [{
393
391
  template: "<h2 mat-dialog-title>{{ data.title }}</h2>\n<mat-dialog-content\n ><p class=\"mat-body\">{{ data.message }}</p></mat-dialog-content\n>\n<mat-dialog-actions>\n <button [mat-dialog-close]=\"false\" mat-button>{{ data.cancelText }}</button>\n <button [mat-dialog-close]=\"true\" mat-stroked-button cdkFocusInitial>{{ data.confirmText }}</button>\n</mat-dialog-actions>\n",
394
- styles: ["mat-dialog-content{max-width:40em}mat-dialog-actions{display:flex;justify-content:flex-end}mat-dialog-actions>*{margin-left:10px}"]
392
+ styles: ["mat-dialog-content{max-width:40em}mat-dialog-actions{display:flex;justify-content:flex-end}mat-dialog-actions>*{margin-left:10px}\n"]
395
393
  },] }
396
394
  ];
397
395
  NaturalConfirmComponent.ctorParameters = function () { return [
@@ -506,6 +504,8 @@
506
504
 
507
505
  /**
508
506
  * Very basic formatting to get only date, without time and ignoring entirely the timezone
507
+ *
508
+ * So something like: "2021-09-23"
509
509
  */
510
510
  function formatIsoDate(date) {
511
511
  if (!date) {
@@ -516,6 +516,35 @@
516
516
  var d = date.getDate();
517
517
  return y + '-' + (m < 10 ? '0' : '') + m + '-' + (d < 10 ? '0' : '') + d;
518
518
  }
519
+ /**
520
+ * Format a date and time in a way that will preserve the local time zone.
521
+ * This allow the server side to know the day (without time) that was selected on client side.
522
+ *
523
+ * So something like: "2021-09-23T17:57:16+09:00"
524
+ */
525
+ function formatIsoDateTime(date) {
526
+ var timezoneOffsetInMinutes = date.getTimezoneOffset();
527
+ var timezoneOffsetInHours = -Math.trunc(timezoneOffsetInMinutes / 60); // UTC minus local time
528
+ var sign = timezoneOffsetInHours >= 0 ? '+' : '-';
529
+ var hoursLeadingZero = Math.abs(timezoneOffsetInHours) < 10 ? '0' : '';
530
+ var remainderMinutes = -(timezoneOffsetInMinutes % 60);
531
+ var minutesLeadingZero = Math.abs(remainderMinutes) < 10 ? '0' : '';
532
+ // It's a bit unfortunate that we need to construct a new Date instance,
533
+ // but we don't want the original Date instance to be modified
534
+ var correctedDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
535
+ correctedDate.setHours(date.getHours() + timezoneOffsetInHours);
536
+ var iso = correctedDate
537
+ .toISOString()
538
+ .replace(/\.\d{3}Z/, '')
539
+ .replace('Z', '');
540
+ return (iso +
541
+ sign +
542
+ hoursLeadingZero +
543
+ Math.abs(timezoneOffsetInHours).toString() +
544
+ ':' +
545
+ minutesLeadingZero +
546
+ remainderMinutes);
547
+ }
519
548
  /**
520
549
  * Relations to full objects are converted to their IDs only.
521
550
  *
@@ -2420,7 +2449,7 @@
2420
2449
  // - is too lax because it accepts pretty much anything else
2421
2450
  //
2422
2451
  // but the TLD will be validated against a whitelist so that should make the whole thing acceptable
2423
- var RFC_5322 = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[^@]+\.[^@]+$/u;
2452
+ var RFC_5322 = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[^@ ]+\.[^@]+$/u;
2424
2453
  /**
2425
2454
  * Validate an email address according to RFC, and also that it is publicly deliverable (not "root@localhost" or "root@127.0.0.1")
2426
2455
  *
@@ -3414,11 +3443,14 @@
3414
3443
  /**
3415
3444
  * Persist search and then launch whatever is required to refresh the list
3416
3445
  */
3417
- NaturalAbstractList.prototype.search = function (naturalSearchSelections, navigationExtras) {
3446
+ NaturalAbstractList.prototype.search = function (naturalSearchSelections, navigationExtras, resetPagination) {
3447
+ if (resetPagination === void 0) { resetPagination = true; }
3418
3448
  // Reset page index to restart the pagination (preserve pageSize)
3419
- this.variablesManager.merge('pagination', {
3420
- pagination: lodashEs.pick(this.defaultPagination, ['offset', 'pageIndex']),
3421
- });
3449
+ if (resetPagination) {
3450
+ this.variablesManager.merge('pagination', {
3451
+ pagination: lodashEs.pick(this.defaultPagination, ['offset', 'pageIndex']),
3452
+ });
3453
+ }
3422
3454
  // Persist if activated
3423
3455
  // Two parallel navigations conflict. We first persist the search, then the pagination
3424
3456
  if (this.persistSearch && !this.isPanel) {
@@ -3742,6 +3774,7 @@
3742
3774
  * Name of filter for child items to access ancestor item
3743
3775
  */
3744
3776
  _this.ancestorRelationName = 'parent';
3777
+ _this.oldAncertorId = null;
3745
3778
  _this.breadcrumbs = [];
3746
3779
  return _this;
3747
3780
  }
@@ -3752,27 +3785,30 @@
3752
3785
  // "na" is a trailing param, and should be considered only when there is no search
3753
3786
  this.route.params.subscribe(function (params) {
3754
3787
  // "ns" stands for natural-search to be shorter in url
3755
- if (!params['ns']) {
3756
- var navigationConditionValue = null;
3757
- // "na" stands for "navigation" (relation) in url
3758
- if (params['na']) {
3759
- navigationConditionValue = { have: { values: [params['na']] } };
3760
- _this.service.getOne(params['na']).subscribe(
3761
- // TODO casting should disappear and instead this class should enforce
3762
- // the service to support Tone with a new generic
3763
- function (ancestor) { return (_this.breadcrumbs = _this.getBreadcrumb(ancestor)); });
3764
- _this.clearSearch();
3765
- }
3766
- else {
3767
- navigationConditionValue = { empty: {} };
3768
- _this.breadcrumbs = [];
3769
- }
3770
- var condition = {};
3771
- condition[_this.ancestorRelationName] = navigationConditionValue;
3772
- var variables = { filter: { groups: [{ conditions: [condition] }] } };
3773
- // todo : check why without "as Vall" it errors. Vall is supposed to be QueryVariables, and filter too.
3774
- _this.variablesManager.set('navigation', variables);
3788
+ if (params['ns']) {
3789
+ return;
3790
+ }
3791
+ var navigationConditionValue = null;
3792
+ // "na" stands for "navigation" (relation) in url
3793
+ if (params['na']) {
3794
+ navigationConditionValue = { have: { values: [params['na']] } };
3795
+ _this.service.getOne(params['na']).subscribe(
3796
+ // TODO casting should disappear and instead this class should enforce
3797
+ // the service to support Tone with a new generic
3798
+ function (ancestor) { return (_this.breadcrumbs = _this.getBreadcrumb(ancestor)); });
3799
+ var hasAncestorChanged = params['na'] !== _this.oldAncertorId;
3800
+ _this.oldAncertorId = params['na'];
3801
+ _this.clearSearch(hasAncestorChanged);
3775
3802
  }
3803
+ else {
3804
+ navigationConditionValue = { empty: {} };
3805
+ _this.breadcrumbs = [];
3806
+ }
3807
+ var condition = {};
3808
+ condition[_this.ancestorRelationName] = navigationConditionValue;
3809
+ var variables = { filter: { groups: [{ conditions: [condition] }] } };
3810
+ // todo : check why without "as Vall" it errors. Vall is supposed to be QueryVariables, and filter too.
3811
+ _this.variablesManager.set('navigation', variables);
3776
3812
  });
3777
3813
  _super.prototype.ngOnInit.call(this);
3778
3814
  };
@@ -3805,11 +3841,19 @@
3805
3841
  }
3806
3842
  _super.prototype.translateSearchAndRefreshList.call(this, naturalSearchSelections);
3807
3843
  };
3808
- NaturalAbstractNavigableList.prototype.clearSearch = function () {
3844
+ NaturalAbstractNavigableList.prototype.clearSearch = function (resetPagination) {
3845
+ if (resetPagination === void 0) { resetPagination = true; }
3809
3846
  this.naturalSearchSelections = [[]];
3810
- this.search([[]]);
3847
+ _super.prototype.search.call(this, [[]], undefined, resetPagination);
3811
3848
  this.persistenceService.persistInStorage('ns', null, this.getStorageKey());
3812
3849
  };
3850
+ NaturalAbstractNavigableList.prototype.search = function (naturalSearchSelections, navigationExtras, resetPagination) {
3851
+ var _this = this;
3852
+ if (resetPagination === void 0) { resetPagination = true; }
3853
+ this.persistenceService.persistInUrl('na', null, this.route).then(function () {
3854
+ _super.prototype.search.call(_this, naturalSearchSelections, navigationExtras, resetPagination);
3855
+ });
3856
+ };
3813
3857
  /**
3814
3858
  * Return an array for router link usage
3815
3859
  */
@@ -3845,35 +3889,6 @@
3845
3889
  ancestorRelationName: [{ type: i0.Input }]
3846
3890
  };
3847
3891
 
3848
- /**
3849
- * Replace native toJSON() function by our own implementation that will preserve the local time zone.
3850
- * This allow the server side to know the day (without time) that was selected on client side.
3851
- */
3852
- function replaceToJSON(date) {
3853
- date.toJSON = function () {
3854
- var timezoneOffsetInMinutes = date.getTimezoneOffset();
3855
- var timezoneOffsetInHours = -Math.trunc(timezoneOffsetInMinutes / 60); // UTC minus local time
3856
- var sign = timezoneOffsetInHours >= 0 ? '+' : '-';
3857
- var hoursLeadingZero = Math.abs(timezoneOffsetInHours) < 10 ? '0' : '';
3858
- var remainderMinutes = -(timezoneOffsetInMinutes % 60);
3859
- var minutesLeadingZero = Math.abs(remainderMinutes) < 10 ? '0' : '';
3860
- // It's a bit unfortunate that we need to construct a new Date instance
3861
- // (we don't want _this_ Date instance to be modified)
3862
- var correctedDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
3863
- correctedDate.setHours(date.getHours() + timezoneOffsetInHours);
3864
- var iso = correctedDate
3865
- .toISOString()
3866
- .replace(/\.\d{3}Z/, '')
3867
- .replace('Z', '');
3868
- return (iso +
3869
- sign +
3870
- hoursLeadingZero +
3871
- Math.abs(timezoneOffsetInHours).toString() +
3872
- ':' +
3873
- minutesLeadingZero +
3874
- remainderMinutes);
3875
- };
3876
- }
3877
3892
  function isFile(value) {
3878
3893
  return ((typeof File !== 'undefined' && value instanceof File) ||
3879
3894
  (typeof Blob !== 'undefined' && value instanceof Blob) ||
@@ -3891,7 +3906,8 @@
3891
3906
  Object.keys(variables).forEach(function (key) {
3892
3907
  var value = variables[key];
3893
3908
  if (value instanceof Date) {
3894
- replaceToJSON(value);
3909
+ // Replace native toJSON() function by our own implementation
3910
+ value.toJSON = function () { return formatIsoDateTime(value); };
3895
3911
  }
3896
3912
  if (isFile(value)) {
3897
3913
  fileFound = true;
@@ -4964,7 +4980,7 @@
4964
4980
  { type: i0.Component, args: [{
4965
4981
  selector: 'natural-icon',
4966
4982
  template: "<mat-icon *ngIf=\"icon?.font\" [class]=\"icon?.class\" data-nosnippet>{{ icon?.font }}</mat-icon>\n<mat-icon *ngIf=\"icon?.svg\" [class]=\"icon?.class\" [svgIcon]=\"icon.name\" class=\"svg-icon\"></mat-icon>\n\n<div *ngIf=\"label\" [ngClass]=\"labelColor + ' ' + labelPosition\" class=\"label\">{{ label }}</div>\n",
4967
- styles: [":host{position:relative}:host mat-icon{background-repeat:inherit;display:inherit;fill:inherit;height:inherit;width:inherit;font-family:inherit;font-weight:inherit;font-style:inherit;font-size:inherit;line-height:inherit;text-transform:inherit;letter-spacing:inherit;word-wrap:inherit;white-space:inherit;direction:inherit;-webkit-font-smoothing:inherit;text-rendering:inherit;-moz-osx-font-smoothing:inherit;font-feature-settings:inherit;min-height:inherit;min-width:inherit;vertical-align:unset}:host .label{position:absolute;padding:2px;border-radius:100%;font-family:Quicksand sans-serif;font-size:14px;line-height:1em;height:14px;min-width:14px;text-align:center}:host .label.top-left{top:0;left:0;transform:translateX(-50%)}:host .label.top-right{top:0;right:0;transform:translateX(50%)}:host .label.bottom-left{bottom:0;left:0;transform:translateX(-50%)}:host .label.bottom-right{bottom:0;right:0;transform:translateX(50%)}"]
4983
+ styles: [":host{position:relative}:host mat-icon{background-repeat:inherit;display:inherit;fill:inherit;height:inherit;width:inherit;font-family:inherit;font-weight:inherit;font-style:inherit;font-size:inherit;line-height:inherit;text-transform:inherit;letter-spacing:inherit;word-wrap:inherit;white-space:inherit;direction:inherit;-webkit-font-smoothing:inherit;text-rendering:inherit;-moz-osx-font-smoothing:inherit;font-feature-settings:inherit;min-height:inherit;min-width:inherit;vertical-align:unset}:host .label{position:absolute;padding:2px;border-radius:100%;font-family:Quicksand sans-serif;font-size:14px;line-height:1em;height:14px;min-width:14px;text-align:center}:host .label.top-left{top:0;left:0;transform:translate(-50%)}:host .label.top-right{top:0;right:0;transform:translate(50%)}:host .label.bottom-left{bottom:0;left:0;transform:translate(-50%)}:host .label.bottom-right{bottom:0;right:0;transform:translate(50%)}\n"]
4968
4984
  },] }
4969
4985
  ];
4970
4986
  NaturalIconComponent.ctorParameters = function () { return [
@@ -5516,7 +5532,7 @@
5516
5532
  { type: i0.Component, args: [{
5517
5533
  selector: 'natural-detail-header',
5518
5534
  template: "<div class=\"breadcrumb\">\n <a [routerLink]=\"isPanel ? [] : getRootLink()\" [fragment]=\"listFragment\" color=\"primary\" mat-button>{{\n rootLabel || label\n }}</a>\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <natural-icon [name]=\"icon\"></natural-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline no-margin label\">{{ model?.name || model?.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n",
5519
- styles: [":host{display:flex;flex-direction:column}:host .body,:host .breadcrumb{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width:600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>:not(:last-child){margin-bottom:10px!important}:host .body natural-icon{display:none}}"]
5535
+ styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body natural-icon{display:none}}\n"]
5520
5536
  },] }
5521
5537
  ];
5522
5538
  NaturalDetailHeaderComponent.propDecorators = {
@@ -5665,7 +5681,7 @@
5665
5681
  encapsulation: i0.ViewEncapsulation.None,
5666
5682
  preserveWhitespaces: false,
5667
5683
  animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems],
5668
- styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}"]
5684
+ styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"]
5669
5685
  },] }
5670
5686
  ];
5671
5687
  NaturalDropdownContainerComponent.ctorParameters = function () { return [
@@ -6160,7 +6176,7 @@
6160
6176
  TypeTextComponent.decorators = [
6161
6177
  { type: i0.Component, args: [{
6162
6178
  template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n",
6163
- styles: [":host input::-webkit-inner-spin-button,:host input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}"]
6179
+ styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"]
6164
6180
  },] }
6165
6181
  ];
6166
6182
  TypeTextComponent.ctorParameters = function () { return [
@@ -6265,7 +6281,7 @@
6265
6281
  TypeNumberComponent.decorators = [
6266
6282
  { type: i0.Component, args: [{
6267
6283
  template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"valueCtrl\"\n [attr.max]=\"configuration.max\"\n [attr.min]=\"configuration.min\"\n [required]=\"true\"\n [step]=\"configuration.step\"\n matInput\n type=\"number\"\n />\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n </mat-form-field>\n</form>\n",
6268
- styles: [":host input::-webkit-inner-spin-button,:host input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}"]
6284
+ styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"]
6269
6285
  },] }
6270
6286
  ];
6271
6287
  TypeNumberComponent.ctorParameters = function () { return [
@@ -6665,7 +6681,7 @@
6665
6681
  FacetSelectorComponent.decorators = [
6666
6682
  { type: i0.Component, args: [{
6667
6683
  template: "<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a matLine>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n",
6668
- styles: [":host .mat-nav-list{padding:0}"]
6684
+ styles: [":host .mat-nav-list{padding:0}\n"]
6669
6685
  },] }
6670
6686
  ];
6671
6687
  FacetSelectorComponent.ctorParameters = function () { return [
@@ -6704,7 +6720,7 @@
6704
6720
  { type: i0.Component, args: [{
6705
6721
  selector: 'natural-group',
6706
6722
  template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n></natural-input>\n",
6707
- styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:none;display:inline-flex;margin-right:10px}:host natural-input:last-of-type{flex:1;margin-right:0;min-width:250px}"]
6723
+ styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:none;display:inline-flex;margin-right:10px}:host natural-input:last-of-type{flex:1;margin-right:0;min-width:250px}\n"]
6708
6724
  },] }
6709
6725
  ];
6710
6726
  NaturalGroupComponent.propDecorators = {
@@ -7011,7 +7027,7 @@
7011
7027
  { type: i0.Component, args: [{
7012
7028
  selector: 'natural-input',
7013
7029
  template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field #field matRipple (click)=\"!selection && !(facet && !selection) ? openDropdown() : null\">\n <mat-label *ngIf=\"facet\">{{ facet.display }}</mat-label>\n <mat-label *ngIf=\"!facet\">{{ placeholder }}</mat-label>\n\n <input\n #input\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n autocomplete=\"off\"\n matInput\n type=\"text\"\n />\n\n <!-- TODO : replace this void button -->\n <div *ngIf=\"!facet && !selection\" class=\"search-icon\" matPrefix>\n <natural-icon name=\"search\"></natural-icon>\n </div>\n\n <button (click)=\"clear()\" *ngIf=\"selection\" mat-icon-button matSuffix>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n\n <button (click)=\"clear()\" *ngIf=\"facet && !selection\" mat-icon-button matSuffix>\n <natural-icon name=\"undo\"></natural-icon>\n </button>\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n",
7014
- styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}:host .hide{color:#0000;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,Helvetica Neue,sans-serif}:host .search-icon{display:block;width:35px;height:35px}:host .search-icon natural-icon{margin:5px auto 0}"]
7030
+ styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}:host .hide{color:transparent;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,\"Helvetica Neue\",sans-serif}:host .search-icon{display:block;width:35px;height:35px}:host .search-icon natural-icon{margin:5px auto 0}\n"]
7015
7031
  },] }
7016
7032
  ];
7017
7033
  NaturalInputComponent.ctorParameters = function () { return [
@@ -7096,7 +7112,7 @@
7096
7112
  { type: i0.Component, args: [{
7097
7113
  selector: 'natural-search',
7098
7114
  template: "<div class=\"natural-search\">\n <div class=\"groupsWrapper\">\n <div *ngFor=\"let groupSelections of innerSelections; let i = index; let last = last\" class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, i)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n ></natural-group>\n\n <div class=\"endOfRowButton\">\n <button (click)=\"removeGroup(i)\" *ngIf=\"innerSelections.length > 1\" mat-icon-button>\n <natural-icon name=\"remove\"></natural-icon>\n </button>\n </div>\n\n <div class=\"endOfRowButton\">\n <button (click)=\"addGroup()\" *ngIf=\"last && multipleGroups\" mat-icon-button>\n <natural-icon name=\"add\"></natural-icon>\n </button>\n </div>\n\n <!-- Spaceholder to keep fields alignment (prevent to push until end of line)--->\n <div *ngIf=\"!last\" class=\"spacer\"></div>\n </div>\n </div>\n\n <div class=\"endOfRowButton\">\n <button (click)=\"clear()\" mat-icon-button>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <ng-content></ng-content>\n </div>\n</div>\n",
7099
- styles: [":host .natural-search{display:flex;flex-direction:row;align-items:flex-end}:host .natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1}:host .natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px}:host .natural-search .groupWrapper natural-group{flex:1}:host .natural-search .groupWrapper:last-of-type{margin-bottom:0}:host .natural-search .groupWrapper .spacer{width:40px;height:40px}:host .natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center}"]
7115
+ styles: [":host .natural-search{display:flex;flex-direction:row;align-items:flex-end}:host .natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1}:host .natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px}:host .natural-search .groupWrapper natural-group{flex:1}:host .natural-search .groupWrapper:last-of-type{margin-bottom:0}:host .natural-search .groupWrapper .spacer{width:40px;height:40px}:host .natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center}\n"]
7100
7116
  },] }
7101
7117
  ];
7102
7118
  NaturalSearchComponent.propDecorators = {
@@ -7163,7 +7179,7 @@
7163
7179
  NaturalHierarchicSelectorDialogComponent.decorators = [
7164
7180
  { type: i0.Component, args: [{
7165
7181
  template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n ></natural-hierarchic-selector>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button [mat-dialog-close] i18n mat-button>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n",
7166
- styles: [":host mat-dialog-actions{display:flex;flex-direction:row;justify-content:flex-end}"]
7182
+ styles: [":host mat-dialog-actions{display:flex;flex-direction:row;justify-content:flex-end}\n"]
7167
7183
  },] }
7168
7184
  ];
7169
7185
  NaturalHierarchicSelectorDialogComponent.ctorParameters = function () { return [
@@ -7892,7 +7908,7 @@
7892
7908
  selector: 'natural-hierarchic-selector',
7893
7909
  template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search\n (selectionChange)=\"search($event)\"\n [facets]=\"searchFacets\"\n [selections]=\"searchSelections\"\n ></natural-search>\n</div>\n\n<div class=\"body\">\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"36\"\n mode=\"indeterminate\"\n style=\"margin: 10px\"\n ></mat-progress-spinner>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n <button\n (click)=\"loadChildren(node)\"\n *ngIf=\"node.expandable\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n <mat-progress-spinner\n *ngIf=\"node.loading\"\n [diameter]=\"24\"\n [strokeWidth]=\"5\"\n mode=\"indeterminate\"\n style=\"margin: 8px\"\n ></mat-progress-spinner>\n\n <natural-icon\n *ngIf=\"!node.loading\"\n [name]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\"\n >\n </natural-icon>\n </button>\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n <natural-icon\n *ngIf=\"node.node.config.icon\"\n [name]=\"node.node.config.icon\"\n style=\"margin-right: 10px\"\n ></natural-icon>\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-list aria-orientation=\"vertical\" class=\"mat-chip-list-stacked\">\n <mat-chip\n (removed)=\"unselectModelNode(node)\"\n *ngFor=\"let node of selectedNodes\"\n [removable]=\"true\"\n [selectable]=\"false\"\n >\n <natural-icon *ngIf=\"node.config.icon\" [name]=\"node.config.icon\"></natural-icon>\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <natural-icon matChipRemove name=\"cancel\"></natural-icon>\n </mat-chip>\n </mat-chip-list>\n</div>\n\n<div *ngIf=\"!loading && !dataSource.data.length\" class=\"margin-v\" i18n>Aucun r\u00E9sultat</div>\n",
7894
7910
  providers: [NaturalHierarchicSelectorService],
7895
- styles: [":host{display:block}:host li,:host ul{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host natural-icon{width:18px;height:18px;font-size:18px;margin-right:5px}:host .mat-tree-node.leaf{margin-left:40px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-list{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-list{margin-left:10px}:host mat-chip{display:flex;flex-direction:row;height:auto!important}:host mat-chip .chip-label{flex:1}"]
7911
+ styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host natural-icon{width:18px;height:18px;font-size:18px;margin-right:5px}:host .mat-tree-node.leaf{margin-left:40px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-list{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-list{margin-left:10px}:host mat-chip{display:flex;flex-direction:row;height:auto!important}:host mat-chip .chip-label{flex:1}\n"]
7896
7912
  },] }
7897
7913
  ];
7898
7914
  NaturalHierarchicSelectorComponent.ctorParameters = function () { return [
@@ -8257,7 +8273,7 @@
8257
8273
  { type: i0.Component, args: [{
8258
8274
  selector: 'natural-select-hierarchic',
8259
8275
  template: "<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n",
8260
- styles: [":host{display:flex;flex-direction:column}:host>:not(:last-child){margin-bottom:20px}:host .external-buttons,:host .suffix-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>:not(:last-child){margin-right:10px}"]
8276
+ styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"]
8261
8277
  },] }
8262
8278
  ];
8263
8279
  NaturalSelectHierarchicComponent.ctorParameters = function () { return [
@@ -8456,7 +8472,7 @@
8456
8472
  { type: i0.Component, args: [{
8457
8473
  selector: 'natural-select',
8458
8474
  template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event?.option?.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n <mat-option *ngFor=\"let item of items | async\" [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n ></ng-template>\n </mat-option>\n <div *ngIf=\"moreNbItems > 0\" class=\"mat-caption\" i18n style=\"padding: 5px 10px\"\n >{{ moreNbItems }} \u00E9l\u00E9ment(s) suppl\u00E9mentaire(s)</div\n >\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"touch(); blur.emit()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"!loading && showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"21\"\n [strokeWidth]=\"5\"\n matPrefix\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showClearButton()\" class=\"external-buttons\">\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n",
8459
- styles: [":host{display:flex;flex-direction:column}:host>:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .external-buttons,:host .suffix-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>:not(:last-child){margin-right:10px}"]
8475
+ styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"]
8460
8476
  },] }
8461
8477
  ];
8462
8478
  NaturalSelectComponent.propDecorators = {
@@ -9030,9 +9046,7 @@
9030
9046
  this.closeDrags();
9031
9047
  };
9032
9048
  NaturalFileDropDirective.prototype.hasObservers = function () {
9033
- return (this.fileChange.observers.length > 0 ||
9034
- this.filesChange.observers.length > 0 ||
9035
- this.naturalFileService.filesChanged.observers.length > 0);
9049
+ return this.fileChange.observed || this.filesChange.observed || this.naturalFileService.filesChanged.observed;
9036
9050
  };
9037
9051
  return NaturalFileDropDirective;
9038
9052
  }(NaturalAbstractFile));
@@ -9187,7 +9201,7 @@
9187
9201
  { type: i0.Component, args: [{
9188
9202
  selector: 'natural-file',
9189
9203
  template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <natural-icon [size]=\"height * 0.33\" name=\"attachment\"></natural-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <natural-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" name=\"cloud_upload\"></natural-icon>\n <natural-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" name=\"get_app\"></natural-icon>\n {{ action | capitalize }}\n </div>\n</a>\n",
9190
- styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:50%;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action.natural-file-over .action-overlay,:host>a.has-action:hover .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}"]
9204
+ styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}\n"]
9191
9205
  },] }
9192
9206
  ];
9193
9207
  FileComponent.ctorParameters = function () { return [
@@ -9236,7 +9250,7 @@
9236
9250
  { type: i0.Component, args: [{
9237
9251
  selector: 'natural-fixed-button',
9238
9252
  template: "<button\n [color]=\"color\"\n [disabled]=\"disabled\"\n [routerLink]=\"link\"\n class=\"floating-button bottom-right\"\n mat-fab\n mat-raised-button\n>\n <natural-icon [name]=\"icon\"></natural-icon>\n</button>\n",
9239
- styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}"]
9253
+ styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"]
9240
9254
  },] }
9241
9255
  ];
9242
9256
  NaturalFixedButtonComponent.ctorParameters = function () { return []; };
@@ -9978,7 +9992,7 @@
9978
9992
  { type: i0.Component, args: [{
9979
9993
  selector: 'natural-relations',
9980
9994
  template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n (click)=\"removeRelation(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <natural-icon name=\"link_off\"></natural-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n #select\n (selectionChange)=\"addRelations([$any($event)])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"getDisplayFn()\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n",
9981
- styles: [":host{display:flex;flex-direction:column}:host>:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}"]
9995
+ styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"]
9982
9996
  },] }
9983
9997
  ];
9984
9998
  NaturalRelationsComponent.ctorParameters = function () { return [
@@ -10347,6 +10361,10 @@
10347
10361
  function NaturalSidenavContainerComponent(sidenavService, element) {
10348
10362
  this.sidenavService = sidenavService;
10349
10363
  this.element = element;
10364
+ /**
10365
+ * The side that the drawer is attached to
10366
+ */
10367
+ this.position = 'start';
10350
10368
  /**
10351
10369
  * If true listens to route changes to close side nav after a route change if mobile view is active
10352
10370
  * Actually a navigation to current route does not emit a route change, and the sidenav don't close.
@@ -10405,9 +10423,9 @@
10405
10423
  NaturalSidenavContainerComponent.decorators = [
10406
10424
  { type: i0.Component, args: [{
10407
10425
  selector: 'natural-sidenav-container',
10408
- template: "<mat-sidenav-container>\n <mat-sidenav\n (openedChange)=\"sidenavService.setOpened($event)\"\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n position=\"start\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n",
10426
+ template: "<mat-sidenav-container>\n <mat-sidenav\n (openedChange)=\"sidenavService.setOpened($event)\"\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n",
10409
10427
  providers: [NaturalSidenavService],
10410
- styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}"]
10428
+ styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"]
10411
10429
  },] }
10412
10430
  ];
10413
10431
  NaturalSidenavContainerComponent.ctorParameters = function () { return [
@@ -10416,6 +10434,7 @@
10416
10434
  ]; };
10417
10435
  NaturalSidenavContainerComponent.propDecorators = {
10418
10436
  name: [{ type: i0.Input }],
10437
+ position: [{ type: i0.Input }],
10419
10438
  mobileAutoClose: [{ type: i0.Input }],
10420
10439
  minimizedWidth: [{ type: i0.Input }],
10421
10440
  noScroll: [{ type: i0.HostBinding, args: ['attr.no-scroll',] }, { type: i0.Input }],
@@ -10432,7 +10451,7 @@
10432
10451
  { type: i0.Component, args: [{
10433
10452
  selector: 'natural-sidenav-content',
10434
10453
  template: '<ng-content></ng-content>',
10435
- styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}"]
10454
+ styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"]
10436
10455
  },] }
10437
10456
  ];
10438
10457
  NaturalSidenavContentComponent.ctorParameters = function () { return []; };
@@ -10521,7 +10540,7 @@
10521
10540
  selector: 'natural-table-button',
10522
10541
  template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"!href && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"!href && !label\"\n [color]=\"color\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [queryParams]=\"queryParams\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"href && label\" [attr.href]=\"href\" [color]=\"color\" mat-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"href && !label\" [attr.href]=\"href\" [color]=\"color\" mat-icon-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"!href && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"!href && !label\"\n [color]=\"color\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [queryParams]=\"queryParams\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"href && label\" [attr.href]=\"href\" [color]=\"color\" mat-raised-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"href && !label\" [attr.href]=\"href\" [color]=\"color\" mat-icon-button mat-raised-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n",
10523
10542
  encapsulation: i0.ViewEncapsulation.None,
10524
- styles: ["natural-table-button,natural-table-button a.mat-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-button .mat-button-wrapper,natural-table-button a.mat-button .mat-button-wrapper>*{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>:not(:last-child){margin-right:5px}"]
10543
+ styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-button .mat-button-wrapper{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>*{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>:not(:last-child){margin-right:5px}\n"]
10525
10544
  },] }
10526
10545
  ];
10527
10546
  NaturalTableButtonComponent.ctorParameters = function () { return []; };
@@ -10564,9 +10583,12 @@
10564
10583
  // Data from activated route
10565
10584
  this.triggerConfig = this.route.snapshot.data.trigger;
10566
10585
  // Get data relative to dialog service configuration
10567
- var dialogConfig = Object.assign({}, this.triggerConfig.dialogConfig);
10568
- // Set data accessible into component instantiated by the dialog service
10569
- dialogConfig.data = Object.assign(Object.assign({}, dialogConfig.data), { activatedRoute: this.route });
10586
+ var _a = this.triggerConfig.dialogConfig, data = _a.data, config = __rest(_a, ["data"]);
10587
+ var dialogConfig = Object.assign(Object.assign({}, config), { data: {
10588
+ data: data,
10589
+ // Set data accessible into component instantiated by the dialog service
10590
+ activatedRoute: this.route,
10591
+ } });
10570
10592
  this.dialogRef = this.dialog.open(this.triggerConfig.component, dialogConfig);
10571
10593
  // Redirect on closing (if applicable)
10572
10594
  this.dialogRef.beforeClosed().subscribe(function (exitValue) { return _this.redirect(exitValue); });
@@ -10673,7 +10695,7 @@
10673
10695
  }
10674
10696
  Gravatar.prototype.getAvatar = function (size) {
10675
10697
  var value = this.getValue();
10676
- var md5 = value.match('^[a-f0-9]{32}$') ? value : tsMd5.Md5.hashStr(value).toString();
10698
+ var md5 = value.match('^[a-f0-9]{32}$') ? value : tsMd5.Md5.hashStr(value.trim().toLowerCase()).toString();
10677
10699
  var avatarSize = isRetina() ? size * 2 : size;
10678
10700
  return "https://secure.gravatar.com/avatar/" + md5 + "?s=" + avatarSize + "&d=404";
10679
10701
  };
@@ -11182,6 +11204,7 @@
11182
11204
  exports.ensureHttpPrefix = ensureHttpPrefix;
11183
11205
  exports.fallbackIfNoOpenedPanels = fallbackIfNoOpenedPanels;
11184
11206
  exports.formatIsoDate = formatIsoDate;
11207
+ exports.formatIsoDateTime = formatIsoDateTime;
11185
11208
  exports.fromUrl = fromUrl;
11186
11209
  exports.getForegroundColor = getForegroundColor;
11187
11210
  exports.hasFilesAndProcessDate = hasFilesAndProcessDate;
@@ -11211,18 +11234,18 @@
11211
11234
  exports.validTlds = validTlds;
11212
11235
  exports.validateAllFormControls = validateAllFormControls;
11213
11236
  exports.wrapLike = wrapLike;
11214
- exports.ɵa = NaturalAbstractFile;
11215
- exports.ɵb = NaturalDropdownService;
11216
- exports.ɵc = AbstractAssociationSelectComponent;
11217
- exports.ɵd = NATURAL_DROPDOWN_CONTAINER_DATA;
11218
- exports.ɵe = NaturalDropdownContainerComponent;
11219
- exports.ɵf = naturalDropdownAnimations;
11220
- exports.ɵg = AbstractSelect;
11221
- exports.ɵh = NaturalGroupComponent;
11222
- exports.ɵi = NaturalInputComponent;
11223
- exports.ɵj = FacetSelectorComponent;
11237
+ exports["ɵa"] = NaturalAbstractFile;
11238
+ exports["ɵb"] = NaturalDropdownService;
11239
+ exports["ɵc"] = AbstractAssociationSelectComponent;
11240
+ exports["ɵd"] = NATURAL_DROPDOWN_CONTAINER_DATA;
11241
+ exports["ɵe"] = NaturalDropdownContainerComponent;
11242
+ exports["ɵf"] = naturalDropdownAnimations;
11243
+ exports["ɵg"] = AbstractSelect;
11244
+ exports["ɵh"] = NaturalGroupComponent;
11245
+ exports["ɵi"] = NaturalInputComponent;
11246
+ exports["ɵj"] = FacetSelectorComponent;
11224
11247
 
11225
11248
  Object.defineProperty(exports, '__esModule', { value: true });
11226
11249
 
11227
- })));
11250
+ }));
11228
11251
  //# sourceMappingURL=ecodev-natural.umd.js.map