@ecodev/natural 37.0.0 → 38.1.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 (47) hide show
  1. package/bundles/ecodev-natural.umd.js +147 -99
  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/rxjs.js +13 -2
  8. package/esm2015/lib/classes/utility.js +32 -1
  9. package/esm2015/lib/classes/validators.js +16 -2
  10. package/esm2015/lib/modules/alert/confirm.component.js +1 -1
  11. package/esm2015/lib/modules/detail-header/detail-header.component.js +1 -1
  12. package/esm2015/lib/modules/dropdown-components/type-number/type-number.component.js +1 -1
  13. package/esm2015/lib/modules/dropdown-components/type-text/type-text.component.js +1 -1
  14. package/esm2015/lib/modules/file/component/file.component.js +1 -1
  15. package/esm2015/lib/modules/file/file-drop.directive.js +2 -4
  16. package/esm2015/lib/modules/fixed-button/fixed-button.component.js +1 -1
  17. package/esm2015/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.js +1 -1
  18. package/esm2015/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.js +1 -1
  19. package/esm2015/lib/modules/icon/icon.component.js +1 -1
  20. package/esm2015/lib/modules/relations/relations.component.js +1 -1
  21. package/esm2015/lib/modules/search/dropdown-container/dropdown-container.component.js +2 -2
  22. package/esm2015/lib/modules/search/dropdown-container/dropdown-ref.js +1 -1
  23. package/esm2015/lib/modules/search/facet-selector/facet-selector.component.js +1 -1
  24. package/esm2015/lib/modules/search/group/group.component.js +1 -1
  25. package/esm2015/lib/modules/search/input/input.component.js +4 -4
  26. package/esm2015/lib/modules/search/search/search.component.js +1 -1
  27. package/esm2015/lib/modules/select/select/select.component.js +1 -1
  28. package/esm2015/lib/modules/select/select-hierarchic/select-hierarchic.component.js +1 -1
  29. package/esm2015/lib/modules/sidenav/sidenav-container/sidenav-container.component.js +8 -3
  30. package/esm2015/lib/modules/sidenav/sidenav-content/sidenav-content.component.js +1 -1
  31. package/esm2015/lib/modules/table-button/table-button.component.js +1 -1
  32. package/fesm2015/ecodev-natural.js +127 -85
  33. package/fesm2015/ecodev-natural.js.map +1 -1
  34. package/lib/classes/abstract-list.d.ts +1 -1
  35. package/lib/classes/abstract-navigable-list.d.ts +4 -2
  36. package/lib/classes/rxjs.d.ts +6 -1
  37. package/lib/classes/utility.d.ts +9 -0
  38. package/lib/classes/validators.d.ts +7 -0
  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
  *
@@ -2355,6 +2384,21 @@
2355
2384
  return rxjs.timer(500).pipe(operators.switchMap(function () { return modelService.count(qvm).pipe(operators.map(function (count) { return (count > 0 ? { duplicateValue: count } : null); })); }));
2356
2385
  };
2357
2386
  }
2387
+ /**
2388
+ * Returns an async validator function that checks that the form control value is available
2389
+ *
2390
+ * Similar to `unique` validator, but allows to use a custom query for when the client does
2391
+ * not have permissions for `modelService.count()`.
2392
+ */
2393
+ function available(getAvailableQuery, excludedId) {
2394
+ if (excludedId === void 0) { excludedId = null; }
2395
+ return function (control) {
2396
+ if (!control.value || !control.dirty) {
2397
+ return rxjs.of(null);
2398
+ }
2399
+ return rxjs.timer(500).pipe(operators.switchMap(function () { return getAvailableQuery(control.value, excludedId).pipe(operators.map(function (isAvailable) { return (isAvailable ? null : { available: true }); })); }));
2400
+ };
2401
+ }
2358
2402
  /**
2359
2403
  * Return all errors recursively for the given Form or control
2360
2404
  */
@@ -2420,7 +2464,7 @@
2420
2464
  // - is too lax because it accepts pretty much anything else
2421
2465
  //
2422
2466
  // 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;
2467
+ var RFC_5322 = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[^@ ]+\.[^@]+$/u;
2424
2468
  /**
2425
2469
  * Validate an email address according to RFC, and also that it is publicly deliverable (not "root@localhost" or "root@127.0.0.1")
2426
2470
  *
@@ -3414,11 +3458,14 @@
3414
3458
  /**
3415
3459
  * Persist search and then launch whatever is required to refresh the list
3416
3460
  */
