@sumaris-net/ngx-components 0.26.0 → 0.26.4

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.
@@ -2,12 +2,15 @@
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
4
  export * from './public_api';
5
- export { RegisterForm as ɵd } from './src/app/core/register/form/form-register';
6
- export { RegisterModal as ɵf } from './src/app/core/register/modal/modal-register';
7
- export { AccountValidatorService as ɵe } from './src/app/core/services/validator/account.validator';
8
- export { LocalSettingsValidatorService as ɵh } from './src/app/core/services/validator/local-settings.validator';
9
- export { UserSettingsValidatorService as ɵg } from './src/app/core/services/validator/user-settings.validator';
10
- export { isFocusableElement as ɵc } from './src/app/shared/focusable';
5
+ export { RegisterForm as ɵg } from './src/app/core/register/form/form-register';
6
+ export { RegisterModal as ɵi } from './src/app/core/register/modal/modal-register';
7
+ export { AccountValidatorService as ɵh } from './src/app/core/services/validator/account.validator';
8
+ export { LocalSettingsValidatorService as ɵk } from './src/app/core/services/validator/local-settings.validator';
9
+ export { UserSettingsValidatorService as ɵj } from './src/app/core/services/validator/user-settings.validator';
10
+ export { isFocusableElement as ɵe } from './src/app/shared/focusable';
11
+ export { MatBadgeIconDirective as ɵd } from './src/app/shared/material/badge/badge-icon.directive';
12
+ export { SharedMatBadgeIconModule as ɵc } from './src/app/shared/material/badge/badge-icon.module';
13
+ export { MatBadgeIconTestPage as ɵf } from './src/app/shared/material/badge/badge-icon.test';
11
14
  export { MatNumpadDomService as ɵb } from './src/app/shared/material/numpad/numpad.dom-service';
12
15
  export { CustomReuseStrategy as ɵa } from './src/app/shared/shared-routing.module';
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VtYXJpcy1uZXQubmd4LWNvbXBvbmVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zdW1hcmlzLW5ldC5uZ3gtY29tcG9uZW50cy50cyJdLCJuYW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UnO1xuZXhwb3J0IHtDdXN0b21SZXVzZVN0cmF0ZWd5IGFzIMm1YX0gZnJvbSAnLi9zcmMvYXBwL3NoYXJlZC9zaGFyZWQtcm91dGluZy5tb2R1bGUnOyJdfQ==
@@ -6908,6 +6908,83 @@ MaterialChipsModule.decorators = [
6908
6908
  },] }
6909
6909
  ];
6910
6910
 
