@mediusinc/mng-commons 0.10.3-rc.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/api/models/builders/query-param.builder.mjs +58 -58
- package/esm2020/lib/api/models/filter-match-type.model.mjs +24 -24
- package/esm2020/lib/api/models/filter-param.model.mjs +32 -32
- package/esm2020/lib/api/models/index.mjs +8 -8
- package/esm2020/lib/api/models/mappers.mjs +12 -12
- package/esm2020/lib/api/models/query-mode.model.mjs +17 -17
- package/esm2020/lib/api/models/query-param.model.mjs +67 -67
- package/esm2020/lib/api/models/query-result.model.mjs +17 -17
- package/esm2020/lib/api/models/serialization.model.mjs +1 -1
- package/esm2020/lib/api/services/api.abstract.service.mjs +55 -55
- package/esm2020/lib/api/services/crud-api.abstract.service.mjs +67 -67
- package/esm2020/lib/api/services/get-all-api.abstract.service.mjs +22 -22
- package/esm2020/lib/api/services/index.mjs +3 -3
- package/esm2020/lib/api/utils/index.mjs +2 -2
- package/esm2020/lib/api/utils/medius-rest.util.mjs +151 -151
- package/esm2020/lib/api/utils/object-serializer.util.mjs +243 -243
- package/esm2020/lib/components/action/action.component.mjs +199 -199
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +247 -247
- package/esm2020/lib/components/action/index.mjs +3 -3
- package/esm2020/lib/components/action/models/action-confirmation-service.model.mjs +1 -1
- package/esm2020/lib/components/action/models/action-execution.model.mjs +235 -235
- package/esm2020/lib/components/action/models/index.mjs +2 -2
- package/esm2020/lib/components/action/route/action-route.component.mjs +124 -124
- package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +277 -277
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +168 -168
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +212 -212
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +48 -48
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +43 -43
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +25 -25
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +101 -101
- package/esm2020/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.mjs +22 -22
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +179 -179
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +173 -173
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +149 -149
- package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +17 -17
- package/esm2020/lib/components/form/formly/fields/index.mjs +9 -9
- package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +14 -14
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +14 -14
- package/esm2020/lib/components/form/formly/wrappers/index.mjs +2 -2
- package/esm2020/lib/components/form/index.mjs +3 -3
- package/esm2020/lib/components/form/models/form-editor.event.mjs +33 -33
- package/esm2020/lib/components/form/models/index.mjs +1 -1
- package/esm2020/lib/components/layout/breadcrumb.component.mjs +16 -16
- package/esm2020/lib/components/layout/footer.component.mjs +16 -16
- package/esm2020/lib/components/layout/index.mjs +7 -7
- package/esm2020/lib/components/layout/main-layout.component.mjs +51 -51
- package/esm2020/lib/components/layout/menu-item.component.mjs +238 -238
- package/esm2020/lib/components/layout/menu.component.mjs +20 -20
- package/esm2020/lib/components/layout/services/index.mjs +1 -1
- package/esm2020/lib/components/layout/services/main-layout.component.service.mjs +192 -192
- package/esm2020/lib/components/layout/topbar.component.mjs +57 -57
- package/esm2020/lib/components/layout/version.component.mjs +57 -57
- package/esm2020/lib/components/tableview/index.mjs +6 -6
- package/esm2020/lib/components/tableview/models/index.mjs +1 -1
- package/esm2020/lib/components/tableview/models/table.event.mjs +15 -15
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +57 -57
- package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +60 -60
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +101 -101
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +70 -70
- package/esm2020/lib/components/tableview/table/table.component.mjs +497 -497
- package/esm2020/lib/components/tableview/tableview.component.mjs +91 -91
- package/esm2020/lib/config/formly.config.mjs +181 -181
- package/esm2020/lib/config/index.mjs +1 -1
- package/esm2020/lib/config/models/index.mjs +3 -2
- package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
- package/esm2020/lib/config/models/mng-formly-config-model.mjs +2 -0
- package/esm2020/lib/data-providers/base.data-provider.mjs +16 -16
- package/esm2020/lib/data-providers/editor.data-provider.mjs +36 -36
- package/esm2020/lib/data-providers/index.mjs +5 -5
- package/esm2020/lib/data-providers/lookup.data-provider.mjs +15 -15
- package/esm2020/lib/data-providers/table.data-provider.mjs +16 -16
- package/esm2020/lib/data-providers/tableview.data-provider.mjs +16 -16
- package/esm2020/lib/descriptors/action.descriptor.mjs +587 -587
- package/esm2020/lib/descriptors/column.descriptor.mjs +264 -264
- package/esm2020/lib/descriptors/editor.descriptor.mjs +146 -146
- package/esm2020/lib/descriptors/field-validation.descriptor.mjs +20 -20
- package/esm2020/lib/descriptors/field.descriptor.mjs +819 -819
- package/esm2020/lib/descriptors/filter.descriptor.mjs +288 -288
- package/esm2020/lib/descriptors/index.mjs +9 -9
- package/esm2020/lib/descriptors/interfaces/field-config.interface.mjs +1 -1
- package/esm2020/lib/descriptors/interfaces/index.mjs +2 -2
- package/esm2020/lib/descriptors/interfaces/lookup-descriptor.interface.mjs +1 -1
- package/esm2020/lib/descriptors/model.descriptor.mjs +33 -33
- package/esm2020/lib/descriptors/table.descriptor.mjs +197 -197
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +134 -134
- package/esm2020/lib/descriptors/types/action.type.mjs +52 -52
- package/esm2020/lib/descriptors/types/column.type.mjs +10 -10
- package/esm2020/lib/descriptors/types/editor.type.mjs +7 -7
- package/esm2020/lib/descriptors/types/field.type.mjs +52 -52
- package/esm2020/lib/descriptors/types/filter.type.mjs +30 -30
- package/esm2020/lib/descriptors/types/index.mjs +6 -6
- package/esm2020/lib/descriptors/types/table.type.mjs +16 -16
- package/esm2020/lib/directives/component.directive.mjs +43 -43
- package/esm2020/lib/directives/index.mjs +2 -2
- package/esm2020/lib/directives/template.directive.mjs +27 -27
- package/esm2020/lib/mng-commons.module.mjs +441 -441
- package/esm2020/lib/models/column-value.model.mjs +1 -1
- package/esm2020/lib/models/enum.model.mjs +1 -1
- package/esm2020/lib/models/error.model.mjs +1 -1
- package/esm2020/lib/models/formly-field.model.mjs +2 -0
- package/esm2020/lib/models/index.mjs +9 -8
- package/esm2020/lib/models/menu.model.mjs +1 -1
- package/esm2020/lib/models/user.model.mjs +1 -1
- package/esm2020/lib/models/version.model.mjs +1 -1
- package/esm2020/lib/models/view-container.model.mjs +1 -1
- package/esm2020/lib/pipes/boolean.pipe.mjs +26 -26
- package/esm2020/lib/pipes/enum.pipe.mjs +24 -24
- package/esm2020/lib/pipes/i18n-property.pipe.mjs +17 -17
- package/esm2020/lib/pipes/index.mjs +5 -5
- package/esm2020/lib/pipes/json-path.pipe.mjs +79 -79
- package/esm2020/lib/pipes/link-formatter.pipe.mjs +38 -38
- package/esm2020/lib/router/index.mjs +2 -2
- package/esm2020/lib/router/models/index.mjs +1 -1
- package/esm2020/lib/router/models/router.model.mjs +1 -1
- package/esm2020/lib/router/route-builder.mjs +425 -425
- package/esm2020/lib/router/tableview-route-builder.mjs +159 -159
- package/esm2020/lib/security/authorization.guard.mjs +25 -25
- package/esm2020/lib/security/authorization.service.mjs +46 -46
- package/esm2020/lib/security/authorization.util.mjs +15 -15
- package/esm2020/lib/security/index.mjs +3 -3
- package/esm2020/lib/security/model/authorization.type.mjs +7 -7
- package/esm2020/lib/security/model/index.mjs +3 -3
- package/esm2020/lib/security/model/permission-service.interface.mjs +1 -1
- package/esm2020/lib/security/model/permissions.model.mjs +94 -94
- package/esm2020/lib/services/action-executor.service.mjs +535 -535
- package/esm2020/lib/services/commons.service.mjs +342 -342
- package/esm2020/lib/services/configuration.service.mjs +110 -110
- package/esm2020/lib/services/error-mapper.service.mjs +13 -13
- package/esm2020/lib/services/index.mjs +6 -6
- package/esm2020/lib/services/internal/commons-init.provider.mjs +3 -3
- package/esm2020/lib/services/internal/commons-init.service.mjs +43 -43
- package/esm2020/lib/services/internal/index.mjs +2 -2
- package/esm2020/lib/services/navigation.service.mjs +47 -47
- package/esm2020/lib/services/providers/config-service.provider.mjs +29 -29
- package/esm2020/lib/services/providers/formly-config.provider.mjs +30 -30
- package/esm2020/lib/services/providers/index.mjs +2 -2
- package/esm2020/lib/services/tokens/browser-storage.token.mjs +5 -5
- package/esm2020/lib/services/tokens/commons-init.token.mjs +2 -2
- package/esm2020/lib/services/tokens/default-setting.token.mjs +2 -2
- package/esm2020/lib/services/tokens/index.mjs +4 -4
- package/esm2020/lib/services/tokens/module-config.token.mjs +2 -2
- package/esm2020/lib/services/version.service.mjs +38 -38
- package/esm2020/lib/services/view-container.component.service.mjs +34 -34
- package/esm2020/lib/types/index.mjs +2 -2
- package/esm2020/lib/types/type.decorator.mjs +12 -12
- package/esm2020/lib/types/type.model.mjs +1 -1
- package/esm2020/lib/utils/action-data-provider.util.mjs +144 -144
- package/esm2020/lib/utils/editor-formly.util.mjs +251 -243
- package/esm2020/lib/utils/enum.util.mjs +81 -81
- package/esm2020/lib/utils/i18n.util.mjs +232 -232
- package/esm2020/lib/utils/index.mjs +7 -7
- package/esm2020/lib/utils/model.util.mjs +59 -59
- package/esm2020/lib/utils/notification.util.mjs +45 -45
- package/esm2020/lib/utils/route.util.mjs +23 -23
- package/esm2020/lib/utils/styles.util.mjs +40 -40
- package/esm2020/lib/utils/type.util.mjs +76 -76
- package/esm2020/mediusinc-mng-commons.mjs +4 -4
- package/esm2020/public-api.mjs +51 -51
- package/fesm2015/mediusinc-mng-commons.mjs +10636 -10632
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +10489 -10481
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/models/builders/query-param.builder.d.ts +13 -13
- package/lib/api/models/filter-match-type.model.d.ts +23 -23
- package/lib/api/models/filter-param.model.d.ts +23 -23
- package/lib/api/models/index.d.ts +8 -8
- package/lib/api/models/mappers.d.ts +6 -6
- package/lib/api/models/query-mode.model.d.ts +16 -16
- package/lib/api/models/query-param.model.d.ts +31 -31
- package/lib/api/models/query-result.model.d.ts +23 -23
- package/lib/api/models/serialization.model.d.ts +8 -8
- package/lib/api/services/api.abstract.service.d.ts +24 -24
- package/lib/api/services/crud-api.abstract.service.d.ts +22 -22
- package/lib/api/services/get-all-api.abstract.service.d.ts +14 -14
- package/lib/api/services/index.d.ts +3 -3
- package/lib/api/utils/index.d.ts +2 -2
- package/lib/api/utils/medius-rest.util.d.ts +15 -15
- package/lib/api/utils/object-serializer.util.d.ts +33 -33
- package/lib/components/action/action.component.d.ts +75 -75
- package/lib/components/action/editor/action-editor.component.d.ts +64 -64
- package/lib/components/action/index.d.ts +3 -3
- package/lib/components/action/models/action-confirmation-service.model.d.ts +6 -6
- package/lib/components/action/models/action-execution.model.d.ts +129 -129
- package/lib/components/action/models/index.d.ts +2 -2
- package/lib/components/action/route/action-route.component.d.ts +31 -31
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +56 -56
- package/lib/components/form/dropdown/dropdown.component.d.ts +47 -47
- package/lib/components/form/editor/form-editor.component.d.ts +45 -45
- package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +15 -15
- package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +14 -14
- package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +13 -13
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +23 -23
- package/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.d.ts +10 -10
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +45 -45
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +23 -23
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +38 -38
- package/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +6 -6
- package/lib/components/form/formly/fields/index.d.ts +9 -9
- package/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +6 -6
- package/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.d.ts +6 -6
- package/lib/components/form/formly/wrappers/index.d.ts +2 -2
- package/lib/components/form/index.d.ts +3 -3
- package/lib/components/form/models/form-editor.event.d.ts +37 -37
- package/lib/components/form/models/index.d.ts +1 -1
- package/lib/components/layout/breadcrumb.component.d.ts +8 -8
- package/lib/components/layout/footer.component.d.ts +9 -9
- package/lib/components/layout/index.d.ts +7 -7
- package/lib/components/layout/main-layout.component.d.ts +20 -20
- package/lib/components/layout/menu-item.component.d.ts +44 -44
- package/lib/components/layout/menu.component.d.ts +10 -10
- package/lib/components/layout/services/index.d.ts +1 -1
- package/lib/components/layout/services/main-layout.component.service.d.ts +65 -65
- package/lib/components/layout/topbar.component.d.ts +24 -24
- package/lib/components/layout/version.component.d.ts +19 -19
- package/lib/components/tableview/index.d.ts +6 -6
- package/lib/components/tableview/models/index.d.ts +1 -1
- package/lib/components/tableview/models/table.event.d.ts +17 -17
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +20 -20
- package/lib/components/tableview/route/tableview-route.component.d.ts +23 -23
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +32 -32
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +29 -29
- package/lib/components/tableview/table/table.component.d.ts +108 -108
- package/lib/components/tableview/tableview.component.d.ts +41 -41
- package/lib/config/formly.config.d.ts +16 -15
- package/lib/config/index.d.ts +1 -1
- package/lib/config/models/index.d.ts +2 -1
- package/lib/config/models/mng-config.model.d.ts +36 -36
- package/lib/config/models/mng-formly-config-model.d.ts +17 -0
- package/lib/data-providers/base.data-provider.d.ts +14 -14
- package/lib/data-providers/editor.data-provider.d.ts +25 -25
- package/lib/data-providers/index.d.ts +5 -5
- package/lib/data-providers/lookup.data-provider.d.ts +14 -14
- package/lib/data-providers/table.data-provider.d.ts +14 -14
- package/lib/data-providers/tableview.data-provider.d.ts +15 -15
- package/lib/descriptors/action.descriptor.d.ts +234 -234
- package/lib/descriptors/column.descriptor.d.ts +82 -82
- package/lib/descriptors/editor.descriptor.d.ts +37 -37
- package/lib/descriptors/field-validation.descriptor.d.ts +18 -18
- package/lib/descriptors/field.descriptor.d.ts +300 -294
- package/lib/descriptors/filter.descriptor.d.ts +106 -106
- package/lib/descriptors/index.d.ts +9 -9
- package/lib/descriptors/interfaces/field-config.interface.d.ts +9 -9
- package/lib/descriptors/interfaces/index.d.ts +2 -2
- package/lib/descriptors/interfaces/lookup-descriptor.interface.d.ts +17 -17
- package/lib/descriptors/model.descriptor.d.ts +15 -15
- package/lib/descriptors/table.descriptor.d.ts +66 -66
- package/lib/descriptors/tableview.descriptor.d.ts +42 -42
- package/lib/descriptors/types/action.type.d.ts +45 -45
- package/lib/descriptors/types/column.type.d.ts +9 -9
- package/lib/descriptors/types/editor.type.d.ts +6 -6
- package/lib/descriptors/types/field.type.d.ts +44 -44
- package/lib/descriptors/types/filter.type.d.ts +27 -27
- package/lib/descriptors/types/index.d.ts +6 -6
- package/lib/descriptors/types/table.type.d.ts +13 -13
- package/lib/directives/component.directive.d.ts +16 -16
- package/lib/directives/index.d.ts +2 -2
- package/lib/directives/template.directive.d.ts +13 -13
- package/lib/mng-commons.module.d.ts +87 -87
- package/lib/models/column-value.model.d.ts +4 -4
- package/lib/models/enum.model.d.ts +6 -6
- package/lib/models/error.model.d.ts +14 -14
- package/lib/models/formly-field.model.d.ts +16 -0
- package/lib/models/index.d.ts +8 -7
- package/lib/models/menu.model.d.ts +27 -27
- package/lib/models/user.model.d.ts +8 -8
- package/lib/models/version.model.d.ts +18 -18
- package/lib/models/view-container.model.d.ts +6 -6
- package/lib/pipes/boolean.pipe.d.ts +7 -7
- package/lib/pipes/enum.pipe.d.ts +8 -8
- package/lib/pipes/i18n-property.pipe.d.ts +8 -8
- package/lib/pipes/index.d.ts +5 -5
- package/lib/pipes/json-path.pipe.d.ts +13 -13
- package/lib/pipes/link-formatter.pipe.d.ts +11 -11
- package/lib/router/index.d.ts +2 -2
- package/lib/router/models/index.d.ts +1 -1
- package/lib/router/models/router.model.d.ts +27 -27
- package/lib/router/route-builder.d.ts +98 -98
- package/lib/router/tableview-route-builder.d.ts +34 -34
- package/lib/security/authorization.guard.d.ts +11 -11
- package/lib/security/authorization.service.d.ts +19 -19
- package/lib/security/authorization.util.d.ts +5 -5
- package/lib/security/index.d.ts +3 -3
- package/lib/security/model/authorization.type.d.ts +6 -6
- package/lib/security/model/index.d.ts +3 -3
- package/lib/security/model/permission-service.interface.d.ts +6 -6
- package/lib/security/model/permissions.model.d.ts +44 -44
- package/lib/services/action-executor.service.d.ts +149 -149
- package/lib/services/commons.service.d.ts +78 -78
- package/lib/services/configuration.service.d.ts +36 -36
- package/lib/services/error-mapper.service.d.ts +7 -7
- package/lib/services/index.d.ts +6 -6
- package/lib/services/internal/commons-init.provider.d.ts +3 -3
- package/lib/services/internal/commons-init.service.d.ts +16 -16
- package/lib/services/internal/index.d.ts +2 -2
- package/lib/services/navigation.service.d.ts +14 -14
- package/lib/services/providers/config-service.provider.d.ts +6 -6
- package/lib/services/providers/formly-config.provider.d.ts +4 -4
- package/lib/services/providers/index.d.ts +2 -2
- package/lib/services/tokens/browser-storage.token.d.ts +2 -2
- package/lib/services/tokens/commons-init.token.d.ts +3 -3
- package/lib/services/tokens/default-setting.token.d.ts +2 -2
- package/lib/services/tokens/index.d.ts +4 -4
- package/lib/services/tokens/module-config.token.d.ts +3 -3
- package/lib/services/version.service.d.ts +13 -13
- package/lib/services/view-container.component.service.d.ts +22 -22
- package/lib/types/index.d.ts +2 -2
- package/lib/types/type.decorator.d.ts +4 -4
- package/lib/types/type.model.d.ts +23 -23
- package/lib/utils/action-data-provider.util.d.ts +20 -20
- package/lib/utils/editor-formly.util.d.ts +11 -11
- package/lib/utils/enum.util.d.ts +50 -50
- package/lib/utils/i18n.util.d.ts +56 -56
- package/lib/utils/index.d.ts +7 -7
- package/lib/utils/model.util.d.ts +8 -8
- package/lib/utils/notification.util.d.ts +11 -11
- package/lib/utils/route.util.d.ts +4 -4
- package/lib/utils/styles.util.d.ts +14 -14
- package/lib/utils/type.util.d.ts +36 -36
- package/mediusinc-mng-commons.d.ts +5 -5
- package/package.json +2 -2
- package/public-api.d.ts +32 -32
- package/version-info.json +7 -7
- package/mediusinc-mng-commons-0.10.3-rc.2.tgz +0 -0
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { FieldType } from '@ngx-formly/core';
|
|
3
|
-
import { distinctUntilChanged } from 'rxjs';
|
|
4
|
-
import { startWith } from 'rxjs/operators';
|
|
5
|
-
import { MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum } from '../../../models';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "../../../autocomplete/autocomplete.component";
|
|
8
|
-
import * as i2 from "@angular/forms";
|
|
9
|
-
import * as i3 from "@ngx-formly/core";
|
|
10
|
-
export class MngFormlyFieldAutocompleteComponent extends FieldType {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.subscriptions = [];
|
|
14
|
-
}
|
|
15
|
-
ngOnInit() {
|
|
16
|
-
this.aFormControl = this.formControl;
|
|
17
|
-
this.descriptor = this.to['descriptor'];
|
|
18
|
-
// emit lifecycle event
|
|
19
|
-
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
20
|
-
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
21
|
-
});
|
|
22
|
-
const subscription = this.aFormControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
23
|
-
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldAutocompleteComponent, this, {
|
|
24
|
-
value: v
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
this.subscriptions.push(subscription);
|
|
28
|
-
}
|
|
29
|
-
ngAfterViewInit() {
|
|
30
|
-
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
31
|
-
eventSubtype: MngFormFieldEventComponentSubtype.ON_VIEW_INIT
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
ngOnDestroy() {
|
|
35
|
-
// warning: formly calls on destroy before on init
|
|
36
|
-
this.subscriptions.forEach(value => value.unsubscribe());
|
|
37
|
-
// emit lifecycle event
|
|
38
|
-
this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
39
|
-
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
-
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: i1.MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
|
|
46
|
-
type: Component,
|
|
47
|
-
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
|
|
48
|
-
}] });
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { FieldType } from '@ngx-formly/core';
|
|
3
|
+
import { distinctUntilChanged } from 'rxjs';
|
|
4
|
+
import { startWith } from 'rxjs/operators';
|
|
5
|
+
import { MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum } from '../../../models';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../../../autocomplete/autocomplete.component";
|
|
8
|
+
import * as i2 from "@angular/forms";
|
|
9
|
+
import * as i3 from "@ngx-formly/core";
|
|
10
|
+
export class MngFormlyFieldAutocompleteComponent extends FieldType {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.subscriptions = [];
|
|
14
|
+
}
|
|
15
|
+
ngOnInit() {
|
|
16
|
+
this.aFormControl = this.formControl;
|
|
17
|
+
this.descriptor = this.to['descriptor'];
|
|
18
|
+
// emit lifecycle event
|
|
19
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
20
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
21
|
+
});
|
|
22
|
+
const subscription = this.aFormControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
23
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldAutocompleteComponent, this, {
|
|
24
|
+
value: v
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
this.subscriptions.push(subscription);
|
|
28
|
+
}
|
|
29
|
+
ngAfterViewInit() {
|
|
30
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
31
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_VIEW_INIT
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
ngOnDestroy() {
|
|
35
|
+
// warning: formly calls on destroy before on init
|
|
36
|
+
this.subscriptions.forEach(value => value.unsubscribe());
|
|
37
|
+
// emit lifecycle event
|
|
38
|
+
this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
39
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
+
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: i1.MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
|
|
48
|
+
}] });
|
|
49
49
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWx5LWZpZWxkLWF1dG9jb21wbGV0ZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvZm9ybS9mb3JtbHkvZmllbGRzL2Zvcm1seS1maWVsZC1hdXRvY29tcGxldGUvZm9ybWx5LWZpZWxkLWF1dG9jb21wbGV0ZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvZm9ybS9mb3JtbHkvZmllbGRzL2Zvcm1seS1maWVsZC1hdXRvY29tcGxldGUvZm9ybWx5LWZpZWxkLWF1dG9jb21wbGV0ZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQWdCLHVCQUF1QixFQUFFLFNBQVMsRUFBb0IsTUFBTSxlQUFlLENBQUM7QUFHbkcsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGtCQUFrQixDQUFDO0FBQzNDLE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c1ZhbHVlUHJvcGVydHldPVwiJGFueShkZXNjcmlwdG9yLml0ZW1zVmFsdWVQcm9wZXJ0eSlcIlxuICAgIFtjbGFzc05hbWVdPVwiZGVzY3JpcHRvci5pbnB1dENsYXNzTmFtZVwiPlxuPC9tbmctYXV0b2NvbXBsZXRlPlxuIl19
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { FieldType } from '@ngx-formly/core';
|
|
3
|
-
import { distinctUntilChanged } from 'rxjs';
|
|
4
|
-
import { startWith } from 'rxjs/operators';
|
|
5
|
-
import { MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum } from '../../../models';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "../../../dropdown/dropdown.component";
|
|
8
|
-
import * as i2 from "@angular/forms";
|
|
9
|
-
import * as i3 from "@ngx-formly/core";
|
|
10
|
-
export class MngFormlyFieldDropdownComponent extends FieldType {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.subscriptions = [];
|
|
14
|
-
}
|
|
15
|
-
ngOnInit() {
|
|
16
|
-
this.dFormControl = this.formControl;
|
|
17
|
-
this.descriptor = this.to['descriptor'];
|
|
18
|
-
// emit lifecycle event
|
|
19
|
-
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldDropdownComponent, this, {
|
|
20
|
-
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
21
|
-
});
|
|
22
|
-
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
23
|
-
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldDropdownComponent, this, {
|
|
24
|
-
value: v
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
this.subscriptions.push(subscription);
|
|
28
|
-
}
|
|
29
|
-
ngOnDestroy() {
|
|
30
|
-
// warning: formly calls on destroy before on init
|
|
31
|
-
this.subscriptions.forEach(s => s.unsubscribe());
|
|
32
|
-
// emit lifecycle event
|
|
33
|
-
this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldDropdownComponent, this, {
|
|
34
|
-
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", components: [{ type: i1.MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
|
|
41
|
-
type: Component,
|
|
42
|
-
args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
|
|
43
|
-
}] });
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { FieldType } from '@ngx-formly/core';
|
|
3
|
+
import { distinctUntilChanged } from 'rxjs';
|
|
4
|
+
import { startWith } from 'rxjs/operators';
|
|
5
|
+
import { MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum } from '../../../models';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../../../dropdown/dropdown.component";
|
|
8
|
+
import * as i2 from "@angular/forms";
|
|
9
|
+
import * as i3 from "@ngx-formly/core";
|
|
10
|
+
export class MngFormlyFieldDropdownComponent extends FieldType {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.subscriptions = [];
|
|
14
|
+
}
|
|
15
|
+
ngOnInit() {
|
|
16
|
+
this.dFormControl = this.formControl;
|
|
17
|
+
this.descriptor = this.to['descriptor'];
|
|
18
|
+
// emit lifecycle event
|
|
19
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldDropdownComponent, this, {
|
|
20
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
21
|
+
});
|
|
22
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
23
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldDropdownComponent, this, {
|
|
24
|
+
value: v
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
this.subscriptions.push(subscription);
|
|
28
|
+
}
|
|
29
|
+
ngOnDestroy() {
|
|
30
|
+
// warning: formly calls on destroy before on init
|
|
31
|
+
this.subscriptions.forEach(s => s.unsubscribe());
|
|
32
|
+
// emit lifecycle event
|
|
33
|
+
this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldDropdownComponent, this, {
|
|
34
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", components: [{ type: i1.MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\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TGFiZWxUcmFuc2xhdGVcIlxuICAgIFtpdGVtc1ZhbHVlUHJvcGVydHldPVwiZGVzY3JpcHRvci5pdGVtc1ZhbHVlUHJvcGVydHlcIlxuICAgIFtpdGVtc0Rpc2FibGVkUHJvcGVydHldPVwiZGVzY3JpcHRvci5pdGVtc0Rpc2FibGVkUHJvcGVydHlcIlxuICAgIFtkYXRhS2V5UHJvcGVydHldPVwiZGVzY3JpcHRvci5kYXRhS2V5UHJvcGVydHlcIlxuICAgIFtzaG93Q2xlYXJdPVwiIXRvLnJlcXVpcmVkXCJcbiAgICBbY2xhc3NOYW1lXT1cImRlc2NyaXB0b3IuaW5wdXRDbGFzc05hbWVcIj5cbjwvbW5nLWRyb3Bkb3duPlxuIl19
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { FieldType } from '@ngx-formly/core';
|
|
3
|
-
import { FieldGroupTypeEnum } from '../../../../../descriptors/types';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "primeng/fieldset";
|
|
6
|
-
import * as i2 from "@ngx-formly/core";
|
|
7
|
-
import * as i3 from "@angular/common";
|
|
8
|
-
import * as i4 from "@ngx-translate/core";
|
|
9
|
-
export class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.typeFieldset = FieldGroupTypeEnum.Fieldset;
|
|
13
|
-
this.typeLogical = FieldGroupTypeEnum.Logical;
|
|
14
|
-
}
|
|
15
|
-
ngOnInit() {
|
|
16
|
-
this.descriptor = this.to['descriptor'];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"group?.
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
|
|
22
|
-
type: Component,
|
|
23
|
-
args: [{ selector: 'mng-formly-field-fieldset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"group?.
|
|
24
|
-
}] });
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { FieldType } from '@ngx-formly/core';
|
|
3
|
+
import { FieldGroupTypeEnum } from '../../../../../descriptors/types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "primeng/fieldset";
|
|
6
|
+
import * as i2 from "@ngx-formly/core";
|
|
7
|
+
import * as i3 from "@angular/common";
|
|
8
|
+
import * as i4 from "@ngx-translate/core";
|
|
9
|
+
export class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.typeFieldset = FieldGroupTypeEnum.Fieldset;
|
|
13
|
+
this.typeLogical = FieldGroupTypeEnum.Logical;
|
|
14
|
+
}
|
|
15
|
+
ngOnInit() {
|
|
16
|
+
this.descriptor = this.to['descriptor'];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"group?.props?.['descriptor']?.type\">\n <p-fieldset *ngSwitchCase=\"typeFieldset\" [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <formly-field *ngSwitchDefault [field]=\"group\"></formly-field>\n </ng-container>\n</ng-container>\n", components: [{ type: i1.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { type: i2.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "translate": i4.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ selector: 'mng-formly-field-fieldset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"group?.props?.['descriptor']?.type\">\n <p-fieldset *ngSwitchCase=\"typeFieldset\" [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <formly-field *ngSwitchDefault [field]=\"group\"></formly-field>\n </ng-container>\n</ng-container>\n" }]
|
|
24
|
+
}] });
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWx5LWZpZWxkLWZpZWxkc2V0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29tcG9uZW50cy9mb3JtL2Zvcm1seS9maWVsZHMvZm9ybWx5LWZpZWxkLWZpZWxkc2V0L2Zvcm1seS1maWVsZC1maWVsZHNldC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvZm9ybS9mb3JtbHkvZmllbGRzL2Zvcm1seS1maWVsZC1maWVsZHNldC9mb3JtbHktZmllbGQtZmllbGRzZXQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLHVCQUF1QixFQUFFLFNBQVMsRUFBUyxNQUFNLGVBQWUsQ0FBQztBQUV6RSxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFHM0MsT0FBTyxFQUFDLGtCQUFrQixFQUFDLE1BQU0sa0NBQWtDLENBQUM7Ozs7OztBQU9wRSxNQUFNLE9BQU8sK0JBQWdDLFNBQVEsU0FBUztJQUw5RDs7UUFNb0IsaUJBQVksR0FBRyxrQkFBa0IsQ0FBQyxRQUFRLENBQUM7UUFDM0MsZ0JBQVcsR0FBRyxrQkFBa0IsQ0FBQyxPQUFPLENBQUM7S0FNNUQ7SUFIRyxRQUFRO1FBQ0osSUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLENBQUMsRUFBRSxDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQzVDLENBQUM7OzRIQVBRLC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