3417
- NaturalAbstractList.prototype.search = function (naturalSearchSelections, navigationExtras) {
3461
+ NaturalAbstractList.prototype.search = function (naturalSearchSelections, navigationExtras, resetPagination) {
3462
+ if (resetPagination === void 0) { resetPagination = true; }
3418
3463
  // Reset page index to restart the pagination (preserve pageSize)
3419
- this.variablesManager.merge('pagination', {
3420
- pagination: lodashEs.pick(this.defaultPagination, ['offset', 'pageIndex']),
3421
- });
3464
+ if (resetPagination) {
3465
+ this.variablesManager.merge('pagination', {
3466
+ pagination: lodashEs.pick(this.defaultPagination, ['offset', 'pageIndex']),
3467
+ });
3468
+ }
3422
3469
  // Persist if activated
3423
3470
  // Two parallel navigations conflict. We first persist the search, then the pagination
3424
3471
  if (this.persistSearch && !this.isPanel) {
@@ -3742,6 +3789,7 @@
3742
3789
  * Name of filter for child items to access ancestor item
3743
3790
  */
3744
3791
  _this.ancestorRelationName = 'parent';
3792
+ _this.oldAncertorId = null;
3745
3793
  _this.breadcrumbs = [];
3746
3794
  return _this;
3747
3795
  }
@@ -3752,27 +3800,30 @@
3752
3800
  // "na" is a trailing param, and should be considered only when there is no search
3753
3801
  this.route.params.subscribe(function (params) {
3754
3802
  // "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);
3803
+ if (params['ns']) {
3804
+ return;
3805
+ }
3806
+ var navigationConditionValue = null;
3807
+ // "na" stands for "navigation" (relation) in url
3808
+ if (params['na']) {
3809
+ navigationConditionValue = { have: { values: [params['na']] } };
3810
+ _this.service.getOne(params['na']).subscribe(
3811
+ // TODO casting should disappear and instead this class should enforce
3812
+ // the service to support Tone with a new generic
3813
+ function (ancestor) { return (_this.breadcrumbs = _this.getBreadcrumb(ancestor)); });
3814
+ var hasAncestorChanged = params['na'] !== _this.oldAncertorId;
3815
+ _this.oldAncertorId = params['na'];
3816
+ _this.clearSearch(hasAncestorChanged);
3775
3817
  }
3818
+ else {
3819
+ navigationConditionValue = { empty: {} };
3820
+ _this.breadcrumbs = [];
3821
+ }
3822
+ var condition = {};
3823
+ condition[_this.ancestorRelationName] = navigationConditionValue;
3824
+ var variables = { filter: { groups: [{ conditions: [condition] }] } };
3825
+ // todo : check why without "as Vall" it errors. Vall is supposed to be QueryVariables, and filter too.
3826
+ _this.variablesManager.set('navigation', variables);
3776
3827
  });
3777
3828
  _super.prototype.ngOnInit.call(this);
3778
3829
  };
@@ -3805,11 +3856,19 @@
3805
3856
  }
3806
3857
  _super.prototype.translateSearchAndRefreshList.call(this, naturalSearchSelections);
3807
3858
  };
3808
- NaturalAbstractNavigableList.prototype.clearSearch = function () {
3859
+ NaturalAbstractNavigableList.prototype.clearSearch = function (resetPagination) {
3860
+ if (resetPagination === void 0) { resetPagination = true; }
3809
3861
  this.naturalSearchSelections = [[]];
3810
- this.search([[]]);
3862
+ _super.prototype.search.call(this, [[]], undefined, resetPagination);
3811
3863
  this.persistenceService.persistInStorage('ns', null, this.getStorageKey());
3812
3864
  };
3865
+ NaturalAbstractNavigableList.prototype.search = function (naturalSearchSelections, navigationExtras, resetPagination) {
3866
+ var _this = this;
3867
+ if (resetPagination === void 0) { resetPagination = true; }
3868
+ this.persistenceService.persistInUrl('na', null, this.route).then(function () {
3869
+ _super.prototype.search.call(_this, naturalSearchSelections, navigationExtras, resetPagination);
3870
+ });
3871
+ };
3813
3872
  /**
3814
3873
  * Return an array for router link usage
3815
3874
  */
@@ -3845,35 +3904,6 @@
3845
3904
  ancestorRelationName: [{ type: i0.Input }]
3846
3905
  };