6911
+ class MatBadgeIconDirective {
6912
+ constructor(el) {
6913
+ this.el = el;
6914
+ }
6915
+ ngOnInit() {
6916
+ this.size = this.size || 'medium';
6917
+ this.color = this.color || 'primary';
6918
+ if (this.color === 'warn')
6919
+ this.color = 'warning';
6920
+ let fontSize;
6921
+ switch (this.size) {
6922
+ case 'large':
6923
+ fontSize = '24px';
6924
+ break;
6925
+ case 'medium':
6926
+ fontSize = '22px';
6927
+ break;
6928
+ case 'small':
6929
+ fontSize = '16px';
6930
+ break;
6931
+ }
6932
+ const badge = this.el.nativeElement.querySelector('.mat-badge-content');
6933
+ badge.style.display = 'flex';
6934
+ badge.style.alignItems = 'center';
6935
+ badge.style.justifyContent = 'center';
6936
+ if (this.fill !== 'clear') {
6937
+ badge.style.background = `var(--ion-color-${this.color})`;
6938
+ badge.style.color = `var(--ion-color-${this.color}-contrast)`;
6939
+ }
6940
+ else {
6941
+ badge.style.color = `var(--ion-color-${this.color})`;
6942
+ badge.style.background = 'transparent';
6943
+ }
6944
+ if (this.matIcon) {
6945
+ badge.innerHTML = `<i class="material-icons" style="font-size: ${fontSize};">${this.matIcon}</i>`;
6946
+ }
6947
+ else if (this.ionIcon) {
6948
+ badge.innerHTML = `<ion-icon style="font-size: ${fontSize};" name="${this.ionIcon}"></ion-icon>`;
6949
+ }
6950
+ }
6951
+ }
6952
+ MatBadgeIconDirective.decorators = [
6953
+ { type: Directive, args: [{
6954
+ selector: '[matBadgeIcon], [ionBadgeIcon]',
6955
+ inputs: [
6956
+ 'size: matBadgeSize',
6957
+ 'color: matBadgeColor',
6958
+ 'fill: matBadgeFill',
6959
+ ]
6960
+ },] }
6961
+ ];
6962
+ MatBadgeIconDirective.ctorParameters = () => [
6963
+ { type: ElementRef }
6964
+ ];
6965
+ MatBadgeIconDirective.propDecorators = {
6966
+ matIcon: [{ type: Input, args: ['matBadgeIcon',] }],
6967
+ ionIcon: [{ type: Input, args: ['ionBadgeIcon',] }]
6968
+ };
6969
+
6970
+ class SharedMatBadgeIconModule {
6971
+ }
6972
+ SharedMatBadgeIconModule.decorators = [
6973
+ { type: NgModule, args: [{
6974
+ imports: [
6975
+ CommonModule,
6976
+ IonicModule,
6977
+ MatBadgeModule,
6978
+ ],
6979
+ exports: [
6980
+ MatBadgeIconDirective
6981
+ ],
6982
+ declarations: [
6983
+ MatBadgeIconDirective
6984
+ ]
6985
+ },] }
6986
+ ];
6987
+
6911
6988
  const modules = [
6912
6989
  // Angular material components
6913
6990
  MatCommonModule,
@@ -6949,7 +7026,8 @@ const modules = [
6949
7026
  SharedMatBooleanModule,
6950
7027
  SharedMatNumpadModule,
6951
7028
  SharedMatSwipeModule,
6952
- MaterialChipsModule
7029
+ MaterialChipsModule,
7030
+ SharedMatBadgeIconModule
6953
7031
  ];
6954
7032
  class SharedMaterialModule {
6955
7033
  }
@@ -16067,7 +16145,7 @@ class MaterialTestingPage {
16067
16145
  MaterialTestingPage.decorators = [
16068
16146
  { type: Component, args: [{
16069
16147
  selector: 'app-material-testing',
16070
- template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Material components</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <ion-list>\n\n <ion-item-divider>Shared Material components</ion-item-divider>\n\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./datetime')\">\n Date/Time field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./autocomplete')\">\n Autocomplete field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./latlong')\">\n Lat/Long field\n </ion-item>\n<!-- <ion-item tappable class=\"text-1x\" (click)=\"openPage('./numpad')\">-->\n<!-- Numeric pad component-->\n<!-- </ion-item>-->\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./swipe')\">\n Swipe component\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./chips')\">\n Chips component\n </ion-item>\n\n <ng-container *ngIf=\"pages && pages.length\">\n <ion-item-divider>Other components</ion-item-divider>\n\n <ion-item *ngFor=\"let item of pages\"\n tappable class=\"text-1x\"\n (click)=\"openPage(item.page)\">{{item.label}}</ion-item>\n\n </ng-container>\n </ion-list>\n\n</ion-content>\n"
16148
+ template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Material components</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <ion-list>\n\n <ion-item-divider>Shared Material components</ion-item-divider>\n\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./datetime')\">\n Date/Time field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./autocomplete')\">\n Autocomplete field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./latlong')\">\n Lat/Long field\n </ion-item>\n<!-- <ion-item tappable class=\"text-1x\" (click)=\"openPage('./numpad')\">-->\n<!-- Numeric pad component-->\n<!-- </ion-item>-->\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./swipe')\">\n Swipe component\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./chips')\">\n Chips component\n </ion-item>\n\n <ion-item-divider>Directive</ion-item-divider>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./badge-icon')\">\n Badge icon directive\n </ion-item>\n\n <ng-container *ngIf=\"pages && pages.length\">\n <ion-item-divider>Other components</ion-item-divider>\n\n <ion-item *ngFor=\"let item of pages\"\n tappable class=\"text-1x\"\n (click)=\"openPage(item.page)\">{{item.label}}</ion-item>\n\n </ng-container>\n </ion-list>\n\n</ion-content>\n"
16071
16149
  },] }
16072
16150
  ];
