@siemens/element-ng 49.13.0 → 51.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +56 -39
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +81 -51
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +142 -137
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +18 -15
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +71 -46
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +55 -32
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +175 -111
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +37 -24
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +24 -16
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +52 -33
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +12 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +35 -26
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +327 -213
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +358 -234
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +21 -16
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +93 -81
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +29 -22
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +243 -147
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +267 -84
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +220 -315
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +38 -29
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +46 -47
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +19 -15
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +118 -72
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +73 -54
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +42 -33
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +46 -29
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +56 -48
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +12 -10
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +133 -94
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +117 -81
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +67 -41
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +38 -27
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +31 -22
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +121 -138
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +76 -45
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +33 -26
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +32 -24
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +212 -154
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
- package/fesm2022/siemens-element-ng-side-panel.mjs +119 -75
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +14 -13
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +42 -28
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +268 -254
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +57 -47
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +22 -14
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +16 -15
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +59 -45
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +5 -4
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +59 -40
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +52 -54
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +28 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +92 -73
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +75 -67
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/package.json +20 -22
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/element-class-changes.js +1 -28
- package/schematics/migrations/data/element-migration-data.js +2 -0
- package/schematics/migrations/data/element-selectors.js +1 -11
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +9 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +7 -7
- package/schematics/migrations/data/symbol-renaming.js +1 -48
- package/schematics/migrations/element-migration/element-migration.js +3 -6
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +2 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +2 -2
- package/template-i18n.json +3 -6
- package/types/siemens-element-ng-application-header.d.ts +1 -21
- package/types/siemens-element-ng-chat-messages.d.ts +6 -4
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +1 -12
- package/types/siemens-element-ng-file-uploader.d.ts +5 -23
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-form.d.ts +134 -37
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +6 -1
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +5 -8
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-split.d.ts +95 -63
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-translate.d.ts +1 -5
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,127 +1,25 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { viewChild, model, input, output, computed, inject, ChangeDetectionStrategy, Component, Pipe, Directive, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1$2 from '@angular/forms';
|
|
4
|
-
import { FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
5
|
-
import * as i1$1 from '@ngx-formly/core';
|
|
6
|
-
import { FormlyForm, FieldType, FormlyModule, FieldArrayType, FieldWrapper, FormlyConfig, FORMLY_CONFIG, FormlyFormBuilder } from '@ngx-formly/core';
|
|
7
|
-
import { FormlyJsonschema } from '@ngx-formly/core/json-schema';
|
|
8
|
-
import * as i1 from '@angular/common';
|
|
9
|
-
import { CommonModule } from '@angular/common';
|
|
10
|
-
import * as i4 from '@siemens/element-ng/form';
|
|
11
|
-
import { SiFormContainerComponent, SiFormFieldsetComponent, SI_FORM_ITEM_CONTROL, SiFormItemComponent, SiFormModule } from '@siemens/element-ng/form';
|
|
12
|
-
import { FormlyBootstrapModule } from '@ngx-formly/bootstrap';
|
|
13
1
|
import { FormlyFieldMultiCheckbox } from '@ngx-formly/bootstrap/multicheckbox';
|
|
14
2
|
import { FormlyFieldRadio } from '@ngx-formly/bootstrap/radio';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { ChangeDetectionStrategy, Component, Pipe, viewChild, input, computed, Directive, model, output, inject } from '@angular/core';
|
|
5
|
+
import * as i1 from '@ngx-formly/core';
|
|
6
|
+
import { FieldType, FormlyModule, FieldArrayType, FieldWrapper, FormlyForm, FORMLY_CONFIG, provideFormlyConfig } from '@ngx-formly/core';
|
|
15
7
|
import { SiTranslatePipe, injectSiTranslateService } from '@siemens/element-translate-ng/translate';
|
|
8
|
+
import * as i1$1 from '@angular/forms';
|
|
9
|
+
import { ReactiveFormsModule, FormsModule, FormGroup } from '@angular/forms';
|
|
16
10
|
import { SiDateRangeComponent, SiCalendarButtonComponent, SiDatepickerDirective, SiTimepickerComponent } from '@siemens/element-ng/datepicker';
|
|
17
11
|
import { SiIp4InputDirective, SiIp6InputDirective } from '@siemens/element-ng/ip-input';
|
|
18
12
|
import { SiNumberInputComponent } from '@siemens/element-ng/number-input';
|
|
19
13
|
import { SiPasswordStrengthComponent, SiPasswordStrengthDirective } from '@siemens/element-ng/password-strength';
|
|
20
14
|
import { SiSelectComponent, SiSelectSimpleOptionsDirective, SiSelectMultiValueDirective, SiSelectSingleValueDirective } from '@siemens/element-ng/select';
|
|
21
15
|
import { SiCollapsiblePanelComponent, SiAccordionComponent } from '@siemens/element-ng/accordion';
|
|
16
|
+
import { SiFormContainerComponent, SiFormFieldsetComponent, SI_FORM_ITEM_CONTROL, SiFormItemComponent } from '@siemens/element-ng/form';
|
|
22
17
|
import { SiTabsetComponent, SiTabComponent } from '@siemens/element-ng/tabs';
|
|
23
18
|
import { SiIconComponent } from '@siemens/element-ng/icon';
|
|
24
19
|
import { SiTooltipDirective } from '@siemens/element-ng/tooltip';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* SPDX-License-Identifier: MIT
|
|
29
|
-
*/
|
|
30
|
-
class SiFormlyComponent {
|
|
31
|
-
/**
|
|
32
|
-
* Formly main container to provide modelChange subscriptions.
|
|
33
|
-
*/
|
|
34
|
-
formlyForm = viewChild(FormlyForm, ...(ngDevMode ? [{ debugName: "formlyForm" }] : []));
|
|
35
|
-
form = model(...(ngDevMode ? [undefined, { debugName: "form" }] : []));
|
|
36
|
-
/**
|
|
37
|
-
* Mapping of field name and its value.
|
|
38
|
-
*
|
|
39
|
-
* @defaultValue
|
|
40
|
-
* ```
|
|
41
|
-
* {}
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
model = model({}, ...(ngDevMode ? [{ debugName: "model" }] : []));
|
|
45
|
-
/**
|
|
46
|
-
* Define FormlyFormOptions.
|
|
47
|
-
*
|
|
48
|
-
* @defaultValue
|
|
49
|
-
* ```
|
|
50
|
-
* {}
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
54
|
-
/**
|
|
55
|
-
* JSONSchema7 can be used instead of FormlyFieldConfig array for defining form fields.
|
|
56
|
-
* */
|
|
57
|
-
schema = model(...(ngDevMode ? [undefined, { debugName: "schema" }] : []));
|
|
58
|
-
/**
|
|
59
|
-
* Define all form fields with FormlyFieldConfig array.
|
|
60
|
-
*
|
|
61
|
-
* @defaultValue []
|
|
62
|
-
*/
|
|
63
|
-
// eslint-disable-next-line @angular-eslint/prefer-signal-model
|
|
64
|
-
fields = input([], ...(ngDevMode ? [{ debugName: "fields" }] : []));
|
|
65
|
-
fieldsChange = output();
|
|
66
|
-
/** Define width for field labels in pixel */
|
|
67
|
-
labelWidth = input(...(ngDevMode ? [undefined, { debugName: "labelWidth" }] : []));
|
|
68
|
-
fieldConfig = computed(() => {
|
|
69
|
-
let formlyFieldConfig;
|
|
70
|
-
const schema = this.schema();
|
|
71
|
-
const labelWidth = this.labelWidth();
|
|
72
|
-
const opts = {
|
|
73
|
-
map: (field, s) => {
|
|
74
|
-
if (labelWidth) {
|
|
75
|
-
field.props ??= {};
|
|
76
|
-
field.props.labelWidth = labelWidth;
|
|
77
|
-
}
|
|
78
|
-
return field;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
if (schema) {
|
|
82
|
-
formlyFieldConfig = [this.formlyJsonschema.toFieldConfig(schema, opts)];
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
formlyFieldConfig = this.fields();
|
|
86
|
-
}
|
|
87
|
-
if (formlyFieldConfig && formlyFieldConfig.length > 0) {
|
|
88
|
-
this.applyLabelWidth(formlyFieldConfig);
|
|
89
|
-
}
|
|
90
|
-
this.fieldsChange.emit(formlyFieldConfig);
|
|
91
|
-
return formlyFieldConfig;
|
|
92
|
-
}, ...(ngDevMode ? [{ debugName: "fieldConfig" }] : []));
|
|
93
|
-
ownForm = false;
|
|
94
|
-
formlyJsonschema = inject(FormlyJsonschema);
|
|
95
|
-
ngOnInit() {
|
|
96
|
-
if (!this.form()) {
|
|
97
|
-
this.ownForm = true;
|
|
98
|
-
this.form.set(new FormGroup({}));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
applyLabelWidth(formlyFieldConfig) {
|
|
102
|
-
const apply = (cfg) => {
|
|
103
|
-
cfg.forEach(field => {
|
|
104
|
-
field.props ??= {};
|
|
105
|
-
field.props.labelWidth = this.labelWidth();
|
|
106
|
-
if (Array.isArray(field.fieldGroup)) {
|
|
107
|
-
apply(field.fieldGroup);
|
|
108
|
-
}
|
|
109
|
-
if (typeof field.fieldArray !== 'function') {
|
|
110
|
-
if (Array.isArray(field.fieldArray?.fieldGroup)) {
|
|
111
|
-
apply(field.fieldArray.fieldGroup);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
apply(formlyFieldConfig);
|
|
117
|
-
}
|
|
118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiFormlyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiFormlyComponent, isStandalone: false, selector: "si-formly", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { form: "formChange", model: "modelChange", schema: "schemaChange", fieldsChange: "fieldsChange" }, viewQueries: [{ propertyName: "formlyForm", first: true, predicate: FormlyForm, descendants: true, isSignal: true }], ngImport: i0, template: "@let formlyForm = form();\n@let formlyFieldConfig = fieldConfig();\n@let formlyFormOptions = options();\n@if (formlyForm && formlyFieldConfig) {\n @if (ownForm) {\n <form [formGroup]=\"formlyForm\">\n <si-form-container [form]=\"formlyForm\">\n <div si-form-container-content>\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n </div>\n </si-form-container>\n </form>\n } @else {\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n }\n\n <ng-template #formlytmpl>\n <formly-form\n [fields]=\"formlyFieldConfig\"\n [options]=\"formlyFormOptions\"\n [form]=\"formlyForm\"\n [(model)]=\"model\"\n />\n </ng-template>\n}\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.SiFormContainerComponent, selector: "si-form-container", inputs: ["form", "readonly", "contentContainerBreakpoints", "disableContainerBreakpoints", "errorCodeTranslateKeyMap", "controlNameTranslateKeyMap", "disableErrorPrinting", "labelWidth"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
120
|
-
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiFormlyComponent, decorators: [{
|
|
122
|
-
type: Component,
|
|
123
|
-
args: [{ selector: 'si-formly', standalone: false, changeDetection: ChangeDetectionStrategy.Default, template: "@let formlyForm = form();\n@let formlyFieldConfig = fieldConfig();\n@let formlyFormOptions = options();\n@if (formlyForm && formlyFieldConfig) {\n @if (ownForm) {\n <form [formGroup]=\"formlyForm\">\n <si-form-container [form]=\"formlyForm\">\n <div si-form-container-content>\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n </div>\n </si-form-container>\n </form>\n } @else {\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n }\n\n <ng-template #formlytmpl>\n <formly-form\n [fields]=\"formlyFieldConfig\"\n [options]=\"formlyFormOptions\"\n [form]=\"formlyForm\"\n [(model)]=\"model\"\n />\n </ng-template>\n}\n" }]
|
|
124
|
-
}], propDecorators: { formlyForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FormlyForm), { isSignal: true }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }, { type: i0.Output, args: ["formChange"] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], schema: [{ type: i0.Input, args: [{ isSignal: true, alias: "schema", required: false }] }, { type: i0.Output, args: ["schemaChange"] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }], fieldsChange: [{ type: i0.Output, args: ["fieldsChange"] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }] } });
|
|
20
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
21
|
+
import { withFormlyBootstrap } from '@ngx-formly/bootstrap';
|
|
22
|
+
import { FormlyJsonschema } from '@ngx-formly/core/json-schema';
|
|
125
23
|
|
|
126
24
|
/**
|
|
127
25
|
* Copyright (c) Siemens 2016 - 2026
|
|
@@ -164,12 +62,12 @@ class SiFormlyButtonComponent extends FieldType {
|
|
|
164
62
|
}
|
|
165
63
|
}
|
|
166
64
|
}
|
|
167
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
168
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyButtonComponent, isStandalone: true, selector: "si-formly-button", usesInheritance: true, ngImport: i0, template: "<button\n type=\"button\"\n class=\"btn\"\n [class]=\"{\n 'btn-secondary': !props.btnType || props.btnType === 'secondary',\n 'btn-primary': props.btnType === 'primary',\n 'btn-tertiary': props.btnType === 'tertiary',\n 'btn-warning': props.btnType === 'warning',\n 'btn-danger': props.btnType === 'danger'\n }\"\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [hidden]=\"props.hidden\"\n (click)=\"click()\"\n >{{ props.label | translate }}</button\n>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
169
67
|
}
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyButtonComponent, decorators: [{
|
|
171
69
|
type: Component,
|
|
172
|
-
args: [{ selector: 'si-formly-button', imports: [SiTranslatePipe, FormlyModule], changeDetection: ChangeDetectionStrategy.
|
|
70
|
+
args: [{ selector: 'si-formly-button', imports: [SiTranslatePipe, FormlyModule], changeDetection: ChangeDetectionStrategy.Eager, template: "<button\n type=\"button\"\n class=\"btn\"\n [class]=\"{\n 'btn-secondary': !props.btnType || props.btnType === 'secondary',\n 'btn-primary': props.btnType === 'primary',\n 'btn-tertiary': props.btnType === 'tertiary',\n 'btn-warning': props.btnType === 'warning',\n 'btn-danger': props.btnType === 'danger'\n }\"\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [hidden]=\"props.hidden\"\n (click)=\"click()\"\n >{{ props.label | translate }}</button\n>\n" }]
|
|
173
71
|
}] });
|
|
174
72
|
|
|
175
73
|
/**
|
|
@@ -208,10 +106,10 @@ class SiValidationErrorIdPipe {
|
|
|
208
106
|
transform(value, ...args) {
|
|
209
107
|
return `${value}-formly-validation-error`;
|
|
210
108
|
}
|
|
211
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
212
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiValidationErrorIdPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
110
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiValidationErrorIdPipe, isStandalone: true, name: "siValidationErrorId" });
|
|
213
111
|
}
|
|
214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiValidationErrorIdPipe, decorators: [{
|
|
215
113
|
type: Pipe,
|
|
216
114
|
args: [{ name: 'siValidationErrorId' }]
|
|
217
115
|
}] });
|
|
@@ -221,12 +119,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
221
119
|
* SPDX-License-Identifier: MIT
|
|
222
120
|
*/
|
|
223
121
|
class SiFormlyDateRangeComponent extends FieldType {
|
|
224
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
225
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyDateRangeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
123
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyDateRangeComponent, isStandalone: true, selector: "si-formly-date-range", usesInheritance: true, ngImport: i0, template: "<si-date-range\n #dateRange\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [formControl]=\"formControl\"\n [siDatepickerConfig]=\"props.siDatepickerConfig\"\n [startDatePlaceholder]=\"props.startDatePlaceholder ?? dateRange.startDatePlaceholder()\"\n [endDatePlaceholder]=\"props.endDatePlaceholder ?? dateRange.endDatePlaceholder()\"\n [ariaLabelCalendarButton]=\"props.ariaLabelCalendarButton ?? dateRange.ariaLabelCalendarButton()\"\n [startTimeLabel]=\"props.startTimeLabel ?? dateRange.startTimeLabel()\"\n [endTimeLabel]=\"props.endTimeLabel ?? dateRange.endTimeLabel()\"\n [required]=\"props.required ?? false\"\n [readonly]=\"props.readonly ?? dateRange.readonly()\"\n [autoClose]=\"props.autoClose ?? dateRange.autoClose()\"\n [errormessageId]=\"id | siValidationErrorId\"\n/>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "component", type: SiDateRangeComponent, selector: "si-date-range", inputs: ["id", "siDatepickerConfig", "startDatePlaceholder", "endDatePlaceholder", "ariaLabelCalendarButton", "startTimeLabel", "endTimeLabel", "autoClose", "disabled", "readonly", "value", "errormessageId"], outputs: ["siDatepickerConfigChange", "siDatepickerRangeChange", "disabledTimeChange", "valueChange"] }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
226
124
|
}
|
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyDateRangeComponent, decorators: [{
|
|
228
126
|
type: Component,
|
|
229
|
-
args: [{ selector: 'si-formly-date-range', imports: [ReactiveFormsModule, FormlyModule, SiDateRangeComponent, SiValidationErrorIdPipe], changeDetection: ChangeDetectionStrategy.
|
|
127
|
+
args: [{ selector: 'si-formly-date-range', imports: [ReactiveFormsModule, FormlyModule, SiDateRangeComponent, SiValidationErrorIdPipe], changeDetection: ChangeDetectionStrategy.Eager, template: "<si-date-range\n #dateRange\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [formControl]=\"formControl\"\n [siDatepickerConfig]=\"props.siDatepickerConfig\"\n [startDatePlaceholder]=\"props.startDatePlaceholder ?? dateRange.startDatePlaceholder()\"\n [endDatePlaceholder]=\"props.endDatePlaceholder ?? dateRange.endDatePlaceholder()\"\n [ariaLabelCalendarButton]=\"props.ariaLabelCalendarButton ?? dateRange.ariaLabelCalendarButton()\"\n [startTimeLabel]=\"props.startTimeLabel ?? dateRange.startTimeLabel()\"\n [endTimeLabel]=\"props.endTimeLabel ?? dateRange.endTimeLabel()\"\n [required]=\"props.required ?? false\"\n [readonly]=\"props.readonly ?? dateRange.readonly()\"\n [autoClose]=\"props.autoClose ?? dateRange.autoClose()\"\n [errormessageId]=\"id | siValidationErrorId\"\n/>\n" }]
|
|
230
128
|
}] });
|
|
231
129
|
|
|
232
130
|
/**
|
|
@@ -250,10 +148,10 @@ class SiFormlyDateTimeComponent extends FieldType {
|
|
|
250
148
|
}
|
|
251
149
|
}
|
|
252
150
|
}
|
|
253
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
254
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyDateTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
152
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyDateTimeComponent, isStandalone: true, selector: "si-formly-datetime", usesInheritance: true, ngImport: i0, template: "<si-calendar-button class=\"w-100\">\n <input\n type=\"text\"\n class=\"form-control\"\n siDatepicker\n [id]=\"id\"\n [autoClose]=\"props.autoClose\"\n [placeholder]=\"props.placeholder\"\n [formControl]=\"formControl\"\n [siDatepickerConfig]=\"props.dateConfig\"\n [readonly]=\"props.readonly || false\"\n [errormessageId]=\"id | siValidationErrorId\"\n />\n</si-calendar-button>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SiCalendarButtonComponent, selector: "si-calendar-button", inputs: ["ariaLabel"] }, { kind: "directive", type: SiDatepickerDirective, selector: "[siDatepicker]", inputs: ["autoClose"], exportAs: ["siDatepicker"] }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
255
153
|
}
|
|
256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyDateTimeComponent, decorators: [{
|
|
257
155
|
type: Component,
|
|
258
156
|
args: [{ selector: 'si-formly-datetime', imports: [
|
|
259
157
|
FormsModule,
|
|
@@ -261,7 +159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
261
159
|
SiCalendarButtonComponent,
|
|
262
160
|
SiDatepickerDirective,
|
|
263
161
|
SiValidationErrorIdPipe
|
|
264
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
162
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<si-calendar-button class=\"w-100\">\n <input\n type=\"text\"\n class=\"form-control\"\n siDatepicker\n [id]=\"id\"\n [autoClose]=\"props.autoClose\"\n [placeholder]=\"props.placeholder\"\n [formControl]=\"formControl\"\n [siDatepickerConfig]=\"props.dateConfig\"\n [readonly]=\"props.readonly || false\"\n [errormessageId]=\"id | siValidationErrorId\"\n />\n</si-calendar-button>\n" }]
|
|
265
163
|
}] });
|
|
266
164
|
|
|
267
165
|
/**
|
|
@@ -269,12 +167,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
269
167
|
* SPDX-License-Identifier: MIT
|
|
270
168
|
*/
|
|
271
169
|
class SiFormlyEmailComponent extends FieldType {
|
|
272
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
273
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyEmailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
171
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyEmailComponent, isStandalone: true, selector: "si-formly-email", usesInheritance: true, ngImport: i0, template: "<input\n type=\"email\"\n class=\"form-control\"\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n/>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
274
172
|
}
|
|
275
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyEmailComponent, decorators: [{
|
|
276
174
|
type: Component,
|
|
277
|
-
args: [{ selector: 'si-formly-email', imports: [FormsModule, ReactiveFormsModule, FormlyModule, SiValidationErrorIdPipe], changeDetection: ChangeDetectionStrategy.
|
|
175
|
+
args: [{ selector: 'si-formly-email', imports: [FormsModule, ReactiveFormsModule, FormlyModule, SiValidationErrorIdPipe], changeDetection: ChangeDetectionStrategy.Eager, template: "<input\n type=\"email\"\n class=\"form-control\"\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n/>\n" }]
|
|
278
176
|
}] });
|
|
279
177
|
|
|
280
178
|
/**
|
|
@@ -282,10 +180,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
282
180
|
* SPDX-License-Identifier: MIT
|
|
283
181
|
*/
|
|
284
182
|
class SiFormlyIpInputComponent extends FieldType {
|
|
285
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
286
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyIpInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyIpInputComponent, isStandalone: true, selector: "si-formly-ip-address", usesInheritance: true, ngImport: i0, template: "@if (field.type === 'ipv6') {\n <input\n type=\"text\"\n class=\"form-control\"\n siIpV6\n [cidr]=\"props.cidr\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [id]=\"id\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n />\n} @else {\n <input\n type=\"text\"\n class=\"form-control\"\n siIpV4\n [cidr]=\"props.cidr\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [id]=\"id\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n />\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "directive", type: SiIp4InputDirective, selector: "input[siIpV4]", exportAs: ["siIpV4"] }, { kind: "directive", type: SiIp6InputDirective, selector: "input[siIpV6]", exportAs: ["siIpV6"] }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
287
185
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyIpInputComponent, decorators: [{
|
|
289
187
|
type: Component,
|
|
290
188
|
args: [{ selector: 'si-formly-ip-address', imports: [
|
|
291
189
|
ReactiveFormsModule,
|
|
@@ -293,7 +191,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
293
191
|
SiIp4InputDirective,
|
|
294
192
|
SiIp6InputDirective,
|
|
295
193
|
SiValidationErrorIdPipe
|
|
296
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
194
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "@if (field.type === 'ipv6') {\n <input\n type=\"text\"\n class=\"form-control\"\n siIpV6\n [cidr]=\"props.cidr\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [id]=\"id\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n />\n} @else {\n <input\n type=\"text\"\n class=\"form-control\"\n siIpV4\n [cidr]=\"props.cidr\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [id]=\"id\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n />\n}\n" }]
|
|
297
195
|
}] });
|
|
298
196
|
|
|
299
197
|
/**
|
|
@@ -301,12 +199,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
301
199
|
* SPDX-License-Identifier: MIT
|
|
302
200
|
*/
|
|
303
201
|
class SiFormlyNumberComponent extends FieldType {
|
|
304
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
305
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
202
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
203
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyNumberComponent, isStandalone: true, selector: "si-formly-number", usesInheritance: true, ngImport: i0, template: "<si-number-input\n class=\"form-control\"\n [inputId]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [min]=\"props.min\"\n [max]=\"props.max\"\n [placeholder]=\"props.placeholder\"\n [showButtons]=\"props.showButtons ?? true\"\n [step]=\"props.numberStep ?? 1\"\n [unit]=\"props.unit\"\n [errormessageId]=\"id | siValidationErrorId\"\n/>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "component", type: SiNumberInputComponent, selector: "si-number-input", inputs: ["min", "max", "step", "value", "unit", "showButtons", "aria-label", "inputId", "disabled", "readonly", "placeholder", "errormessageId"], outputs: ["valueChange"] }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }] });
|
|
306
204
|
}
|
|
307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyNumberComponent, decorators: [{
|
|
308
206
|
type: Component,
|
|
309
|
-
args: [{ selector: 'si-formly-number', imports: [ReactiveFormsModule, FormlyModule, SiNumberInputComponent, SiValidationErrorIdPipe],
|
|
207
|
+
args: [{ selector: 'si-formly-number', imports: [ReactiveFormsModule, FormlyModule, SiNumberInputComponent, SiValidationErrorIdPipe], template: "<si-number-input\n class=\"form-control\"\n [inputId]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [min]=\"props.min\"\n [max]=\"props.max\"\n [placeholder]=\"props.placeholder\"\n [showButtons]=\"props.showButtons ?? true\"\n [step]=\"props.numberStep ?? 1\"\n [unit]=\"props.unit\"\n [errormessageId]=\"id | siValidationErrorId\"\n/>\n" }]
|
|
310
208
|
}] });
|
|
311
209
|
|
|
312
210
|
/**
|
|
@@ -314,10 +212,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
314
212
|
* SPDX-License-Identifier: MIT
|
|
315
213
|
*/
|
|
316
214
|
class SiFormlyPasswordComponent extends FieldType {
|
|
317
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
318
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
216
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyPasswordComponent, isStandalone: true, selector: "si-formly-password", usesInheritance: true, ngImport: i0, template: "<si-password-strength>\n <input\n type=\"password\"\n name=\"password\"\n class=\"form-control\"\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [siPasswordStrength]=\"{\n minLength: props.minLength && props.minLength > 0 ? props.minLength : 8,\n uppercase: props.upperCase !== false,\n lowercase: props.lowerCase !== false,\n digits: props.digits !== false,\n special: props.special !== false\n }\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n />\n</si-password-strength>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "component", type: SiPasswordStrengthComponent, selector: "si-password-strength", inputs: ["showVisibilityIcon"] }, { kind: "directive", type: SiPasswordStrengthDirective, selector: "[siPasswordStrength]", inputs: ["siPasswordStrength"], outputs: ["passwordStrengthChanged"] }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }] });
|
|
319
217
|
}
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyPasswordComponent, decorators: [{
|
|
321
219
|
type: Component,
|
|
322
220
|
args: [{ selector: 'si-formly-password', imports: [
|
|
323
221
|
FormsModule,
|
|
@@ -326,7 +224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
326
224
|
SiPasswordStrengthComponent,
|
|
327
225
|
SiPasswordStrengthDirective,
|
|
328
226
|
SiValidationErrorIdPipe
|
|
329
|
-
],
|
|
227
|
+
], template: "<si-password-strength>\n <input\n type=\"password\"\n name=\"password\"\n class=\"form-control\"\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [siPasswordStrength]=\"{\n minLength: props.minLength && props.minLength > 0 ? props.minLength : 8,\n uppercase: props.upperCase !== false,\n lowercase: props.lowerCase !== false,\n digits: props.digits !== false,\n special: props.special !== false\n }\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n />\n</si-password-strength>\n" }]
|
|
330
228
|
}] });
|
|
331
229
|
|
|
332
230
|
/**
|
|
@@ -334,10 +232,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
334
232
|
* SPDX-License-Identifier: MIT
|
|
335
233
|
*/
|
|
336
234
|
class SiFormlySelectComponent extends FieldType {
|
|
337
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
338
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
235
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlySelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
236
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlySelectComponent, isStandalone: true, selector: "si-formly-select", usesInheritance: true, ngImport: i0, template: "@if (props.multi) {\n <si-select\n #select\n class=\"form-control\"\n multi\n [id]=\"id\"\n [options]=\"props.optionsList\"\n [hasFilter]=\"props.hasFilter ?? select.hasFilter()\"\n [filterPlaceholder]=\"props.filterPlaceholder ?? select.filterPlaceholder()\"\n [placeholder]=\"props.placeholder ?? select.placeholder()\"\n [ariaLabel]=\"props.ariaLabel ?? select.ariaLabel()\"\n [noResultsFoundLabel]=\"props.noResultsFoundLabel ?? select.noResultsFoundLabel()\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [readonly]=\"props.readonly || false\"\n [errormessageId]=\"id | siValidationErrorId\"\n />\n} @else {\n <si-select\n #select\n class=\"form-control\"\n [id]=\"id\"\n [options]=\"props.optionsList\"\n [hasFilter]=\"props.hasFilter ?? select.hasFilter()\"\n [filterPlaceholder]=\"props.filterPlaceholder ?? select.filterPlaceholder()\"\n [placeholder]=\"props.placeholder ?? select.placeholder()\"\n [ariaLabel]=\"props.ariaLabel ?? select.ariaLabel()\"\n [noResultsFoundLabel]=\"props.noResultsFoundLabel ?? select.noResultsFoundLabel()\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [readonly]=\"props.readonly || false\"\n [errormessageId]=\"id | siValidationErrorId\"\n />\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "component", type: SiSelectComponent, selector: "si-select", inputs: ["id", "ariaLabel", "labelledby", "filterPlaceholder", "noResultsFoundLabel", "placeholder", "readonly", "errormessageId", "hasFilter"], outputs: ["openChange"] }, { kind: "directive", type: SiSelectSimpleOptionsDirective, selector: "si-select[options]", inputs: ["options", "optionEqualCheckFn"] }, { kind: "directive", type: SiSelectMultiValueDirective, selector: "si-select[multi]" }, { kind: "directive", type: SiSelectSingleValueDirective, selector: "si-select:not([multi])" }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
339
237
|
}
|
|
340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlySelectComponent, decorators: [{
|
|
341
239
|
type: Component,
|
|
342
240
|
args: [{ selector: 'si-formly-select', imports: [
|
|
343
241
|
FormsModule,
|
|
@@ -348,7 +246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
348
246
|
SiSelectMultiValueDirective,
|
|
349
247
|
SiSelectSingleValueDirective,
|
|
350
248
|
SiValidationErrorIdPipe
|
|
351
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
249
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "@if (props.multi) {\n <si-select\n #select\n class=\"form-control\"\n multi\n [id]=\"id\"\n [options]=\"props.optionsList\"\n [hasFilter]=\"props.hasFilter ?? select.hasFilter()\"\n [filterPlaceholder]=\"props.filterPlaceholder ?? select.filterPlaceholder()\"\n [placeholder]=\"props.placeholder ?? select.placeholder()\"\n [ariaLabel]=\"props.ariaLabel ?? select.ariaLabel()\"\n [noResultsFoundLabel]=\"props.noResultsFoundLabel ?? select.noResultsFoundLabel()\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [readonly]=\"props.readonly || false\"\n [errormessageId]=\"id | siValidationErrorId\"\n />\n} @else {\n <si-select\n #select\n class=\"form-control\"\n [id]=\"id\"\n [options]=\"props.optionsList\"\n [hasFilter]=\"props.hasFilter ?? select.hasFilter()\"\n [filterPlaceholder]=\"props.filterPlaceholder ?? select.filterPlaceholder()\"\n [placeholder]=\"props.placeholder ?? select.placeholder()\"\n [ariaLabel]=\"props.ariaLabel ?? select.ariaLabel()\"\n [noResultsFoundLabel]=\"props.noResultsFoundLabel ?? select.noResultsFoundLabel()\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [readonly]=\"props.readonly || false\"\n [errormessageId]=\"id | siValidationErrorId\"\n />\n}\n" }]
|
|
352
250
|
}] });
|
|
353
251
|
|
|
354
252
|
/**
|
|
@@ -372,12 +270,12 @@ class SiFormlyTextDisplayComponent extends FieldType {
|
|
|
372
270
|
const path = getKeyPath(this.props.key);
|
|
373
271
|
return getFieldValue(sourceModel, path);
|
|
374
272
|
}
|
|
375
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
376
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyTextDisplayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
274
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyTextDisplayComponent, isStandalone: true, selector: "si-formly-text-display", usesInheritance: true, ngImport: i0, template: "<input type=\"hidden\" [id]=\"id\" [formControl]=\"formControl\" [formlyAttributes]=\"field\" />\n<div class=\"py-4\">\n @if (props.prefix) {\n {{ props.prefix | translate }}\n }\n {{ value }}\n @if (props.suffix) {\n {{ props.suffix | translate }}\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
377
275
|
}
|
|
378
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyTextDisplayComponent, decorators: [{
|
|
379
277
|
type: Component,
|
|
380
|
-
args: [{ selector: 'si-formly-text-display', imports: [FormlyModule, ReactiveFormsModule, SiTranslatePipe], changeDetection: ChangeDetectionStrategy.
|
|
278
|
+
args: [{ selector: 'si-formly-text-display', imports: [FormlyModule, ReactiveFormsModule, SiTranslatePipe], changeDetection: ChangeDetectionStrategy.Eager, template: "<input type=\"hidden\" [id]=\"id\" [formControl]=\"formControl\" [formlyAttributes]=\"field\" />\n<div class=\"py-4\">\n @if (props.prefix) {\n {{ props.prefix | translate }}\n }\n {{ value }}\n @if (props.suffix) {\n {{ props.suffix | translate }}\n }\n</div>\n" }]
|
|
381
279
|
}] });
|
|
382
280
|
|
|
383
281
|
/**
|
|
@@ -408,12 +306,12 @@ class SiFormlyTextareaComponent extends FieldType {
|
|
|
408
306
|
this.textArea().nativeElement.parentNode.dataset.replicatedValue =
|
|
409
307
|
this.textArea().nativeElement.value;
|
|
410
308
|
}
|
|
411
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
412
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
309
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
310
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: SiFormlyTextareaComponent, isStandalone: true, selector: "si-formly-textarea", viewQueries: [{ propertyName: "textArea", first: true, predicate: ["textArea"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"textarea-grow-wrap text-break\"\n [style.--content-grow]=\"contentGrowTextarea()\"\n [style.max-height]=\"maxHeightConfiguration()\"\n>\n <textarea\n #textArea\n class=\"form-control\"\n [id]=\"id\"\n [rows]=\"props.rows ?? 1\"\n [cols]=\"props.cols ?? 1\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [style.resize]=\"resizeConfiguration()\"\n [style.max-height]=\"maxHeightConfiguration()\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n >\n </textarea>\n</div>\n", styles: [".textarea-grow-wrap{display:grid}.textarea-grow-wrap:after{content:var(--content-grow);white-space:pre-wrap;visibility:hidden;margin-block:3px}.textarea-grow-wrap>textarea,.textarea-grow-wrap:after{grid-area:1/1/2/2;padding-block:6px;font:inherit}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
413
311
|
}
|
|
414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyTextareaComponent, decorators: [{
|
|
415
313
|
type: Component,
|
|
416
|
-
args: [{ selector: 'si-formly-textarea', imports: [FormsModule, ReactiveFormsModule, FormlyModule, SiValidationErrorIdPipe], changeDetection: ChangeDetectionStrategy.
|
|
314
|
+
args: [{ selector: 'si-formly-textarea', imports: [FormsModule, ReactiveFormsModule, FormlyModule, SiValidationErrorIdPipe], changeDetection: ChangeDetectionStrategy.Eager, template: "<div\n class=\"textarea-grow-wrap text-break\"\n [style.--content-grow]=\"contentGrowTextarea()\"\n [style.max-height]=\"maxHeightConfiguration()\"\n>\n <textarea\n #textArea\n class=\"form-control\"\n [id]=\"id\"\n [rows]=\"props.rows ?? 1\"\n [cols]=\"props.cols ?? 1\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [style.resize]=\"resizeConfiguration()\"\n [style.max-height]=\"maxHeightConfiguration()\"\n [attr.aria-describedby]=\"id | siValidationErrorId\"\n >\n </textarea>\n</div>\n", styles: [".textarea-grow-wrap{display:grid}.textarea-grow-wrap:after{content:var(--content-grow);white-space:pre-wrap;visibility:hidden;margin-block:3px}.textarea-grow-wrap>textarea,.textarea-grow-wrap:after{grid-area:1/1/2/2;padding-block:6px;font:inherit}\n"] }]
|
|
417
315
|
}], propDecorators: { textArea: [{ type: i0.ViewChild, args: ['textArea', { isSignal: true }] }] } });
|
|
418
316
|
|
|
419
317
|
/**
|
|
@@ -437,8 +335,8 @@ class SiFormlyTimeComponent extends FieldType {
|
|
|
437
335
|
}
|
|
438
336
|
}
|
|
439
337
|
}
|
|
440
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
441
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
338
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
339
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyTimeComponent, isStandalone: true, selector: "si-formly-time", usesInheritance: true, ngImport: i0, template: `<si-timepicker
|
|
442
340
|
[id]="id"
|
|
443
341
|
[hideLabels]="props.timeConfig?.hideLabels ?? true"
|
|
444
342
|
[showMinutes]="props.timeConfig?.showMinutes ?? true"
|
|
@@ -448,9 +346,9 @@ class SiFormlyTimeComponent extends FieldType {
|
|
|
448
346
|
[formControl]="formControl"
|
|
449
347
|
[readonly]="props.readonly || false"
|
|
450
348
|
[errormessageId]="id | siValidationErrorId"
|
|
451
|
-
/>`, isInline: true, dependencies: [{ kind: "component", type: SiTimepickerComponent, selector: "si-timepicker", inputs: ["id", "disabled", "hoursLabel", "minutesLabel", "secondsLabel", "millisecondsLabel", "hideLabels", "hoursAriaLabel", "minutesAriaLabel", "secondsAriaLabel", "millisecondsAriaLabel", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "millisecondsPlaceholder", "meridians", "meridiansLabel", "meridiansAriaLabel", "showMinutes", "showSeconds", "showMilliseconds", "showMeridian", "min", "max", "readonly", "errormessageId"], outputs: ["isValid", "meridianChange", "inputCompleted"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$
|
|
349
|
+
/>`, isInline: true, dependencies: [{ kind: "component", type: SiTimepickerComponent, selector: "si-timepicker", inputs: ["id", "disabled", "hoursLabel", "minutesLabel", "secondsLabel", "millisecondsLabel", "hideLabels", "hoursAriaLabel", "minutesAriaLabel", "secondsAriaLabel", "millisecondsAriaLabel", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "millisecondsPlaceholder", "meridians", "meridiansLabel", "meridiansAriaLabel", "showMinutes", "showSeconds", "showMilliseconds", "showMeridian", "min", "max", "readonly", "errormessageId"], outputs: ["isValid", "meridianChange", "inputCompleted"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
452
350
|
}
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyTimeComponent, decorators: [{
|
|
454
352
|
type: Component,
|
|
455
353
|
args: [{
|
|
456
354
|
selector: 'si-formly-time',
|
|
@@ -466,7 +364,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
466
364
|
[readonly]="props.readonly || false"
|
|
467
365
|
[errormessageId]="id | siValidationErrorId"
|
|
468
366
|
/>`,
|
|
469
|
-
changeDetection: ChangeDetectionStrategy.
|
|
367
|
+
changeDetection: ChangeDetectionStrategy.Eager
|
|
470
368
|
}]
|
|
471
369
|
}] });
|
|
472
370
|
|
|
@@ -536,12 +434,12 @@ class SiFormlyAccordionComponent extends FieldType {
|
|
|
536
434
|
}
|
|
537
435
|
}
|
|
538
436
|
}
|
|
539
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
540
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyAccordionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyAccordionComponent, isStandalone: true, selector: "si-formly-accordion", usesInheritance: true, ngImport: i0, template: "<si-accordion\n #accordion\n [expandFirstPanel]=\"props.expandFirstPanel ?? accordion.expandFirstPanel()\"\n [fullHeight]=\"props.fullHeight ?? accordion.fullHeight()\"\n [hcollapsed]=\"props.hcollapsed ?? accordion.collapsed()\"\n>\n @for (f of field.fieldGroup; track $index) {\n <si-collapsible-panel\n #panel\n [heading]=\"f.props?.label\"\n [contentCssClasses]=\"f.props?.cssClasses ?? 'p-5'\"\n [headerCssClasses]=\"f.props?.headerCssClasses ?? panel.headerCssClasses()\"\n [contentBgClasses]=\"f.props?.contentBgClasses ?? panel.contentBgClasses()\"\n [badge]=\"f.props?.badge ?? panel.badge()\"\n [badgeColor]=\"f.props?.badgeColor ?? panel.badgeColor()\"\n [icon]=\"f.props?.icon ?? panel.icon()\"\n [opened]=\"f.props?.opened ?? panel.opened()\"\n [disabled]=\"f.props?.disabled ?? panel.disabled()\"\n [colorVariant]=\"f.props?.colorVariant ?? panel.colorVariant()\"\n (panelToggle)=\"panelToggle($event, f)\"\n >\n <formly-field [field]=\"f\" [formlyAttributes]=\"field\" />\n </si-collapsible-panel>\n }\n</si-accordion>\n", dependencies: [{ kind: "component", type: SiCollapsiblePanelComponent, selector: "si-collapsible-panel", inputs: ["heading", "headerCssClasses", "contentBgClasses", "contentCssClasses", "opened", "icon", "disabled", "colorVariant", "badge", "badgeColor"], outputs: ["openedChange", "panelToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyField, selector: "formly-field" }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "component", type: SiAccordionComponent, selector: "si-accordion", inputs: ["expandFirstPanel", "fullHeight", "hcollapsed"] }] });
|
|
541
439
|
}
|
|
542
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyAccordionComponent, decorators: [{
|
|
543
441
|
type: Component,
|
|
544
|
-
args: [{ selector: 'si-formly-accordion', imports: [SiCollapsiblePanelComponent, FormlyModule, SiAccordionComponent],
|
|
442
|
+
args: [{ selector: 'si-formly-accordion', imports: [SiCollapsiblePanelComponent, FormlyModule, SiAccordionComponent], template: "<si-accordion\n #accordion\n [expandFirstPanel]=\"props.expandFirstPanel ?? accordion.expandFirstPanel()\"\n [fullHeight]=\"props.fullHeight ?? accordion.fullHeight()\"\n [hcollapsed]=\"props.hcollapsed ?? accordion.collapsed()\"\n>\n @for (f of field.fieldGroup; track $index) {\n <si-collapsible-panel\n #panel\n [heading]=\"f.props?.label\"\n [contentCssClasses]=\"f.props?.cssClasses ?? 'p-5'\"\n [headerCssClasses]=\"f.props?.headerCssClasses ?? panel.headerCssClasses()\"\n [contentBgClasses]=\"f.props?.contentBgClasses ?? panel.contentBgClasses()\"\n [badge]=\"f.props?.badge ?? panel.badge()\"\n [badgeColor]=\"f.props?.badgeColor ?? panel.badgeColor()\"\n [icon]=\"f.props?.icon ?? panel.icon()\"\n [opened]=\"f.props?.opened ?? panel.opened()\"\n [disabled]=\"f.props?.disabled ?? panel.disabled()\"\n [colorVariant]=\"f.props?.colorVariant ?? panel.colorVariant()\"\n (panelToggle)=\"panelToggle($event, f)\"\n >\n <formly-field [field]=\"f\" [formlyAttributes]=\"field\" />\n </si-collapsible-panel>\n }\n</si-accordion>\n" }]
|
|
545
443
|
}] });
|
|
546
444
|
|
|
547
445
|
/**
|
|
@@ -549,12 +447,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
549
447
|
* SPDX-License-Identifier: MIT
|
|
550
448
|
*/
|
|
551
449
|
class SiFormlyArrayComponent extends FieldArrayType {
|
|
552
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
553
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
450
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyArrayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
451
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyArrayComponent, isStandalone: true, selector: "si-formly-array", usesInheritance: true, ngImport: i0, template: "<div class=\"mb-3\">\n @if (props.label) {\n <b>{{ props.label }}</b>\n }\n @if (props.description) {\n <p>{{ props.description }}</p>\n }\n @if (showError && formControl.errors) {\n <div class=\"alert alert-danger\" role=\"alert\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n @for (field of field.fieldGroup; track $index) {\n <div class=\"row\">\n <formly-field class=\"col-10\" [field]=\"field\" />\n @if (!props.readonly && !props.disabled && !props.noRemove) {\n <div class=\"col-1 text-end\">\n @if (props.removeText) {\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"remove($index)\">\n {{ props.removeText | translate }}\n </button>\n } @else {\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"remove($index)\"> - </button>\n }\n </div>\n }\n </div>\n }\n @if (!props.readonly && !props.disabled && !props.noAdd) {\n <div class=\"d-flex flex-row-reverse\">\n @if (props.addText) {\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"add()\">\n {{ props.addText | translate }}\n </button>\n } @else {\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"add()\"> + </button>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyField, selector: "formly-field" }, { kind: "component", type: i1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
554
452
|
}
|
|
555
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
453
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyArrayComponent, decorators: [{
|
|
556
454
|
type: Component,
|
|
557
|
-
args: [{ selector: 'si-formly-array', imports: [FormlyModule, SiTranslatePipe],
|
|
455
|
+
args: [{ selector: 'si-formly-array', imports: [FormlyModule, SiTranslatePipe], template: "<div class=\"mb-3\">\n @if (props.label) {\n <b>{{ props.label }}</b>\n }\n @if (props.description) {\n <p>{{ props.description }}</p>\n }\n @if (showError && formControl.errors) {\n <div class=\"alert alert-danger\" role=\"alert\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n @for (field of field.fieldGroup; track $index) {\n <div class=\"row\">\n <formly-field class=\"col-10\" [field]=\"field\" />\n @if (!props.readonly && !props.disabled && !props.noRemove) {\n <div class=\"col-1 text-end\">\n @if (props.removeText) {\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"remove($index)\">\n {{ props.removeText | translate }}\n </button>\n } @else {\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"remove($index)\"> - </button>\n }\n </div>\n }\n </div>\n }\n @if (!props.readonly && !props.disabled && !props.noAdd) {\n <div class=\"d-flex flex-row-reverse\">\n @if (props.addText) {\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"add()\">\n {{ props.addText | translate }}\n </button>\n } @else {\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"add()\"> + </button>\n }\n </div>\n }\n</div>\n" }]
|
|
558
456
|
}] });
|
|
559
457
|
|
|
560
458
|
/**
|
|
@@ -610,12 +508,12 @@ class SiFormlyObjectGridComponent extends FieldType {
|
|
|
610
508
|
this.rows.push({ classes: rowClasses, columns });
|
|
611
509
|
});
|
|
612
510
|
}
|
|
613
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
614
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
511
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
512
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyObjectGridComponent, isStandalone: true, selector: "si-formly-object-grid", usesInheritance: true, ngImport: i0, template: "@if (props.hidden !== true) {\n <div>\n @if (props.label && props.plain !== true) {\n <b>{{ props.label }}</b>\n }\n @if (props.description && props.plain !== true) {\n <p>{{ props.description }}</p>\n }\n @if (displayErrorMessages) {\n <div class=\"alert alert-danger\" role=\"alert\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n <div [class]=\"containerClass\">\n @for (row of rows; track $index) {\n <div [class]=\"row.classes\">\n @for (column of row.columns; track $index) {\n <div [class]=\"column.classes\">\n <si-form-container>\n <div si-form-container-content>\n @for (f of column.fields; track $index) {\n <formly-field class=\"d-block\" [field]=\"f\" />\n }\n </div>\n </si-form-container>\n </div>\n }\n </div>\n }\n </div>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyField, selector: "formly-field" }, { kind: "component", type: i1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }, { kind: "component", type: SiFormContainerComponent, selector: "si-form-container", inputs: ["form", "readonly", "contentContainerBreakpoints", "disableContainerBreakpoints", "errorCodeTranslateKeyMap", "controlNameTranslateKeyMap", "disableErrorPrinting", "labelWidth"] }] });
|
|
615
513
|
}
|
|
616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectGridComponent, decorators: [{
|
|
617
515
|
type: Component,
|
|
618
|
-
args: [{ selector: 'si-formly-object-grid', imports: [FormlyModule, SiFormContainerComponent],
|
|
516
|
+
args: [{ selector: 'si-formly-object-grid', imports: [FormlyModule, SiFormContainerComponent], template: "@if (props.hidden !== true) {\n <div>\n @if (props.label && props.plain !== true) {\n <b>{{ props.label }}</b>\n }\n @if (props.description && props.plain !== true) {\n <p>{{ props.description }}</p>\n }\n @if (displayErrorMessages) {\n <div class=\"alert alert-danger\" role=\"alert\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n <div [class]=\"containerClass\">\n @for (row of rows; track $index) {\n <div [class]=\"row.classes\">\n @for (column of row.columns; track $index) {\n <div [class]=\"column.classes\">\n <si-form-container>\n <div si-form-container-content>\n @for (f of column.fields; track $index) {\n <formly-field class=\"d-block\" [field]=\"f\" />\n }\n </div>\n </si-form-container>\n </div>\n }\n </div>\n }\n </div>\n </div>\n}\n" }]
|
|
619
517
|
}] });
|
|
620
518
|
|
|
621
519
|
/**
|
|
@@ -623,12 +521,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
623
521
|
* SPDX-License-Identifier: MIT
|
|
624
522
|
*/
|
|
625
523
|
class SiFormlyObjectPlainComponent extends FieldType {
|
|
626
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
627
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
524
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectPlainComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyObjectPlainComponent, isStandalone: true, selector: "si-formly-object-plain", usesInheritance: true, ngImport: i0, template: "<div>\n @if (props.description) {\n <p>{{ props.description }}</p>\n }\n @for (f of field.fieldGroup; track $index) {\n <formly-field [field]=\"f\" />\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyField, selector: "formly-field" }] });
|
|
628
526
|
}
|
|
629
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectPlainComponent, decorators: [{
|
|
630
528
|
type: Component,
|
|
631
|
-
args: [{ selector: 'si-formly-object-plain', imports: [FormlyModule],
|
|
529
|
+
args: [{ selector: 'si-formly-object-plain', imports: [FormlyModule], template: "<div>\n @if (props.description) {\n <p>{{ props.description }}</p>\n }\n @for (f of field.fieldGroup; track $index) {\n <formly-field [field]=\"f\" />\n }\n</div>\n" }]
|
|
632
530
|
}] });
|
|
633
531
|
|
|
634
532
|
/**
|
|
@@ -636,12 +534,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
636
534
|
* SPDX-License-Identifier: MIT
|
|
637
535
|
*/
|
|
638
536
|
class SiFormlyObjectComponent extends FieldType {
|
|
639
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
640
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
537
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
538
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyObjectComponent, isStandalone: true, selector: "si-formly-object", usesInheritance: true, ngImport: i0, template: "@if (props.hidden !== true) {\n <div class=\"mb-3\">\n @if (props.label) {\n <b>{{ props.label }}</b>\n }\n @if (props.description) {\n <p>{{ props.description }}</p>\n }\n @if (showError && formControl.errors) {\n <div class=\"alert alert-danger\" role=\"alert\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n @for (f of field.fieldGroup; track $index) {\n <formly-field [field]=\"f\" />\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyField, selector: "formly-field" }, { kind: "component", type: i1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }] });
|
|
641
539
|
}
|
|
642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectComponent, decorators: [{
|
|
643
541
|
type: Component,
|
|
644
|
-
args: [{ selector: 'si-formly-object', imports: [FormlyModule],
|
|
542
|
+
args: [{ selector: 'si-formly-object', imports: [FormlyModule], template: "@if (props.hidden !== true) {\n <div class=\"mb-3\">\n @if (props.label) {\n <b>{{ props.label }}</b>\n }\n @if (props.description) {\n <p>{{ props.description }}</p>\n }\n @if (showError && formControl.errors) {\n <div class=\"alert alert-danger\" role=\"alert\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n @for (f of field.fieldGroup; track $index) {\n <formly-field [field]=\"f\" />\n }\n </div>\n}\n" }]
|
|
645
543
|
}] });
|
|
646
544
|
|
|
647
545
|
/**
|
|
@@ -654,12 +552,12 @@ class SiFormlyObjectTabsetComponent extends FieldType {
|
|
|
654
552
|
this.options.formState.selectedTabIndex = selectedTab;
|
|
655
553
|
}
|
|
656
554
|
}
|
|
657
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
658
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectTabsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
556
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyObjectTabsetComponent, isStandalone: true, selector: "si-formly-object-tabset", usesInheritance: true, ngImport: i0, template: "<si-tabset class=\"d-flex si-layout-fixed-height\">\n @for (f of field.fieldGroup; track $index) {\n @let isTabActive = options.formState.selectedTabIndex === $index;\n @if (!(f.props?.hidden === true)) {\n <si-tab\n [heading]=\"f.props?.label || ''\"\n [active]=\"isTabActive\"\n (activeChange)=\"tabIndexChange($event, $index)\"\n >\n <div class=\"pt-8\">\n <formly-field [field]=\"f\" [formlyAttributes]=\"field\" />\n </div>\n </si-tab>\n }\n }\n</si-tabset>\n", dependencies: [{ kind: "component", type: SiTabsetComponent, selector: "si-tabset", inputs: ["contentOverflowAuto"] }, { kind: "component", type: SiTabComponent, selector: "si-tab", inputs: ["active", "canActivate", "canDeactivate"], outputs: ["activeChange"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyField, selector: "formly-field" }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }] });
|
|
659
557
|
}
|
|
660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyObjectTabsetComponent, decorators: [{
|
|
661
559
|
type: Component,
|
|
662
|
-
args: [{ selector: 'si-formly-object-tabset', imports: [SiTabsetComponent, SiTabComponent, FormlyModule],
|
|
560
|
+
args: [{ selector: 'si-formly-object-tabset', imports: [SiTabsetComponent, SiTabComponent, FormlyModule], template: "<si-tabset class=\"d-flex si-layout-fixed-height\">\n @for (f of field.fieldGroup; track $index) {\n @let isTabActive = options.formState.selectedTabIndex === $index;\n @if (!(f.props?.hidden === true)) {\n <si-tab\n [heading]=\"f.props?.label || ''\"\n [active]=\"isTabActive\"\n (activeChange)=\"tabIndexChange($event, $index)\"\n >\n <div class=\"pt-8\">\n <formly-field [field]=\"f\" [formlyAttributes]=\"field\" />\n </div>\n </si-tab>\n }\n }\n</si-tabset>\n" }]
|
|
663
561
|
}] });
|
|
664
562
|
|
|
665
563
|
/**
|
|
@@ -673,12 +571,12 @@ class SiFormlyFieldsetComponent extends FieldWrapper {
|
|
|
673
571
|
get labelWidth() {
|
|
674
572
|
return this.props.labelWidth ? this.props.labelWidth + 'px' : undefined;
|
|
675
573
|
}
|
|
676
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
677
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
575
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyFieldsetComponent, isStandalone: true, selector: "si-formly-fieldset", usesInheritance: true, ngImport: i0, template: "<si-form-fieldset [label]=\"label!\" [labelWidth]=\"labelWidth\" [required]=\"props.required\">\n <ng-template #fieldComponent />\n <div class=\"invalid-feedback\" [class.d-block]=\"showError\">\n <formly-validation-message [field]=\"field\" />\n </div>\n</si-form-fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }, { kind: "component", type: SiFormFieldsetComponent, selector: "si-form-fieldset", inputs: ["label", "labelWidth", "required", "inline"] }] });
|
|
678
576
|
}
|
|
679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyFieldsetComponent, decorators: [{
|
|
680
578
|
type: Component,
|
|
681
|
-
args: [{ selector: 'si-formly-fieldset', imports: [FormlyModule, SiFormFieldsetComponent],
|
|
579
|
+
args: [{ selector: 'si-formly-fieldset', imports: [FormlyModule, SiFormFieldsetComponent], template: "<si-form-fieldset [label]=\"label!\" [labelWidth]=\"labelWidth\" [required]=\"props.required\">\n <ng-template #fieldComponent />\n <div class=\"invalid-feedback\" [class.d-block]=\"showError\">\n <formly-validation-message [field]=\"field\" />\n </div>\n</si-form-fieldset>\n" }]
|
|
682
580
|
}] });
|
|
683
581
|
|
|
684
582
|
/**
|
|
@@ -686,12 +584,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
686
584
|
* SPDX-License-Identifier: MIT
|
|
687
585
|
*/
|
|
688
586
|
class SiFormlyHorizontalWrapperComponent extends FieldWrapper {
|
|
689
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
690
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
587
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyHorizontalWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
588
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyHorizontalWrapperComponent, isStandalone: true, selector: "si-formly-horizontal-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"mb-6 row\">\n @if (props.label) {\n <label class=\"col-sm-2 col-form-label\" [attr.for]=\"id\">\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n *\n }\n </label>\n }\n <div class=\"col-sm-10\">\n <ng-template #fieldComponent />\n </div>\n\n @if (showError) {\n <div class=\"col-sm-3 invalid-feedback d-block\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }] });
|
|
691
589
|
}
|
|
692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyHorizontalWrapperComponent, decorators: [{
|
|
693
591
|
type: Component,
|
|
694
|
-
args: [{ selector: 'si-formly-horizontal-wrapper', imports: [FormlyModule],
|
|
592
|
+
args: [{ selector: 'si-formly-horizontal-wrapper', imports: [FormlyModule], template: "<div class=\"mb-6 row\">\n @if (props.label) {\n <label class=\"col-sm-2 col-form-label\" [attr.for]=\"id\">\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n *\n }\n </label>\n }\n <div class=\"col-sm-10\">\n <ng-template #fieldComponent />\n </div>\n\n @if (showError) {\n <div class=\"col-sm-3 invalid-feedback d-block\">\n <formly-validation-message [field]=\"field\" />\n </div>\n }\n</div>\n" }]
|
|
695
593
|
}] });
|
|
696
594
|
|
|
697
595
|
/**
|
|
@@ -699,12 +597,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
699
597
|
* SPDX-License-Identifier: MIT
|
|
700
598
|
*/
|
|
701
599
|
class SiFormlyIconWrapperComponent extends FieldWrapper {
|
|
702
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
703
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
600
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyIconWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
601
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyIconWrapperComponent, isStandalone: true, selector: "si-formly-icon-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex\">\n <div class=\"flex-1 me-2\">\n <ng-template #fieldComponent />\n </div>\n @if (props.icon) {\n <div\n class=\"wrapper-icon icon\"\n [style.font-size.px]=\"props.iconSize\"\n [siTooltip]=\"props.iconTooltip | translate\"\n >\n <si-icon [icon]=\"props.icon\" />\n </div>\n }\n</div>\n", styles: [".flex-1{flex:1}.wrapper-icon{display:flex;align-items:center}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: SiTooltipDirective, selector: "[siTooltip]", inputs: ["siTooltip", "placement", "isDisabled", "tooltipScrollStrategy", "tooltipContext"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
704
602
|
}
|
|
705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyIconWrapperComponent, decorators: [{
|
|
706
604
|
type: Component,
|
|
707
|
-
args: [{ selector: 'si-formly-icon-wrapper', imports: [SiIconComponent, SiTooltipDirective, SiTranslatePipe],
|
|
605
|
+
args: [{ selector: 'si-formly-icon-wrapper', imports: [SiIconComponent, SiTooltipDirective, SiTranslatePipe], template: "<div class=\"d-flex\">\n <div class=\"flex-1 me-2\">\n <ng-template #fieldComponent />\n </div>\n @if (props.icon) {\n <div\n class=\"wrapper-icon icon\"\n [style.font-size.px]=\"props.iconSize\"\n [siTooltip]=\"props.iconTooltip | translate\"\n >\n <si-icon [icon]=\"props.icon\" />\n </div>\n }\n</div>\n", styles: [".flex-1{flex:1}.wrapper-icon{display:flex;align-items:center}\n"] }]
|
|
708
606
|
}] });
|
|
709
607
|
|
|
710
608
|
/**
|
|
@@ -712,9 +610,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
712
610
|
* SPDX-License-Identifier: MIT
|
|
713
611
|
*/
|
|
714
612
|
class SiFormlyFormFieldProviderDirective {
|
|
715
|
-
field = input.required(
|
|
716
|
-
|
|
717
|
-
|
|
613
|
+
field = input.required(/* @ts-ignore */
|
|
614
|
+
...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
615
|
+
id = computed(() => this.field().id, /* @ts-ignore */
|
|
616
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
617
|
+
errormessageId = computed(() => `${this.field().id}-errormessage`, /* @ts-ignore */
|
|
618
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
718
619
|
isFormCheck;
|
|
719
620
|
labelledby = computed(() => {
|
|
720
621
|
const fieldValue = this.field();
|
|
@@ -724,14 +625,15 @@ class SiFormlyFormFieldProviderDirective {
|
|
|
724
625
|
else {
|
|
725
626
|
return undefined;
|
|
726
627
|
}
|
|
727
|
-
},
|
|
628
|
+
}, /* @ts-ignore */
|
|
629
|
+
...(ngDevMode ? [{ debugName: "labelledby" }] : /* istanbul ignore next */ []));
|
|
728
630
|
ngOnChanges() {
|
|
729
631
|
this.isFormCheck = this.field().type === 'checkbox' || this.field().type === 'boolean';
|
|
730
632
|
}
|
|
731
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
732
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
633
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyFormFieldProviderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
634
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: SiFormlyFormFieldProviderDirective, isStandalone: true, selector: "[siFormlyFormFieldProvider]", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiFormlyFormFieldProviderDirective }], usesOnChanges: true, ngImport: i0 });
|
|
733
635
|
}
|
|
734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyFormFieldProviderDirective, decorators: [{
|
|
735
637
|
type: Directive,
|
|
736
638
|
args: [{
|
|
737
639
|
selector: '[siFormlyFormFieldProvider]',
|
|
@@ -750,17 +652,17 @@ class SiFormlyWrapperComponent extends FieldWrapper {
|
|
|
750
652
|
get labelWidth() {
|
|
751
653
|
return this.props.labelWidth;
|
|
752
654
|
}
|
|
753
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
754
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
656
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiFormlyWrapperComponent, isStandalone: true, selector: "si-formly-wrapper", usesInheritance: true, ngImport: i0, template: "<si-form-item\n [class.ms-n8]=\"field.type === 'checkbox'\"\n [label]=\"label\"\n [labelWidth]=\"labelWidth\"\n [required]=\"props.required\"\n>\n <div class=\"w-100\" siFormlyFormFieldProvider [field]=\"field\">\n <ng-template #fieldComponent />\n <div class=\"invalid-feedback\" [class.d-block]=\"showError\">\n <!-- This string is hard-coded in the bootstrap fields. -->\n <!-- See https://github.com/ngx-formly/ngx-formly/blob/main/src/ui/bootstrap/input/src/input.type.ts -->\n <!-- We should get rid of the bootstrap package, to make it rely on our si-form-item code. -->\n <formly-validation-message [field]=\"field\" [id]=\"id | siValidationErrorId\" />\n </div>\n </div>\n</si-form-item>\n", dependencies: [{ kind: "component", type: SiFormItemComponent, selector: "si-form-item", inputs: ["label", "labelWidth", "disableErrorPrinting", "formErrorMapper", "required"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }, { kind: "directive", type: SiFormlyFormFieldProviderDirective, selector: "[siFormlyFormFieldProvider]", inputs: ["field"] }, { kind: "pipe", type: SiValidationErrorIdPipe, name: "siValidationErrorId" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
755
657
|
}
|
|
756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyWrapperComponent, decorators: [{
|
|
757
659
|
type: Component,
|
|
758
660
|
args: [{ selector: 'si-formly-wrapper', imports: [
|
|
759
661
|
SiFormItemComponent,
|
|
760
662
|
FormlyModule,
|
|
761
663
|
SiFormlyFormFieldProviderDirective,
|
|
762
664
|
SiValidationErrorIdPipe
|
|
763
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
665
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<si-form-item\n [class.ms-n8]=\"field.type === 'checkbox'\"\n [label]=\"label\"\n [labelWidth]=\"labelWidth\"\n [required]=\"props.required\"\n>\n <div class=\"w-100\" siFormlyFormFieldProvider [field]=\"field\">\n <ng-template #fieldComponent />\n <div class=\"invalid-feedback\" [class.d-block]=\"showError\">\n <!-- This string is hard-coded in the bootstrap fields. -->\n <!-- See https://github.com/ngx-formly/ngx-formly/blob/main/src/ui/bootstrap/input/src/input.type.ts -->\n <!-- We should get rid of the bootstrap package, to make it rely on our si-form-item code. -->\n <formly-validation-message [field]=\"field\" [id]=\"id | siValidationErrorId\" />\n </div>\n </div>\n</si-form-item>\n" }]
|
|
764
666
|
}] });
|
|
765
667
|
|
|
766
668
|
/**
|
|
@@ -836,117 +738,120 @@ const dynamicUiConfig = () => {
|
|
|
836
738
|
]
|
|
837
739
|
};
|
|
838
740
|
};
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
744
|
+
* SPDX-License-Identifier: MIT
|
|
745
|
+
*/
|
|
746
|
+
class SiFormlyComponent {
|
|
747
|
+
/**
|
|
748
|
+
* Formly main container to provide modelChange subscriptions.
|
|
749
|
+
*/
|
|
750
|
+
formlyForm = viewChild(FormlyForm, /* @ts-ignore */
|
|
751
|
+
...(ngDevMode ? [{ debugName: "formlyForm" }] : /* istanbul ignore next */ []));
|
|
752
|
+
form = model(/* @ts-ignore */
|
|
753
|
+
...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
|
|
754
|
+
/**
|
|
755
|
+
* Mapping of field name and its value.
|
|
756
|
+
*
|
|
757
|
+
* @defaultValue
|
|
758
|
+
* ```
|
|
759
|
+
* {}
|
|
760
|
+
* ```
|
|
761
|
+
*/
|
|
762
|
+
model = model({}, /* @ts-ignore */
|
|
763
|
+
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
764
|
+
/**
|
|
765
|
+
* Define FormlyFormOptions.
|
|
766
|
+
*
|
|
767
|
+
* @defaultValue
|
|
768
|
+
* ```
|
|
769
|
+
* {}
|
|
770
|
+
* ```
|
|
771
|
+
*/
|
|
772
|
+
options = input({}, /* @ts-ignore */
|
|
773
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
774
|
+
/**
|
|
775
|
+
* JSONSchema7 can be used instead of FormlyFieldConfig array for defining form fields.
|
|
776
|
+
* */
|
|
777
|
+
schema = model(/* @ts-ignore */
|
|
778
|
+
...(ngDevMode ? [undefined, { debugName: "schema" }] : /* istanbul ignore next */ []));
|
|
779
|
+
/**
|
|
780
|
+
* Define all form fields with FormlyFieldConfig array.
|
|
781
|
+
*
|
|
782
|
+
* @defaultValue []
|
|
783
|
+
*/
|
|
784
|
+
// eslint-disable-next-line @angular-eslint/prefer-signal-model
|
|
785
|
+
fields = input([], /* @ts-ignore */
|
|
786
|
+
...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
|
|
787
|
+
fieldsChange = output();
|
|
788
|
+
/** Define width for field labels in pixel */
|
|
789
|
+
labelWidth = input(/* @ts-ignore */
|
|
790
|
+
...(ngDevMode ? [undefined, { debugName: "labelWidth" }] : /* istanbul ignore next */ []));
|
|
791
|
+
fieldConfig = computed(() => {
|
|
792
|
+
let formlyFieldConfig;
|
|
793
|
+
const schema = this.schema();
|
|
794
|
+
const labelWidth = this.labelWidth();
|
|
795
|
+
const opts = {
|
|
796
|
+
map: (field, s) => {
|
|
797
|
+
if (labelWidth) {
|
|
798
|
+
field.props ??= {};
|
|
799
|
+
field.props.labelWidth = labelWidth;
|
|
800
|
+
}
|
|
801
|
+
return field;
|
|
802
|
+
}
|
|
850
803
|
};
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
804
|
+
if (schema) {
|
|
805
|
+
formlyFieldConfig = [this.formlyJsonschema.toFieldConfig(schema, opts)];
|
|
806
|
+
}
|
|
807
|
+
else {
|
|
808
|
+
formlyFieldConfig = this.fields();
|
|
809
|
+
}
|
|
810
|
+
if (formlyFieldConfig && formlyFieldConfig.length > 0) {
|
|
811
|
+
this.applyLabelWidth(formlyFieldConfig);
|
|
812
|
+
}
|
|
813
|
+
this.fieldsChange.emit(formlyFieldConfig);
|
|
814
|
+
return formlyFieldConfig;
|
|
815
|
+
}, /* @ts-ignore */
|
|
816
|
+
...(ngDevMode ? [{ debugName: "fieldConfig" }] : /* istanbul ignore next */ []));
|
|
817
|
+
ownForm = false;
|
|
818
|
+
formlyJsonschema = inject(FormlyJsonschema);
|
|
819
|
+
ngOnInit() {
|
|
820
|
+
if (!this.form()) {
|
|
821
|
+
this.ownForm = true;
|
|
822
|
+
this.form.set(new FormGroup({}));
|
|
855
823
|
}
|
|
856
|
-
this.configs.forEach(configuration => {
|
|
857
|
-
this.config.addConfig(configuration);
|
|
858
|
-
});
|
|
859
824
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
SiFormModule], exports: [SiFormlyComponent] });
|
|
883
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiFormlyModule, providers: [
|
|
884
|
-
{
|
|
885
|
-
provide: FORMLY_CONFIG,
|
|
886
|
-
multi: true,
|
|
887
|
-
useFactory: dynamicUiConfig
|
|
888
|
-
}
|
|
889
|
-
], imports: [CommonModule,
|
|
890
|
-
FormlyBootstrapModule,
|
|
891
|
-
FormlyModule,
|
|
892
|
-
ReactiveFormsModule,
|
|
893
|
-
SiFormlyIpInputComponent,
|
|
894
|
-
SiFormlyAccordionComponent,
|
|
895
|
-
SiFormlyArrayComponent,
|
|
896
|
-
SiFormlyButtonComponent,
|
|
897
|
-
SiFormlyDateTimeComponent,
|
|
898
|
-
SiFormlyEmailComponent,
|
|
899
|
-
SiFormlyHorizontalWrapperComponent,
|
|
900
|
-
SiFormlyIconWrapperComponent,
|
|
901
|
-
SiFormlyObjectComponent,
|
|
902
|
-
SiFormlyObjectGridComponent,
|
|
903
|
-
SiFormlyObjectPlainComponent,
|
|
904
|
-
SiFormlyObjectTabsetComponent,
|
|
905
|
-
SiFormlyPasswordComponent,
|
|
906
|
-
SiFormlySelectComponent,
|
|
907
|
-
SiFormlyTextareaComponent,
|
|
908
|
-
SiFormlyTextDisplayComponent,
|
|
909
|
-
SiFormlyWrapperComponent,
|
|
910
|
-
SiFormModule] });
|
|
825
|
+
applyLabelWidth(formlyFieldConfig) {
|
|
826
|
+
const apply = (cfg) => {
|
|
827
|
+
cfg.forEach(field => {
|
|
828
|
+
field.props ??= {};
|
|
829
|
+
field.props.labelWidth = this.labelWidth();
|
|
830
|
+
if (Array.isArray(field.fieldGroup)) {
|
|
831
|
+
apply(field.fieldGroup);
|
|
832
|
+
}
|
|
833
|
+
if (typeof field.fieldArray !== 'function') {
|
|
834
|
+
if (Array.isArray(field.fieldArray?.fieldGroup)) {
|
|
835
|
+
apply(field.fieldArray.fieldGroup);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
};
|
|
840
|
+
apply(formlyFieldConfig);
|
|
841
|
+
}
|
|
842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiFormlyComponent, isStandalone: true, selector: "si-formly", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { form: "formChange", model: "modelChange", schema: "schemaChange", fieldsChange: "fieldsChange" }, providers: [
|
|
844
|
+
provideFormlyConfig(withFormlyBootstrap()),
|
|
845
|
+
{ provide: FORMLY_CONFIG, multi: true, useFactory: dynamicUiConfig }
|
|
846
|
+
], viewQueries: [{ propertyName: "formlyForm", first: true, predicate: FormlyForm, descendants: true, isSignal: true }], ngImport: i0, template: "@let formlyForm = form();\n@let formlyFieldConfig = fieldConfig();\n@let formlyFormOptions = options();\n@if (formlyForm && formlyFieldConfig) {\n @if (ownForm) {\n <form [formGroup]=\"formlyForm\">\n <si-form-container [form]=\"formlyForm\">\n <div si-form-container-content>\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n </div>\n </si-form-container>\n </form>\n } @else {\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n }\n\n <ng-template #formlytmpl>\n <formly-form\n [fields]=\"formlyFieldConfig\"\n [options]=\"formlyFormOptions\"\n [form]=\"formlyForm\"\n [(model)]=\"model\"\n />\n </ng-template>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "component", type: SiFormContainerComponent, selector: "si-form-container", inputs: ["form", "readonly", "contentContainerBreakpoints", "disableContainerBreakpoints", "errorCodeTranslateKeyMap", "controlNameTranslateKeyMap", "disableErrorPrinting", "labelWidth"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
911
847
|
}
|
|
912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
913
|
-
type:
|
|
914
|
-
args: [{
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
ReactiveFormsModule,
|
|
920
|
-
SiFormlyIpInputComponent,
|
|
921
|
-
SiFormlyAccordionComponent,
|
|
922
|
-
SiFormlyArrayComponent,
|
|
923
|
-
SiFormlyButtonComponent,
|
|
924
|
-
SiFormlyDateTimeComponent,
|
|
925
|
-
SiFormlyEmailComponent,
|
|
926
|
-
SiFormlyHorizontalWrapperComponent,
|
|
927
|
-
SiFormlyIconWrapperComponent,
|
|
928
|
-
SiFormlyObjectComponent,
|
|
929
|
-
SiFormlyObjectGridComponent,
|
|
930
|
-
SiFormlyObjectPlainComponent,
|
|
931
|
-
SiFormlyObjectTabsetComponent,
|
|
932
|
-
SiFormlyPasswordComponent,
|
|
933
|
-
SiFormlySelectComponent,
|
|
934
|
-
SiFormlyTextareaComponent,
|
|
935
|
-
SiFormlyTextDisplayComponent,
|
|
936
|
-
SiFormlyWrapperComponent,
|
|
937
|
-
SiFormModule
|
|
938
|
-
],
|
|
939
|
-
declarations: [SiFormlyComponent],
|
|
940
|
-
providers: [
|
|
941
|
-
{
|
|
942
|
-
provide: FORMLY_CONFIG,
|
|
943
|
-
multi: true,
|
|
944
|
-
useFactory: dynamicUiConfig
|
|
945
|
-
}
|
|
946
|
-
],
|
|
947
|
-
exports: [SiFormlyComponent]
|
|
948
|
-
}]
|
|
949
|
-
}], ctorParameters: () => [] });
|
|
848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFormlyComponent, decorators: [{
|
|
849
|
+
type: Component,
|
|
850
|
+
args: [{ selector: 'si-formly', imports: [ReactiveFormsModule, FormlyForm, SiFormContainerComponent, NgTemplateOutlet], providers: [
|
|
851
|
+
provideFormlyConfig(withFormlyBootstrap()),
|
|
852
|
+
{ provide: FORMLY_CONFIG, multi: true, useFactory: dynamicUiConfig }
|
|
853
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "@let formlyForm = form();\n@let formlyFieldConfig = fieldConfig();\n@let formlyFormOptions = options();\n@if (formlyForm && formlyFieldConfig) {\n @if (ownForm) {\n <form [formGroup]=\"formlyForm\">\n <si-form-container [form]=\"formlyForm\">\n <div si-form-container-content>\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n </div>\n </si-form-container>\n </form>\n } @else {\n <ng-container *ngTemplateOutlet=\"formlytmpl\" />\n }\n\n <ng-template #formlytmpl>\n <formly-form\n [fields]=\"formlyFieldConfig\"\n [options]=\"formlyFormOptions\"\n [form]=\"formlyForm\"\n [(model)]=\"model\"\n />\n </ng-template>\n}\n" }]
|
|
854
|
+
}], propDecorators: { formlyForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FormlyForm), { isSignal: true }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }, { type: i0.Output, args: ["formChange"] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], schema: [{ type: i0.Input, args: [{ isSignal: true, alias: "schema", required: false }] }, { type: i0.Output, args: ["schemaChange"] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }], fieldsChange: [{ type: i0.Output, args: ["fieldsChange"] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }] } });
|
|
950
855
|
|
|
951
856
|
/**
|
|
952
857
|
* Copyright (c) Siemens 2016 - 2026
|
|
@@ -957,5 +862,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
957
862
|
* Generated bundle index. Do not edit.
|
|
958
863
|
*/
|
|
959
864
|
|
|
960
|
-
export { SiFormlyComponent,
|
|
865
|
+
export { SiFormlyComponent, SiFormlyTranslateExtension, SiValidationErrorIdPipe, dynamicUiConfig, getFieldValue, getKeyPath };
|
|
961
866
|
//# sourceMappingURL=siemens-element-ng-formly.mjs.map
|