3847
3906
 
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
3907
  function isFile(value) {
3878
3908
  return ((typeof File !== 'undefined' && value instanceof File) ||
3879
3909
  (typeof Blob !== 'undefined' && value instanceof Blob) ||
@@ -3891,7 +3921,8 @@
3891
3921
  Object.keys(variables).forEach(function (key) {
3892
3922
  var value = variables[key];
3893
3923
  if (value instanceof Date) {
3894
- replaceToJSON(value);
3924
+ // Replace native toJSON() function by our own implementation
3925
+ value.toJSON = function () { return formatIsoDateTime(value); };
3895
3926
  }
3896
3927
  if (isFile(value)) {
3897
3928
  fileFound = true;
@@ -3937,6 +3968,17 @@
3937
3968
  return;
3938
3969
  }));
3939
3970
  }
3971
+ /**
3972
+ * For debugging purpose only, will dump in console everything that happen to
3973
+ * the observable
3974
+ */
3975
+ function debug(debugName) {
3976
+ return operators.tap({
3977
+ next: function (value) { return console.log('NEXT', debugName, value); },
3978
+ error: function (error) { return console.log('ERROR', debugName, error); },
3979
+ complete: function () { return console.log('COMPLETE', debugName); },
3980
+ });
3981
+ }
3940
3982
 
3941
3983
  var NaturalAbstractModelService = /** @class */ (function () {
3942
3984
  function NaturalAbstractModelService(apollo, name, oneQuery, allQuery, createMutation, updateMutation, deleteMutation) {
@@ -4964,7 +5006,7 @@
4964
5006
  { type: i0.Component, args: [{
4965
5007
  selector: 'natural-icon',
4966
5008
  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%)}"]
5009
+ 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
5010
  },] }
4969
5011
  ];
4970
5012
  NaturalIconComponent.ctorParameters = function () { return [
@@ -5516,7 +5558,7 @@
5516
5558
  { type: i0.Component, args: [{
5517
5559
  selector: 'natural-detail-header',
5518
5560
  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}}"]
5561
+ 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
5562
  },] }
5521
5563
  ];
5522
5564
  NaturalDetailHeaderComponent.propDecorators = {
@@ -5665,7 +5707,7 @@
5665
5707
  encapsulation: i0.ViewEncapsulation.None,
5666
5708
  preserveWhitespaces: false,
5667
5709
  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}"]
5710
+ 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
5711
  },] }
5670
5712
  ];
5671
5713
  NaturalDropdownContainerComponent.ctorParameters = function () { return [
@@ -6160,7 +6202,7 @@
6160
6202
  TypeTextComponent.decorators = [
6161
6203
  { type: i0.Component, args: [{
6162
6204
  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}"]
6205
+ styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"]
6164
6206
  },] }
6165
6207
  ];
6166
6208
  TypeTextComponent.ctorParameters = function () { return [
@@ -6265,7 +6307,7 @@
6265
6307
  TypeNumberComponent.decorators = [
6266
6308
  { type: i0.Component, args: [{
6267
6309
  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}"]
6310
+ styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"]
6269
6311
  },] }
6270
6312
  ];
6271
6313
  TypeNumberComponent.ctorParameters = function () { return [
@@ -6665,7 +6707,7 @@
6665
6707
  FacetSelectorComponent.decorators = [
6666
6708
  { type: i0.Component, args: [{
6667
6709
  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}"]
6710
+ styles: [":host .mat-nav-list{padding:0}\n"]
6669
6711
  },] }
6670
6712
  ];
6671
6713
  FacetSelectorComponent.ctorParameters = function () { return [
@@ -6704,7 +6746,7 @@
6704
6746
  { type: i0.Component, args: [{
6705
6747
  selector: 'natural-group',
6706
6748
  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}"]
6749
+ 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
6750
  },] }
6709
6751
  ];
6710
6752
  NaturalGroupComponent.propDecorators = {
@@ -7011,7 +7053,7 @@
7011
7053
  { type: i0.Component, args: [{
7012
7054
  selector: 'natural-input',
7013
7055
  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}"]
7056
+ 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
7057
  },] }
7016
7058
  ];
7017
7059
  NaturalInputComponent.ctorParameters = function () { return [
@@ -7096,7 +7138,7 @@
7096
7138
  { type: i0.Component, args: [{
7097
7139
  selector: 'natural-search',
7098
7140
  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}"]
7141
+ 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
7142
  },] }
7101
7143
  ];
7102
7144
  NaturalSearchComponent.propDecorators = {
@@ -7163,7 +7205,7 @@
7163
7205
  NaturalHierarchicSelectorDialogComponent.decorators = [
7164
7206
  { type: i0.Component, args: [{
7165
7207
  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}"]
7208
+ styles: [":host mat-dialog-actions{display:flex;flex-direction:row;justify-content:flex-end}\n"]
7167
7209
  },] }
7168
7210
  ];
7169
7211
  NaturalHierarchicSelectorDialogComponent.ctorParameters = function () { return [
@@ -7892,7 +7934,7 @@
7892
7934
  selector: 'natural-hierarchic-selector',
7893
7935
  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
7936
  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}"]
7937
+ 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
7938
  },] }