16073
16151
  MaterialTestingPage.ctorParameters = () => [
@@ -16323,6 +16401,15 @@ ChipsTestPage.ctorParameters = () => [
16323
16401
  { type: FormBuilder }
16324
16402
  ];
16325
16403
 
16404
+ class MatBadgeIconTestPage {
16405
+ }
16406
+ MatBadgeIconTestPage.decorators = [
16407
+ { type: Component, args: [{
16408
+ selector: 'mat-badge-icon-test',
16409
+ template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>matBadgeIcon directive</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <!-- small badge -->\n <p>\n <ion-text color=\"tertiary\">\n <span matBadge matIcon=\"check\"\n matBadgeSize=\"small\"\n matBadgeColor=\"accent\"\n matBadgeOverlap=\"false\">Small badge</span>\n </ion-text>\n </p>\n\n <!-- medium badge -->\n <p>\n <ion-text matBadge matBadgeIcon=\"check\"\n matBadgeSize=\"medium\"\n matBadgeColor=\"tertiary\"\n matBadgeOverlap=\"false\"\n >Medium badge</ion-text>\n </p>\n\n <!-- small badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"close\" matBadgeSize=\"large\"\n matBadgeOverlap=\"false\">Large badge</ion-label>\n </p>\n\n <!-- default size badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"check\" matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge (no size, no color)\n </ion-label>\n </p>\n\n <!-- ion icon -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark\"\n matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge with ion-icon\n </ion-label>\n </p>\n\n <!-- ion icon clear -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark-circle\"\n matBadgeColor=\"tertiary\"\n matBadgeFill=\"clear\"\n matBadgeOverlap=\"false\">Badge with clear icon\n </ion-label>\n </p>\n\n\n</ion-content>\n"
16410
+ },] }
16411
+ ];
16412
+
16326
16413
  const routes$1 = [
16327
16414
  {
16328
16415
  path: '',
@@ -16358,6 +16445,11 @@ const routes$1 = [
16358
16445
  path: 'chips',
16359
16446
  pathMatch: 'full',
16360
16447
  component: ChipsTestPage
16448
+ },
16449
+ {
16450
+ path: 'badge-icon',
16451
+ pathMatch: 'full',
16452
+ component: MatBadgeIconTestPage
16361
16453
  }
16362
16454
  ];
16363
16455
  class MaterialTestingModule {
@@ -16379,7 +16471,8 @@ MaterialTestingModule.decorators = [
16379
16471
  LatLongTestPage,
16380
16472
  // NumpadTestPage,
16381
16473
  SwipeTestPage,
16382
- ChipsTestPage
16474
+ ChipsTestPage,
16475
+ MatBadgeIconTestPage
16383
16476
  ],
16384
16477
  exports: [
16385
16478
  SharedMaterialModule,
@@ -22398,7 +22491,7 @@ class AppEntityEditor extends AppTabEditor {
22398
22491
  const idChanged = isNotNil(data.id)
22399
22492
  && this.previousDataId !== undefined // Ignore if first loading (=undefined)
22400
22493
  && this.previousDataId !== data.id;
22401
- opts = Object.assign({ updateRoute: this._autoUpdateRoute && idChanged && !this.loading, openTabIndex: this._autoOpenNextTab && idChanged && this.computeNextTabIndex() }, opts);
22494
+ opts = Object.assign({ updateRoute: this._autoUpdateRoute && idChanged && !this.loading, openTabIndex: this._autoOpenNextTab && idChanged && isNil(this.previousDataId) && this.computeNextTabIndex() }, opts);
22402
22495
  this.data = data;
22403
22496
  this.previousDataId = data.id || null;
22404
22497
  const promiseOrVoid = this.setValue(data);
@@ -22415,7 +22508,7 @@ class AppEntityEditor extends AppTabEditor {
22415
22508
  .then(() => this.updateTitle(data));
22416
22509
  }
22417
22510
  else {
22418
- // Update the tag group index
22511
+ // Update the next tab
22419
22512
  this.updateTabIndex(opts.openTabIndex);
22420
22513
  // Update the title.
22421
22514
  this.updateTitle(data);
@@ -22443,7 +22536,7 @@ class AppEntityEditor extends AppTabEditor {
22443
22536
  updateTabAndRoute(data, opts) {
22444
22537
  return __awaiter(this, void 0, void 0, function* () {
22445
22538
  this.queryParams = this.queryParams || {};
22446
- // Open the tab group
22539
+ // Open the next tab
22447
22540
  this.updateTabIndex(opts && opts.openTabIndex);
22448
22541
  // Save the opened tab into the queryParams
22449
22542
  this.queryParams.tab = this.selectedTabIndex;
@@ -22469,12 +22562,9 @@ class AppEntityEditor extends AppTabEditor {
22469
22562
  * Update the route location, and open the next tab
22470
22563
  */
22471
22564
  updateTabIndex(tabIndex) {
22472
- // Open the second tab
22473
- if (isNotNil(tabIndex)) {
22474
- if (this.selectedTabIndex !== tabIndex) {
22475
- this.selectedTabIndex = tabIndex;
22476
- this.markForCheck();
22477
- }
22565
+ if (isNotNil(tabIndex) && tabIndex > this.selectedTabIndex) {
22566
+ this.selectedTabIndex = tabIndex;
22567
+ this.markForCheck();
22478
22568
  }
22479
22569
  }
22480
22570
  saveAndClose(event, options) {
@@ -22648,7 +22738,7 @@ class AppEntityEditor extends AppTabEditor {
22648
22738
  });
22649
22739
  }
22650
22740
  setError(err) {
22651
- console.error('[data-editor] ' + err && err.message || err, err);
22741
+ console.error('[entity-editor] Error: ' + err && err.message || '', err);
22652
22742
  let userMessage = err && err.message && this.translate.instant(err.message) || err;
22653
22743
  // Add details error (if any) under the main message
22654
22744
  const detailMessage = err && err.details && (err.details.message || err.details) || undefined;
@@ -22660,8 +22750,13 @@ class AppEntityEditor extends AppTabEditor {
22660
22750
  this.error = userMessage;
22661
22751
  }
22662
22752
  /* -- protected methods -- */
22753
+ /**
22754
+ * Return undefined to keep same tab
22755
+ * @protected
22756
+ */
22663
22757
  computeNextTabIndex() {
22664
- return this.selectedTabIndex + 1 < this.tabCount ? this.selectedTabIndex + 1 : undefined;
22758
+ const nextTabIndex = this.selectedTabIndex + 1;
22759
+ return nextTabIndex < this.tabCount ? nextTabIndex : undefined;
22665
22760
  }
22666
22761
  unload() {
22667
22762
  return __awaiter(this, void 0, void 0, function* () {
@@ -23915,5 +24010,5 @@ const ErrorCodes = {
23915
24010
  * Generated bundle index. Do not edit.
23916
24011
  */
23917
24012
 
23918
- export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorAdapter, FormErrorTranslatePipe, FormFieldValuesHolder, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialRef, ReferentialUtils, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isControlHasInput, isEmptyArray, isInputElement, isInstanceOf, isInt, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitIdle, waitWhilePending, ɵ0$5 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh };
24013
+ export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorAdapter, FormErrorTranslatePipe, FormFieldValuesHolder, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialRef, ReferentialUtils, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isControlHasInput, isEmptyArray, isInputElement, isInstanceOf, isInt, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitIdle, waitWhilePending, ɵ0$5 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, SharedMatBadgeIconModule as ɵc, MatBadgeIconDirective as ɵd, isFocusableElement as ɵe, MatBadgeIconTestPage as ɵf, RegisterForm as ɵg, AccountValidatorService as ɵh, RegisterModal as ɵi, UserSettingsValidatorService as ɵj, LocalSettingsValidatorService as ɵk };
23919
24014
  //# sourceMappingURL=sumaris-net.ngx-components.js.map