7897
7939
  ];
7898
7940
  NaturalHierarchicSelectorComponent.ctorParameters = function () { return [
@@ -8257,7 +8299,7 @@
8257
8299
  { type: i0.Component, args: [{
8258
8300
  selector: 'natural-select-hierarchic',
8259
8301
  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}"]
8302
+ 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
8303
  },] }
8262
8304
  ];
8263
8305
  NaturalSelectHierarchicComponent.ctorParameters = function () { return [
@@ -8456,7 +8498,7 @@
8456
8498
  { type: i0.Component, args: [{
8457
8499
  selector: 'natural-select',
8458
8500
  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}"]
8501
+ 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
8502
  },] }
8461
8503
  ];
8462
8504
  NaturalSelectComponent.propDecorators = {
@@ -9030,9 +9072,7 @@
9030
9072
  this.closeDrags();
9031
9073
  };
9032
9074
  NaturalFileDropDirective.prototype.hasObservers = function () {
9033
- return (this.fileChange.observers.length > 0 ||
9034
- this.filesChange.observers.length > 0 ||
9035
- this.naturalFileService.filesChanged.observers.length > 0);
9075
+ return this.fileChange.observed || this.filesChange.observed || this.naturalFileService.filesChanged.observed;
9036
9076
  };
9037
9077
  return NaturalFileDropDirective;
9038
9078
  }(NaturalAbstractFile));
@@ -9187,7 +9227,7 @@
9187
9227
  { type: i0.Component, args: [{
9188
9228
  selector: 'natural-file',
9189
9229
  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}"]
9230
+ 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
9231
  },] }
9192
9232
  ];
9193
9233
  FileComponent.ctorParameters = function () { return [
@@ -9236,7 +9276,7 @@
9236
9276
  { type: i0.Component, args: [{
9237
9277
  selector: 'natural-fixed-button',
9238
9278
  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}"]
9279
+ styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"]
9240
9280
  },] }
9241
9281
  ];
9242
9282
  NaturalFixedButtonComponent.ctorParameters = function () { return []; };
@@ -9978,7 +10018,7 @@
9978
10018
  { type: i0.Component, args: [{
9979
10019
  selector: 'natural-relations',
9980
10020
  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}"]
10021
+ 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
10022
  },] }
9983
10023
  ];
9984
10024
  NaturalRelationsComponent.ctorParameters = function () { return [
@@ -10347,6 +10387,10 @@
10347
10387
  function NaturalSidenavContainerComponent(sidenavService, element) {
10348
10388
  this.sidenavService = sidenavService;
10349
10389
  this.element = element;
10390
+ /**
10391
+ * The side that the drawer is attached to
10392
+ */
10393
+ this.position = 'start';
10350
10394
  /**
10351
10395
  * If true listens to route changes to close side nav after a route change if mobile view is active
10352
10396
  * Actually a navigation to current route does not emit a route change, and the sidenav don't close.
@@ -10405,9 +10449,9 @@
10405
10449
  NaturalSidenavContainerComponent.decorators = [
10406
10450
  { type: i0.Component, args: [{
10407
10451
  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",
10452
+ 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
10453
  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}"]
10454
+ 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
10455
  },] }
10412
10456
  ];
10413
10457
  NaturalSidenavContainerComponent.ctorParameters = function () { return [
@@ -10416,6 +10460,7 @@
10416
10460
  ]; };
10417
10461
  NaturalSidenavContainerComponent.propDecorators = {
10418
10462
  name: [{ type: i0.Input }],
10463
+ position: [{ type: i0.Input }],
10419
10464
  mobileAutoClose: [{ type: i0.Input }],
10420
10465
  minimizedWidth: [{ type: i0.Input }],
10421
10466
  noScroll: [{ type: i0.HostBinding, args: ['attr.no-scroll',] }, { type: i0.Input }],
@@ -10432,7 +10477,7 @@
10432
10477
  { type: i0.Component, args: [{
10433
10478
  selector: 'natural-sidenav-content',
10434
10479
  template: '<ng-content></ng-content>',
10435
- styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}"]
10480
+ styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"]
10436
10481
  },] }
10437
10482
  ];
10438
10483
  NaturalSidenavContentComponent.ctorParameters = function () { return []; };
@@ -10521,7 +10566,7 @@
10521
10566
  selector: 'natural-table-button',
10522
10567
  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
10568
  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}"]
10569
+ 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
10570
  },] }
10526
10571
  ];
10527
10572
  NaturalTableButtonComponent.ctorParameters = function () { return []; };
@@ -11177,14 +11222,17 @@
11177
11222
  exports.TypeNumberComponent = TypeNumberComponent;
11178
11223
  exports.TypeSelectComponent = TypeSelectComponent;
11179
11224
  exports.TypeTextComponent = TypeTextComponent;
11225
+ exports.available = available;
11180
11226
  exports.cancellableTimeout = cancellableTimeout;
11181
11227
  exports.cleanSameValues = cleanSameValues;
11182
11228
  exports.collectErrors = collectErrors;
11229
+ exports.debug = debug;
11183
11230
  exports.decimal = decimal;
11184
11231
  exports.deliverableEmail = deliverableEmail;
11185
11232
  exports.ensureHttpPrefix = ensureHttpPrefix;
11186
11233
  exports.fallbackIfNoOpenedPanels = fallbackIfNoOpenedPanels;
11187
11234
  exports.formatIsoDate = formatIsoDate;
11235
+ exports.formatIsoDateTime = formatIsoDateTime;
11188
11236
  exports.fromUrl = fromUrl;
11189
11237
  exports.getForegroundColor = getForegroundColor;
11190
11238
  exports.hasFilesAndProcessDate = hasFilesAndProcessDate;
@@ -11214,18 +11262,18 @@
11214
11262
  exports.validTlds = validTlds;
11215
11263
  exports.validateAllFormControls = validateAllFormControls;
11216
11264
  exports.wrapLike = wrapLike;
11217
- exports.ɵa = NaturalAbstractFile;
11218
- exports.ɵb = NaturalDropdownService;
11219
- exports.ɵc = AbstractAssociationSelectComponent;
11220
- exports.ɵd = NATURAL_DROPDOWN_CONTAINER_DATA;
11221
- exports.ɵe = NaturalDropdownContainerComponent;
11222
- exports.ɵf = naturalDropdownAnimations;
11223
- exports.ɵg = AbstractSelect;
11224
- exports.ɵh = NaturalGroupComponent;
11225
- exports.ɵi = NaturalInputComponent;
11226
- exports.ɵj = FacetSelectorComponent;
11265
+ exports["ɵa"] = NaturalAbstractFile;
11266
+ exports["ɵb"] = NaturalDropdownService;
11267
+ exports["ɵc"] = AbstractAssociationSelectComponent;
11268
+ exports["ɵd"] = NATURAL_DROPDOWN_CONTAINER_DATA;
11269
+ exports["ɵe"] = NaturalDropdownContainerComponent;
11270
+ exports["ɵf"] = naturalDropdownAnimations;
11271
+ exports["ɵg"] = AbstractSelect;
11272
+ exports["ɵh"] = NaturalGroupComponent;
11273
+ exports["ɵi"] = NaturalInputComponent;
11274
+ exports["ɵj"] = FacetSelectorComponent;
11227
11275
 
11228
11276
  Object.defineProperty(exports, '__esModule', { value: true });
11229
11277
 
11230
- })));
11278
+ }));
11231
11279
  //# sourceMappingURL=ecodev-natural.umd.js.map