@myrtex-org/form 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/esm2022/lib/modules/object-form/components/elements/base/base-element/base-element.component.mjs +1 -1
- package/esm2022/lib/modules/object-form/components/elements/base/base-field/base-field.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/content/divider/content-divider.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/content/file/content-file.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/content/text/content-text.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/content/title/content-title.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/content/tooltip/content-tooltip.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/checkbox-group/input-checkbox-group.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/date/input-date.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/file/input-file.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/inn/input-inn.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/link/input-link.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/number/input-number.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/phone/input-phone.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/radio-group/input-radio-group.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/select/input-select.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/switch/input-switch.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/table/components/input-table-modal/form-dispenser-modal/form-dispenser-modal.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/table/helpers/get-row-model.helper.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/table/input-table.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/text/input-text.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/elements/input/textarea/input-textarea.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/form-dispenser/form-dispenser.component.mjs +2 -2
- package/esm2022/lib/modules/object-form/components/index.mjs +3 -0
- package/esm2022/lib/modules/object-form/factories/component-factory/component-factory.directive.mjs +1 -1
- package/esm2022/lib/modules/object-form/factories/component-factory/enums/component.enum.mjs +2 -2
- package/esm2022/lib/modules/object-form/factories/component-factory/models/component.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/helpers/check-dependence-rule.helper.mjs +2 -2
- package/esm2022/lib/modules/object-form/helpers/get-updated-values.mjs +2 -2
- package/esm2022/lib/modules/object-form/helpers/get-value-model.helper.mjs +2 -2
- package/esm2022/lib/modules/object-form/models/dependence-rules/dependence-condition.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/dependence-rules/field-dependence-check-result.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/dependence-rules/field-dependence.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/dependence-rules/template-field-simple.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/group-options.model.mjs +2 -2
- package/esm2022/lib/modules/object-form/models/elemets/inputs/content-divider.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/content-file.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/content-text.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/content-title.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/content-tooltip.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-checkbox-group.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-date.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-file.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-inn.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-link.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-number.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-phone.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-radio-group.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-select.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-switch.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-table.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-text.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/inputs/input-textarea.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/elemets/section-options.model.mjs +2 -2
- package/esm2022/lib/modules/object-form/models/object-property.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/template-component.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/template.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/models/value.model.mjs +1 -1
- package/esm2022/lib/modules/object-form/object-form-routing.module.mjs +3 -3
- package/esm2022/lib/modules/object-form/object-form.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/object-form.module.mjs +14 -15
- package/esm2022/lib/modules/object-form/services/object-form.service.mjs +2 -2
- package/esm2022/lib/modules/object-form/store/object-form.actions.mjs +1 -1
- package/esm2022/lib/modules/object-form/store/object-form.effects.mjs +4 -4
- package/esm2022/lib/modules/object-form/store/object-form.reducers.mjs +3 -4
- package/esm2022/lib/modules/object-form/store/object-form.selector.mjs +4 -4
- package/esm2022/lib/modules/object-form/store/object-form.state.mjs +1 -1
- package/esm2022/lib/modules/shared-form/constants/index.mjs +2 -0
- package/esm2022/lib/modules/shared-form/enums/component-size.enum.mjs +7 -0
- package/esm2022/lib/modules/shared-form/enums/component-type.enum.mjs +46 -0
- package/esm2022/lib/modules/shared-form/enums/condition-operator-type.enum.mjs +15 -0
- package/esm2022/lib/modules/shared-form/enums/date-format.enum.mjs +12 -0
- package/esm2022/lib/modules/shared-form/enums/date-type.enum.mjs +10 -0
- package/esm2022/lib/modules/shared-form/enums/dependence-action-type.enum.mjs +12 -0
- package/esm2022/lib/modules/shared-form/enums/index.mjs +13 -0
- package/esm2022/lib/modules/shared-form/enums/inn-type.enum.mjs +12 -0
- package/esm2022/lib/modules/shared-form/enums/input-state.enum.mjs +18 -0
- package/esm2022/lib/modules/shared-form/enums/logical-operator-type.enum.mjs +7 -0
- package/esm2022/lib/modules/shared-form/enums/template-components-group-type.enum.mjs +10 -0
- package/esm2022/lib/modules/shared-form/enums/template-status.enum.mjs +15 -0
- package/esm2022/lib/modules/shared-form/enums/value-type.enum.mjs +18 -0
- package/esm2022/lib/modules/shared-form/helpers/common.helpers.mjs +11 -0
- package/esm2022/lib/modules/{core → shared-form}/helpers/index.mjs +1 -1
- package/esm2022/lib/modules/shared-form/interceptors/concurrency.interceptor.mjs +32 -0
- package/esm2022/lib/modules/{core → shared-form}/interceptors/index.mjs +1 -1
- package/esm2022/lib/modules/shared-form/models/component-model-base.model.mjs +2 -0
- package/esm2022/lib/modules/shared-form/models/concurrency-info.model.mjs +2 -0
- package/esm2022/lib/modules/shared-form/models/file.model.mjs +2 -0
- package/esm2022/lib/modules/shared-form/models/index.mjs +8 -0
- package/esm2022/lib/modules/shared-form/models/navigation-tabs.model.mjs +2 -0
- package/esm2022/lib/modules/shared-form/models/options-base.model.mjs +2 -0
- package/esm2022/lib/modules/shared-form/models/select-list-item.model.mjs +2 -0
- package/esm2022/lib/modules/shared-form/models/user/index.mjs +3 -0
- package/esm2022/lib/modules/shared-form/models/user/policy.type.mjs +2 -0
- package/esm2022/lib/modules/shared-form/models/user/route-data-model.mjs +2 -0
- package/esm2022/lib/modules/shared-form/services/concurrency-store.service.mjs +63 -0
- package/esm2022/lib/modules/{core → shared-form}/services/index.mjs +1 -1
- package/esm2022/lib/modules/shared-form/shared-form.module.mjs +27 -0
- package/esm2022/lib/modules/shared-form/store/index.mjs +5 -0
- package/esm2022/lib/modules/shared-form/store/shared-form.effects.mjs +2 -0
- package/esm2022/lib/modules/shared-form/store/shared-form.reducer.mjs +6 -0
- package/esm2022/lib/modules/shared-form/store/shared-form.selector.mjs +27 -0
- package/esm2022/lib/modules/shared-form/store/shared-form.state.mjs +2 -0
- package/esm2022/public-api.mjs +11 -11
- package/fesm2022/myrtex-org-form.mjs +10 -2318
- package/fesm2022/myrtex-org-form.mjs.map +1 -1
- package/lib/modules/object-form/components/elements/base/base-element/base-element.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/base/base-field/base-field.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/content/divider/content-divider.component.d.ts +2 -2
- package/lib/modules/object-form/components/elements/content/file/content-file.component.d.ts +2 -2
- package/lib/modules/object-form/components/elements/content/text/content-text.component.d.ts +2 -2
- package/lib/modules/object-form/components/elements/content/title/content-title.component.d.ts +2 -2
- package/lib/modules/object-form/components/elements/content/tooltip/content-tooltip.component.d.ts +2 -2
- package/lib/modules/object-form/components/elements/input/checkbox-group/input-checkbox-group.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/date/input-date.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/file/input-file.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/inn/input-inn.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/link/input-link.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/number/input-number.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/phone/input-phone.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/radio-group/input-radio-group.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/select/input-select.component.d.ts +2 -2
- package/lib/modules/object-form/components/elements/input/switch/input-switch.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/table/helpers/get-row-model.helper.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/table/input-table.component.d.ts +2 -2
- package/lib/modules/object-form/components/elements/input/text/input-text.component.d.ts +1 -1
- package/lib/modules/object-form/components/elements/input/textarea/input-textarea.component.d.ts +1 -1
- package/lib/modules/object-form/components/index.d.ts +2 -0
- package/lib/modules/object-form/factories/component-factory/component-factory.directive.d.ts +2 -2
- package/lib/modules/object-form/factories/component-factory/models/component.model.d.ts +1 -1
- package/lib/modules/object-form/helpers/get-value-model.helper.d.ts +3 -3
- package/lib/modules/object-form/models/dependence-rules/dependence-condition.model.d.ts +1 -1
- package/lib/modules/object-form/models/dependence-rules/field-dependence-check-result.model.d.ts +1 -1
- package/lib/modules/object-form/models/dependence-rules/field-dependence.model.d.ts +1 -1
- package/lib/modules/object-form/models/dependence-rules/template-field-simple.model.d.ts +1 -1
- package/lib/modules/object-form/models/elemets/group-options.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/content-divider.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/content-file.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/content-text.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/content-title.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/content-tooltip.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-checkbox-group.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-date.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-file.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-inn.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-link.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-number.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-phone.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-radio-group.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-select.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-switch.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-table.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-text.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/inputs/input-textarea.model.d.ts +2 -2
- package/lib/modules/object-form/models/elemets/section-options.model.d.ts +2 -2
- package/lib/modules/object-form/models/object-property.model.d.ts +1 -1
- package/lib/modules/object-form/models/template-component.model.d.ts +2 -2
- package/lib/modules/object-form/models/template.model.d.ts +1 -1
- package/lib/modules/object-form/models/value.model.d.ts +1 -1
- package/lib/modules/object-form/object-form.module.d.ts +13 -31
- package/lib/modules/object-form/services/object-form.service.d.ts +1 -1
- package/lib/modules/object-form/store/object-form.actions.d.ts +2 -3
- package/lib/modules/object-form/store/object-form.effects.d.ts +14 -15
- package/lib/modules/object-form/store/object-form.selector.d.ts +2 -2
- package/lib/modules/object-form/store/object-form.state.d.ts +2 -3
- package/lib/modules/shared-form/constants/index.d.ts +1 -0
- package/lib/modules/{core → shared-form}/models/component-model-base.model.d.ts +1 -1
- package/lib/modules/{core → shared-form}/models/navigation-tabs.model.d.ts +1 -1
- package/lib/modules/shared-form/shared-form.module.d.ts +9 -0
- package/lib/modules/shared-form/store/index.d.ts +4 -0
- package/lib/modules/shared-form/store/shared-form.reducer.d.ts +3 -0
- package/lib/modules/{shared-store/store/shared-store.state.d.ts → shared-form/store/shared-form.state.d.ts} +1 -2
- package/package.json +1 -1
- package/public-api.d.ts +7 -7
- package/esm2022/lib/modules/core/enums/component-size.enum.mjs +0 -7
- package/esm2022/lib/modules/core/enums/component-type.enum.mjs +0 -46
- package/esm2022/lib/modules/core/enums/condition-operator-type.enum.mjs +0 -15
- package/esm2022/lib/modules/core/enums/date-format.enum.mjs +0 -12
- package/esm2022/lib/modules/core/enums/date-type.enum.mjs +0 -10
- package/esm2022/lib/modules/core/enums/dependence-action-type.enum.mjs +0 -12
- package/esm2022/lib/modules/core/enums/index.mjs +0 -13
- package/esm2022/lib/modules/core/enums/inn-type.enum.mjs +0 -12
- package/esm2022/lib/modules/core/enums/input-state.enum.mjs +0 -18
- package/esm2022/lib/modules/core/enums/logical-operator-type.enum.mjs +0 -7
- package/esm2022/lib/modules/core/enums/template-components-group-type.enum.mjs +0 -10
- package/esm2022/lib/modules/core/enums/template-status.enum.mjs +0 -15
- package/esm2022/lib/modules/core/enums/value-type.enum.mjs +0 -18
- package/esm2022/lib/modules/core/helpers/common.helpers.mjs +0 -11
- package/esm2022/lib/modules/core/interceptors/concurrency.interceptor.mjs +0 -32
- package/esm2022/lib/modules/core/models/component-model-base.model.mjs +0 -2
- package/esm2022/lib/modules/core/models/concurrency-info.model.mjs +0 -2
- package/esm2022/lib/modules/core/models/file.model.mjs +0 -2
- package/esm2022/lib/modules/core/models/index.mjs +0 -8
- package/esm2022/lib/modules/core/models/navigation-tabs.model.mjs +0 -2
- package/esm2022/lib/modules/core/models/options-base.model.mjs +0 -2
- package/esm2022/lib/modules/core/models/select-list-item.model.mjs +0 -2
- package/esm2022/lib/modules/core/models/user/index.mjs +0 -3
- package/esm2022/lib/modules/core/models/user/policy.type.mjs +0 -2
- package/esm2022/lib/modules/core/models/user/route-data-model.mjs +0 -2
- package/esm2022/lib/modules/core/services/concurrency-store.service.mjs +0 -63
- package/esm2022/lib/modules/shared-store/constants/index.mjs +0 -2
- package/esm2022/lib/modules/shared-store/shared-store.module.mjs +0 -27
- package/esm2022/lib/modules/shared-store/store/index.mjs +0 -5
- package/esm2022/lib/modules/shared-store/store/shared-store.effects.mjs +0 -2
- package/esm2022/lib/modules/shared-store/store/shared-store.reducer.mjs +0 -6
- package/esm2022/lib/modules/shared-store/store/shared-store.selector.mjs +0 -27
- package/esm2022/lib/modules/shared-store/store/shared-store.state.mjs +0 -3
- package/lib/modules/shared-store/constants/index.d.ts +0 -1
- package/lib/modules/shared-store/shared-store.module.d.ts +0 -9
- package/lib/modules/shared-store/store/index.d.ts +0 -4
- package/lib/modules/shared-store/store/shared-store.reducer.d.ts +0 -3
- /package/lib/modules/{core → shared-form}/enums/component-size.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/component-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/condition-operator-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/date-format.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/date-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/dependence-action-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/index.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/inn-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/input-state.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/logical-operator-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/template-components-group-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/template-status.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/enums/value-type.enum.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/helpers/common.helpers.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/helpers/index.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/interceptors/concurrency.interceptor.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/interceptors/index.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/concurrency-info.model.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/file.model.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/index.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/options-base.model.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/select-list-item.model.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/user/index.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/user/policy.type.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/models/user/route-data-model.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/services/concurrency-store.service.d.ts +0 -0
- /package/lib/modules/{core → shared-form}/services/index.d.ts +0 -0
- /package/lib/modules/{shared-store/store/shared-store.effects.d.ts → shared-form/store/shared-form.effects.d.ts} +0 -0
- /package/lib/modules/{shared-store/store/shared-store.selector.d.ts → shared-form/store/shared-form.selector.d.ts} +0 -0
|
@@ -1,2319 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { ROUTER_STATE_NAME, selectRouter, selectQueryParam, selectRouteParam, formatBytes } from '@myrtex-org/ui-composite';
|
|
12
|
-
import * as i1 from '@ngrx/effects';
|
|
13
|
-
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
14
|
-
import { of, forkJoin, Subject, throwError } from 'rxjs';
|
|
15
|
-
import * as i1$1 from '@myrtex-org/ui';
|
|
16
|
-
import { AutoSaveStore, ToasterType, LabelModule, ModalServiceComponent, MODAL_DATA, ModalModule, ButtonModule, ModalService, LoaderModule, InputTextModule, ContentWrapperModule, EditorModule, InputTextareaModule, CheckboxModule, SwitchModule, InputNumberModule, InputSelectModule, InputDateTimeModule, InputTimepickerModule, InputFileModule, AlertModule, CheckboxGroupModule, RadioGroupModule, DropdownModule, InputTelModule, LinkModule, ErrorMessageModule, ToasterServiceModule } from '@myrtex-org/ui';
|
|
17
|
-
import { HttpHeaders, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
18
|
-
import * as i2$1 from '@myrtex-org/templates';
|
|
19
|
-
import { FormHeaderModule, MenuAdminModule } from '@myrtex-org/templates';
|
|
20
|
-
import { cloneDeep, isArray } from 'lodash-es';
|
|
21
|
-
import * as i2$2 from '@angular/forms';
|
|
22
|
-
import { FormsModule } from '@angular/forms';
|
|
23
|
-
import { provideNgxMask } from 'ngx-mask';
|
|
24
|
-
import { v4 } from 'uuid';
|
|
25
|
-
import * as i2$3 from 'devextreme-angular';
|
|
26
|
-
import { DxDataGridModule } from 'devextreme-angular';
|
|
27
|
-
import * as i3$1 from 'devextreme-angular/ui/nested';
|
|
28
|
-
import { DxiColumnModule, DxiItemModule, DxoToolbarModule } from 'devextreme-angular/ui/nested';
|
|
29
|
-
import * as i4 from 'devextreme-angular/core';
|
|
30
|
-
|
|
31
|
-
const EFFECTS = [];
|
|
32
|
-
|
|
33
|
-
const sharedStoreReducer = {
|
|
34
|
-
[ROUTER_STATE_NAME]: routerReducer
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const initialSharedStoreState = {};
|
|
38
|
-
|
|
39
|
-
const selectRouteNestedParams = createSelector(selectRouter, (router) => {
|
|
40
|
-
let currentRoute = router?.state?.root;
|
|
41
|
-
let params = {};
|
|
42
|
-
while (currentRoute?.firstChild) {
|
|
43
|
-
currentRoute = currentRoute.firstChild;
|
|
44
|
-
params = {
|
|
45
|
-
...params,
|
|
46
|
-
...currentRoute.params,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
return params;
|
|
50
|
-
});
|
|
51
|
-
const selectRouteNestedParam = (param) => createSelector(selectRouteNestedParams, (params) => {
|
|
52
|
-
return params && params[param];
|
|
53
|
-
});
|
|
54
|
-
const selectTemplateSysName$1 = createSelector(selectRouteNestedParam('templateSysName'), (rparam) => {
|
|
55
|
-
return rparam || null;
|
|
56
|
-
});
|
|
57
|
-
const selectIdFromQuery = createSelector(selectQueryParam('id'), (rparam) => {
|
|
58
|
-
return rparam || null;
|
|
59
|
-
});
|
|
60
|
-
const selectSectionSysName = createSelector(selectRouteParam('sectionSysName'), (rparam) => {
|
|
61
|
-
return rparam || null;
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
var sharedStore_selector = /*#__PURE__*/Object.freeze({
|
|
65
|
-
__proto__: null,
|
|
66
|
-
selectIdFromQuery: selectIdFromQuery,
|
|
67
|
-
selectRouteNestedParam: selectRouteNestedParam,
|
|
68
|
-
selectRouteNestedParams: selectRouteNestedParams,
|
|
69
|
-
selectSectionSysName: selectSectionSysName,
|
|
70
|
-
selectTemplateSysName: selectTemplateSysName$1
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
var EApplicationActions;
|
|
74
|
-
(function (EApplicationActions) {
|
|
75
|
-
EApplicationActions["LoadTemplatePending"] = "[Application] Load Template Pending";
|
|
76
|
-
EApplicationActions["LoadTemplateSuccess"] = "[Application] Load Template Success";
|
|
77
|
-
EApplicationActions["LoadTemplateError"] = "[Application] Load Template Error";
|
|
78
|
-
EApplicationActions["LoadApplicationPending"] = "[Application] Load Application Pending";
|
|
79
|
-
EApplicationActions["LoadApplicationSuccess"] = "[Application] Load Application Success";
|
|
80
|
-
EApplicationActions["LoadApplicationError"] = "[Application] Load Application Error";
|
|
81
|
-
EApplicationActions["SaveApplicationPending"] = "[Application] Save Application Pending";
|
|
82
|
-
EApplicationActions["SaveApplicationSuccess"] = "[Application] Save Application Success";
|
|
83
|
-
EApplicationActions["SaveApplicationError"] = "[Application] Save Application Error";
|
|
84
|
-
EApplicationActions["CopyApplicationPending"] = "[Application] Copy Application Pending";
|
|
85
|
-
EApplicationActions["CopyApplicationSuccess"] = "[Application] Copy Application Success";
|
|
86
|
-
EApplicationActions["CopyApplicationError"] = "[Application] Copy Application Error";
|
|
87
|
-
EApplicationActions["UpdateValues"] = "[Application] Update Application Values";
|
|
88
|
-
EApplicationActions["AccessUpdateValues"] = "[Application] Access Update Application Values";
|
|
89
|
-
EApplicationActions["SaveValuesPending"] = "[Application] Save Application Values Pending";
|
|
90
|
-
EApplicationActions["SaveValuesSuccess"] = "[Application] Save Application Values Success";
|
|
91
|
-
EApplicationActions["SaveValuesError"] = "[Application] Save Application Values Error";
|
|
92
|
-
EApplicationActions["UpdateSelectedSectionSysName"] = "[Application] Update Selected Section SysName";
|
|
93
|
-
EApplicationActions["LoadSectionFilesPending"] = "[Application] Load Section Files Pending";
|
|
94
|
-
EApplicationActions["LoadSectionFilesSuccess"] = "[Application] Load Section Files Success";
|
|
95
|
-
EApplicationActions["LoadSectionFilesError"] = "[Application] Load Section Files Error";
|
|
96
|
-
EApplicationActions["ToggleCheckRequired"] = "[Application] Toggle Check Required";
|
|
97
|
-
EApplicationActions["UpdateCheckRequired"] = "[Application] Update Check Required";
|
|
98
|
-
EApplicationActions["LoadPreviewTemplatePending"] = "[Application] Load Preview Template Pending";
|
|
99
|
-
EApplicationActions["LoadPreviewTemplateSuccess"] = "[Application] Load Preview Template Success";
|
|
100
|
-
EApplicationActions["LoadPreviewTemplateError"] = "[Application] Load Preview Template Error";
|
|
101
|
-
EApplicationActions["CheckAllDependencyRules"] = "[Application] Check All Dependency Rule";
|
|
102
|
-
})(EApplicationActions || (EApplicationActions = {}));
|
|
103
|
-
const loadTemplatePending = createAction(EApplicationActions.LoadTemplatePending);
|
|
104
|
-
const loadTemplateSuccess = createAction(EApplicationActions.LoadTemplateSuccess, props());
|
|
105
|
-
const loadTemplateError = createAction(EApplicationActions.LoadTemplateError);
|
|
106
|
-
const loadApplicationPending = createAction(EApplicationActions.LoadApplicationPending, props());
|
|
107
|
-
const loadApplicationSuccess = createAction(EApplicationActions.LoadApplicationSuccess, props());
|
|
108
|
-
const loadApplicationError = createAction(EApplicationActions.LoadApplicationError);
|
|
109
|
-
const saveApplicationPending = createAction(EApplicationActions.SaveApplicationPending);
|
|
110
|
-
const saveApplicationSuccess = createAction(EApplicationActions.SaveApplicationSuccess);
|
|
111
|
-
const saveApplicationError = createAction(EApplicationActions.SaveApplicationError);
|
|
112
|
-
const copyApplicationPending = createAction(EApplicationActions.CopyApplicationPending, props());
|
|
113
|
-
const copyApplicationSuccess = createAction(EApplicationActions.CopyApplicationSuccess);
|
|
114
|
-
const copyApplicationError = createAction(EApplicationActions.CopyApplicationError);
|
|
115
|
-
const updateValues = createAction(EApplicationActions.UpdateValues, props());
|
|
116
|
-
const accessUpdateValues = createAction(EApplicationActions.AccessUpdateValues);
|
|
117
|
-
const saveValuesPending = createAction(EApplicationActions.SaveValuesPending);
|
|
118
|
-
const saveValuesSuccess = createAction(EApplicationActions.SaveValuesSuccess, props());
|
|
119
|
-
const saveValuesError = createAction(EApplicationActions.SaveValuesError);
|
|
120
|
-
const updateSelectedSectionSysName = createAction(EApplicationActions.UpdateSelectedSectionSysName, props());
|
|
121
|
-
const loadSectionFilesPending = createAction(EApplicationActions.LoadSectionFilesPending);
|
|
122
|
-
const loadSectionFilesSuccess = createAction(EApplicationActions.LoadSectionFilesSuccess, props());
|
|
123
|
-
const loadSectionFilesError = createAction(EApplicationActions.LoadSectionFilesError);
|
|
124
|
-
const toggleCheckRequired = createAction(EApplicationActions.ToggleCheckRequired);
|
|
125
|
-
const updateCheckRequired = createAction(EApplicationActions.UpdateCheckRequired, props());
|
|
126
|
-
const loadPreviewTemplatePending = createAction(EApplicationActions.LoadPreviewTemplatePending, props());
|
|
127
|
-
const loadPreviewTemplateSuccess = createAction(EApplicationActions.LoadPreviewTemplateSuccess, props());
|
|
128
|
-
const loadPreviewTemplateError = createAction(EApplicationActions.LoadPreviewTemplateError);
|
|
129
|
-
const checkAllDependencyRules = createAction(EApplicationActions.CheckAllDependencyRules);
|
|
130
|
-
|
|
131
|
-
var objectForm_actions = /*#__PURE__*/Object.freeze({
|
|
132
|
-
__proto__: null,
|
|
133
|
-
get EApplicationActions () { return EApplicationActions; },
|
|
134
|
-
accessUpdateValues: accessUpdateValues,
|
|
135
|
-
checkAllDependencyRules: checkAllDependencyRules,
|
|
136
|
-
copyApplicationError: copyApplicationError,
|
|
137
|
-
copyApplicationPending: copyApplicationPending,
|
|
138
|
-
copyApplicationSuccess: copyApplicationSuccess,
|
|
139
|
-
loadApplicationError: loadApplicationError,
|
|
140
|
-
loadApplicationPending: loadApplicationPending,
|
|
141
|
-
loadApplicationSuccess: loadApplicationSuccess,
|
|
142
|
-
loadPreviewTemplateError: loadPreviewTemplateError,
|
|
143
|
-
loadPreviewTemplatePending: loadPreviewTemplatePending,
|
|
144
|
-
loadPreviewTemplateSuccess: loadPreviewTemplateSuccess,
|
|
145
|
-
loadSectionFilesError: loadSectionFilesError,
|
|
146
|
-
loadSectionFilesPending: loadSectionFilesPending,
|
|
147
|
-
loadSectionFilesSuccess: loadSectionFilesSuccess,
|
|
148
|
-
loadTemplateError: loadTemplateError,
|
|
149
|
-
loadTemplatePending: loadTemplatePending,
|
|
150
|
-
loadTemplateSuccess: loadTemplateSuccess,
|
|
151
|
-
saveApplicationError: saveApplicationError,
|
|
152
|
-
saveApplicationPending: saveApplicationPending,
|
|
153
|
-
saveApplicationSuccess: saveApplicationSuccess,
|
|
154
|
-
saveValuesError: saveValuesError,
|
|
155
|
-
saveValuesPending: saveValuesPending,
|
|
156
|
-
saveValuesSuccess: saveValuesSuccess,
|
|
157
|
-
toggleCheckRequired: toggleCheckRequired,
|
|
158
|
-
updateCheckRequired: updateCheckRequired,
|
|
159
|
-
updateSelectedSectionSysName: updateSelectedSectionSysName,
|
|
160
|
-
updateValues: updateValues
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
const STATE_NAME = 'object-form';
|
|
164
|
-
|
|
165
|
-
var TemplateStatus;
|
|
166
|
-
(function (TemplateStatus) {
|
|
167
|
-
TemplateStatus[TemplateStatus["draft"] = 0] = "draft";
|
|
168
|
-
TemplateStatus[TemplateStatus["active"] = 1] = "active";
|
|
169
|
-
TemplateStatus[TemplateStatus["archived"] = 2] = "archived";
|
|
170
|
-
})(TemplateStatus || (TemplateStatus = {}));
|
|
171
|
-
const templateStatusCaption = {
|
|
172
|
-
[TemplateStatus.draft]: 'черновик',
|
|
173
|
-
[TemplateStatus.active]: 'активен',
|
|
174
|
-
[TemplateStatus.archived]: 'архив',
|
|
175
|
-
};
|
|
176
|
-
const getTemplateStatusText = (status) => {
|
|
177
|
-
return templateStatusCaption[status];
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
var ComponentSizeEnum;
|
|
181
|
-
(function (ComponentSizeEnum) {
|
|
182
|
-
ComponentSizeEnum["Large"] = "large";
|
|
183
|
-
ComponentSizeEnum["Medium"] = "medium";
|
|
184
|
-
ComponentSizeEnum["Small"] = "small";
|
|
185
|
-
})(ComponentSizeEnum || (ComponentSizeEnum = {}));
|
|
186
|
-
|
|
187
|
-
var DateFormatEnum;
|
|
188
|
-
(function (DateFormatEnum) {
|
|
189
|
-
DateFormatEnum["Day"] = "\u0434\u0434.\u043C\u043C.\u0433\u0433\u0433\u0433";
|
|
190
|
-
DateFormatEnum["Month"] = "\u043C\u043C.\u0433\u0433\u0433\u0433";
|
|
191
|
-
DateFormatEnum["Year"] = "\u0433\u0433\u0433\u0433";
|
|
192
|
-
})(DateFormatEnum || (DateFormatEnum = {}));
|
|
193
|
-
const DateFormatLabelEnum = {
|
|
194
|
-
[DateFormatEnum.Day]: 'дд.мм.гггг',
|
|
195
|
-
[DateFormatEnum.Month]: 'мм.гггг',
|
|
196
|
-
[DateFormatEnum.Year]: 'гггг',
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
var DateTypeEnum;
|
|
200
|
-
(function (DateTypeEnum) {
|
|
201
|
-
DateTypeEnum["Date"] = "date";
|
|
202
|
-
DateTypeEnum["DateTime"] = "date-time";
|
|
203
|
-
})(DateTypeEnum || (DateTypeEnum = {}));
|
|
204
|
-
const DateTypeLabelEnum = {
|
|
205
|
-
[DateTypeEnum.Date]: 'Дата',
|
|
206
|
-
[DateTypeEnum.DateTime]: 'Дата и время',
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
var InnTypeEnum;
|
|
210
|
-
(function (InnTypeEnum) {
|
|
211
|
-
InnTypeEnum["Personal"] = "personal";
|
|
212
|
-
InnTypeEnum["Legal"] = "legal";
|
|
213
|
-
InnTypeEnum["ForeignLegal"] = "foreign-legal";
|
|
214
|
-
})(InnTypeEnum || (InnTypeEnum = {}));
|
|
215
|
-
const InnTypeLabelEnum = {
|
|
216
|
-
[InnTypeEnum.Personal]: 'ФЛ/ИП',
|
|
217
|
-
[InnTypeEnum.Legal]: 'ЮЛ',
|
|
218
|
-
[InnTypeEnum.ForeignLegal]: 'Иностранное ЮЛ',
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
var InputState;
|
|
222
|
-
(function (InputState) {
|
|
223
|
-
InputState["Edit"] = "edit";
|
|
224
|
-
InputState["Auto"] = "auto";
|
|
225
|
-
InputState["Formula"] = "formula";
|
|
226
|
-
})(InputState || (InputState = {}));
|
|
227
|
-
var CustomInputStateEnum;
|
|
228
|
-
(function (CustomInputStateEnum) {
|
|
229
|
-
CustomInputStateEnum[CustomInputStateEnum["Edit"] = 0] = "Edit";
|
|
230
|
-
CustomInputStateEnum[CustomInputStateEnum["Auto"] = 1] = "Auto";
|
|
231
|
-
CustomInputStateEnum[CustomInputStateEnum["Formula"] = 2] = "Formula";
|
|
232
|
-
})(CustomInputStateEnum || (CustomInputStateEnum = {}));
|
|
233
|
-
const CustomInputStateEnumLabel = {
|
|
234
|
-
[CustomInputStateEnum.Edit]: InputState.Edit,
|
|
235
|
-
[CustomInputStateEnum.Auto]: InputState.Auto,
|
|
236
|
-
[CustomInputStateEnum.Formula]: InputState.Formula,
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
var ComponentType;
|
|
240
|
-
(function (ComponentType) {
|
|
241
|
-
ComponentType["Section"] = "section";
|
|
242
|
-
ComponentType["Group"] = "group";
|
|
243
|
-
ComponentType["InputText"] = "inputText";
|
|
244
|
-
ComponentType["InputTextarea"] = "inputTextarea";
|
|
245
|
-
ComponentType["InputSwitch"] = "inputSwitch";
|
|
246
|
-
ComponentType["InputLink"] = "inputLink";
|
|
247
|
-
ComponentType["InputSelect"] = "inputSelect";
|
|
248
|
-
ComponentType["InputNumber"] = "inputNumber";
|
|
249
|
-
ComponentType["InputDate"] = "inputDate";
|
|
250
|
-
ComponentType["InputINN"] = "inputINN";
|
|
251
|
-
ComponentType["InputFile"] = "inputFile";
|
|
252
|
-
ComponentType["InputPhone"] = "inputPhone";
|
|
253
|
-
ComponentType["InputCheckboxGroup"] = "inputCheckboxGroup";
|
|
254
|
-
ComponentType["InputRadioGroup"] = "inputRadioGroup";
|
|
255
|
-
ComponentType["InputTable"] = "inputTable";
|
|
256
|
-
ComponentType["ContentTitle"] = "title";
|
|
257
|
-
ComponentType["ContentText"] = "text";
|
|
258
|
-
ComponentType["ContentTooltip"] = "tooltip";
|
|
259
|
-
ComponentType["ContentFile"] = "file";
|
|
260
|
-
ComponentType["ContentDivider"] = "divider";
|
|
261
|
-
})(ComponentType || (ComponentType = {}));
|
|
262
|
-
const ComponentShortType = {
|
|
263
|
-
[ComponentType.Section]: 's',
|
|
264
|
-
[ComponentType.Group]: 'g',
|
|
265
|
-
[ComponentType.InputText]: 'itt',
|
|
266
|
-
[ComponentType.InputTextarea]: 'ita',
|
|
267
|
-
[ComponentType.InputSwitch]: 'isw',
|
|
268
|
-
[ComponentType.InputLink]: 'il',
|
|
269
|
-
[ComponentType.InputSelect]: 'ist',
|
|
270
|
-
[ComponentType.InputNumber]: 'in',
|
|
271
|
-
[ComponentType.InputDate]: 'id',
|
|
272
|
-
[ComponentType.InputINN]: 'inn',
|
|
273
|
-
[ComponentType.InputFile]: 'if',
|
|
274
|
-
[ComponentType.InputPhone]: 'ip',
|
|
275
|
-
[ComponentType.InputCheckboxGroup]: 'icg',
|
|
276
|
-
[ComponentType.InputRadioGroup]: 'irg',
|
|
277
|
-
[ComponentType.InputTable]: 'itb',
|
|
278
|
-
[ComponentType.ContentTitle]: 'ct',
|
|
279
|
-
[ComponentType.ContentText]: 'ctt',
|
|
280
|
-
[ComponentType.ContentTooltip]: 'ctp',
|
|
281
|
-
[ComponentType.ContentFile]: 'cf',
|
|
282
|
-
[ComponentType.ContentDivider]: 'cd',
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
var ValueType;
|
|
286
|
-
(function (ValueType) {
|
|
287
|
-
ValueType["Undefined"] = "undefined";
|
|
288
|
-
ValueType["Short"] = "short";
|
|
289
|
-
ValueType["Int"] = "int";
|
|
290
|
-
ValueType["Long"] = "long";
|
|
291
|
-
ValueType["Float"] = "float";
|
|
292
|
-
ValueType["Double"] = "double";
|
|
293
|
-
ValueType["Decimal"] = "decimal";
|
|
294
|
-
ValueType["String"] = "string";
|
|
295
|
-
ValueType["Guid"] = "guid";
|
|
296
|
-
ValueType["DateTime"] = "dateTime";
|
|
297
|
-
ValueType["Boolean"] = "boolean";
|
|
298
|
-
ValueType["IntArray"] = "int[]";
|
|
299
|
-
ValueType["StringArray"] = "string[]";
|
|
300
|
-
ValueType["GuidArray"] = "guid[]";
|
|
301
|
-
})(ValueType || (ValueType = {}));
|
|
302
|
-
|
|
303
|
-
var ConditionOperatorType;
|
|
304
|
-
(function (ConditionOperatorType) {
|
|
305
|
-
ConditionOperatorType["undefined"] = "undefined";
|
|
306
|
-
ConditionOperatorType["filled"] = "filled";
|
|
307
|
-
})(ConditionOperatorType || (ConditionOperatorType = {}));
|
|
308
|
-
const getConditionOperatorsList = () => {
|
|
309
|
-
return [{
|
|
310
|
-
value: ConditionOperatorType.filled,
|
|
311
|
-
text: conditionOperatorTypeLabel[ConditionOperatorType.filled]
|
|
312
|
-
}];
|
|
313
|
-
};
|
|
314
|
-
const conditionOperatorTypeLabel = {
|
|
315
|
-
[ConditionOperatorType.filled]: 'заполнено'
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
var LogicalOperatorType;
|
|
319
|
-
(function (LogicalOperatorType) {
|
|
320
|
-
LogicalOperatorType["undefined"] = "undefined";
|
|
321
|
-
LogicalOperatorType["or"] = "or";
|
|
322
|
-
LogicalOperatorType["and"] = "and";
|
|
323
|
-
})(LogicalOperatorType || (LogicalOperatorType = {}));
|
|
324
|
-
|
|
325
|
-
var DependenceActionType;
|
|
326
|
-
(function (DependenceActionType) {
|
|
327
|
-
DependenceActionType["undefined"] = "undefined";
|
|
328
|
-
DependenceActionType["show"] = "show";
|
|
329
|
-
})(DependenceActionType || (DependenceActionType = {}));
|
|
330
|
-
const getDependenceActionsList = () => {
|
|
331
|
-
return [{
|
|
332
|
-
value: DependenceActionType.show,
|
|
333
|
-
text: 'показать'
|
|
334
|
-
}];
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
var TemplateComponentsGroupTypeEnum;
|
|
338
|
-
(function (TemplateComponentsGroupTypeEnum) {
|
|
339
|
-
TemplateComponentsGroupTypeEnum[TemplateComponentsGroupTypeEnum["Components"] = 1] = "Components";
|
|
340
|
-
TemplateComponentsGroupTypeEnum[TemplateComponentsGroupTypeEnum["Content"] = 2] = "Content";
|
|
341
|
-
})(TemplateComponentsGroupTypeEnum || (TemplateComponentsGroupTypeEnum = {}));
|
|
342
|
-
const TemplateComponentsGroupTypeLabels = {
|
|
343
|
-
[TemplateComponentsGroupTypeEnum.Components]: 'Поля',
|
|
344
|
-
[TemplateComponentsGroupTypeEnum.Content]: 'Контент',
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
const getDependenceRulesResults = (currentResults, allValues, changedValue, rules) => {
|
|
348
|
-
if (!rules) {
|
|
349
|
-
return currentResults;
|
|
350
|
-
}
|
|
351
|
-
const actualValues = allValues.map(sectionVal => {
|
|
352
|
-
return getUpdatedValues(sectionVal, Array.isArray(changedValue) ? changedValue : [changedValue]);
|
|
353
|
-
});
|
|
354
|
-
const rulesResults = rules
|
|
355
|
-
.filter(x => containsConditionValue(x.conditions, changedValue))
|
|
356
|
-
.map(rule => {
|
|
357
|
-
return checkDependenceRule(rule, actualValues);
|
|
358
|
-
}).flat();
|
|
359
|
-
const shallowCopy = currentResults.map(result => {
|
|
360
|
-
const idx = rulesResults.findIndex(x => x.sysName === result.sysName);
|
|
361
|
-
if (idx !== -1) {
|
|
362
|
-
const newResult = rulesResults[idx];
|
|
363
|
-
rulesResults.splice(idx, 1);
|
|
364
|
-
return newResult;
|
|
365
|
-
}
|
|
366
|
-
return { ...result };
|
|
367
|
-
});
|
|
368
|
-
if (!!rulesResults.length) {
|
|
369
|
-
shallowCopy.push(...rulesResults);
|
|
370
|
-
}
|
|
371
|
-
return shallowCopy;
|
|
372
|
-
};
|
|
373
|
-
const checkDependenceRule = (rule, values) => {
|
|
374
|
-
const result = [];
|
|
375
|
-
const conditionResult = checkConditionResult({
|
|
376
|
-
conditions: rule.conditions,
|
|
377
|
-
type: LogicalOperatorType.and,
|
|
378
|
-
groups: []
|
|
379
|
-
}, values);
|
|
380
|
-
rule.acceptors.forEach(x => {
|
|
381
|
-
result.push({
|
|
382
|
-
sysName: x.s,
|
|
383
|
-
actionType: rule.actionType,
|
|
384
|
-
conditionResult
|
|
385
|
-
});
|
|
386
|
-
});
|
|
387
|
-
return result;
|
|
388
|
-
};
|
|
389
|
-
const getValuesToClean = (results) => {
|
|
390
|
-
const result = [];
|
|
391
|
-
results.forEach(res => {
|
|
392
|
-
switch (res.actionType) {
|
|
393
|
-
case DependenceActionType.show:
|
|
394
|
-
if (!res.conditionResult) {
|
|
395
|
-
result.push(res.sysName);
|
|
396
|
-
}
|
|
397
|
-
break;
|
|
398
|
-
default:
|
|
399
|
-
break;
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
return result;
|
|
403
|
-
};
|
|
404
|
-
const checkConditionResult = (group, values) => {
|
|
405
|
-
let result = group.type === LogicalOperatorType.and;
|
|
406
|
-
const appendResult = (newResult) => {
|
|
407
|
-
if (group.type === LogicalOperatorType.and) {
|
|
408
|
-
result = result && newResult;
|
|
409
|
-
}
|
|
410
|
-
else if (group.type === LogicalOperatorType.or) {
|
|
411
|
-
result = result || newResult;
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
group.conditions.forEach(x => {
|
|
415
|
-
appendResult(calculateCondition(x, getValuesRecursive(x.field.s, values)));
|
|
416
|
-
});
|
|
417
|
-
group.groups?.forEach(g => {
|
|
418
|
-
appendResult(checkConditionResult(g, values));
|
|
419
|
-
});
|
|
420
|
-
return result;
|
|
421
|
-
};
|
|
422
|
-
const calculateCondition = (condition, value) => {
|
|
423
|
-
switch (condition.operator) {
|
|
424
|
-
case ConditionOperatorType.filled:
|
|
425
|
-
return !!value?.value;
|
|
426
|
-
default:
|
|
427
|
-
break;
|
|
428
|
-
}
|
|
429
|
-
return false;
|
|
430
|
-
};
|
|
431
|
-
// TODO переделать на группу
|
|
432
|
-
const containsConditionValue = (conditions, value) => {
|
|
433
|
-
const val = Array.isArray(value) ? value : [value];
|
|
434
|
-
return conditions.some(s => val.some(v => v.sysName === s.field?.s));
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
const getMenuModel = (settings, sectionValues, applicationId) => {
|
|
438
|
-
return {
|
|
439
|
-
items: settings?.sections.map((section) => {
|
|
440
|
-
return {
|
|
441
|
-
title: section.options.title || '',
|
|
442
|
-
routerLink: `/form/application/${applicationId}/${section.sysName}`,
|
|
443
|
-
type: 'default',
|
|
444
|
-
params: {
|
|
445
|
-
percent: getPercentForSection(section, sectionValues)
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
}) || []
|
|
449
|
-
};
|
|
450
|
-
};
|
|
451
|
-
const getPreviewMenuModel = (settings, templateSysName) => {
|
|
452
|
-
return {
|
|
453
|
-
items: settings?.sections.map((section) => {
|
|
454
|
-
return {
|
|
455
|
-
title: section.options.title || '',
|
|
456
|
-
routerLink: `/form/application/preview/${templateSysName}/${section.sysName}`,
|
|
457
|
-
type: 'default',
|
|
458
|
-
};
|
|
459
|
-
}) || []
|
|
460
|
-
};
|
|
461
|
-
};
|
|
462
|
-
|
|
463
|
-
const getPercentForSection = (section, sectionValues) => {
|
|
464
|
-
return sectionValues.find(s => s.sysName === section.sysName)?.percent || 0;
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
const getUpdatedValues = (section, values, valuesToReset = []) => {
|
|
468
|
-
return section.values ? { ...section, values: recursiveChangeValue(section.values, values, valuesToReset) } : section;
|
|
469
|
-
};
|
|
470
|
-
const recursiveChangeValue = (sectionValues, values, valuesToReset) => {
|
|
471
|
-
return sectionValues.map((v) => {
|
|
472
|
-
const findValue = values.find(val => val.sysName === v.sysName);
|
|
473
|
-
const valMustBeReseted = valuesToReset.some(x => x === v.sysName);
|
|
474
|
-
if (findValue) {
|
|
475
|
-
if (valMustBeReseted) {
|
|
476
|
-
findValue.value = null;
|
|
477
|
-
}
|
|
478
|
-
return findValue;
|
|
479
|
-
}
|
|
480
|
-
else {
|
|
481
|
-
if (v.type === ComponentType.Group) {
|
|
482
|
-
return { ...v, values: recursiveChangeValue(v.values || [], values, valuesToReset) };
|
|
483
|
-
}
|
|
484
|
-
else {
|
|
485
|
-
return { ...v, value: valMustBeReseted ? null : v?.value };
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
});
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
const defaultValueModel = (c, defaultValue = '') => {
|
|
492
|
-
return { sysName: c.sysName, type: c.type, valueType: c.valueType, value: defaultValue };
|
|
493
|
-
};
|
|
494
|
-
const getValueModel = (settings, values) => {
|
|
495
|
-
switch (settings.type) {
|
|
496
|
-
case ComponentType.InputDate:
|
|
497
|
-
const settingsCopy = settings;
|
|
498
|
-
if (settingsCopy.options.range) {
|
|
499
|
-
const modelStart = getValuesRecursive(settings.sysName + '_start', values);
|
|
500
|
-
const modelEnd = getValuesRecursive(settings.sysName + '_end', values);
|
|
501
|
-
return [modelStart, modelEnd];
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
return getValuesRecursive(settings.sysName, values);
|
|
505
|
-
}
|
|
506
|
-
default:
|
|
507
|
-
return getValuesRecursive(settings.sysName, values);
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
const getValuesRecursive = (sysName, values) => {
|
|
511
|
-
const condition = values.find(m => m.sysName === sysName) || null;
|
|
512
|
-
if (!!condition) {
|
|
513
|
-
return condition;
|
|
514
|
-
}
|
|
515
|
-
if (values.length) {
|
|
516
|
-
for (let idx = 0; idx < values.length; idx++) {
|
|
517
|
-
const model = values[idx];
|
|
518
|
-
if ('values' in model) {
|
|
519
|
-
const value = getValuesRecursive(sysName, model.values || []);
|
|
520
|
-
if (!!value) {
|
|
521
|
-
return value;
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return null;
|
|
527
|
-
};
|
|
528
|
-
|
|
529
|
-
const objectFeature = createFeatureSelector(STATE_NAME);
|
|
530
|
-
const selectIsLoading = createSelector(objectFeature, (state) => state.isLoading);
|
|
531
|
-
const selectIsObjectSaveLoading = createSelector(objectFeature, (state) => state.isObjectSaveLoading);
|
|
532
|
-
const selectIsEdited = createSelector(objectFeature, (state) => state.isEdited);
|
|
533
|
-
const selectIsCheckRequired = createSelector(objectFeature, (state) => state.isCheckRequired);
|
|
534
|
-
const selectMenuModel = createSelector(objectFeature, (state) => state.menuModel);
|
|
535
|
-
const selectSectionSettings = createSelector(objectFeature, selectRouteNestedParam('sectionSysName'), (state, sectionSysName) => {
|
|
536
|
-
return state.settings?.sections.find(s => s.sysName === sectionSysName) || null;
|
|
537
|
-
});
|
|
538
|
-
const selectSectionValues = createSelector(objectFeature, (state) => state.sectionValues);
|
|
539
|
-
const selectObjectId = createSelector(selectRouteNestedParam('objectId'), (applicationId) => applicationId);
|
|
540
|
-
const selectSectionFiles = createSelector(objectFeature, (state) => state.sectionFiles);
|
|
541
|
-
const selectTemplateSysName = createSelector(objectFeature, (state) => state.settings?.sysName);
|
|
542
|
-
const selectValueModel = (settings) => createSelector(objectFeature, (state) => getValueModel(settings, state.sectionValues));
|
|
543
|
-
const selectDependencyRulesResults = createSelector(objectFeature, state => state.dependencyRuleCheckResults);
|
|
544
|
-
|
|
545
|
-
var objectForm_selector = /*#__PURE__*/Object.freeze({
|
|
546
|
-
__proto__: null,
|
|
547
|
-
selectDependencyRulesResults: selectDependencyRulesResults,
|
|
548
|
-
selectIsCheckRequired: selectIsCheckRequired,
|
|
549
|
-
selectIsEdited: selectIsEdited,
|
|
550
|
-
selectIsLoading: selectIsLoading,
|
|
551
|
-
selectIsObjectSaveLoading: selectIsObjectSaveLoading,
|
|
552
|
-
selectMenuModel: selectMenuModel,
|
|
553
|
-
selectObjectId: selectObjectId,
|
|
554
|
-
selectSectionFiles: selectSectionFiles,
|
|
555
|
-
selectSectionSettings: selectSectionSettings,
|
|
556
|
-
selectSectionValues: selectSectionValues,
|
|
557
|
-
selectTemplateSysName: selectTemplateSysName,
|
|
558
|
-
selectValueModel: selectValueModel
|
|
559
|
-
});
|
|
560
|
-
|
|
561
|
-
const initialObjectFormState = {
|
|
562
|
-
isLoading: false,
|
|
563
|
-
isEdited: false,
|
|
564
|
-
isCheckRequired: false,
|
|
565
|
-
isObjectSaveLoading: false,
|
|
566
|
-
settings: null,
|
|
567
|
-
selectedSectionSysName: null,
|
|
568
|
-
sectionValues: [],
|
|
569
|
-
menuModel: {
|
|
570
|
-
items: []
|
|
571
|
-
},
|
|
572
|
-
sectionFiles: [],
|
|
573
|
-
dependencyRuleCheckResults: []
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
const objectReducerCreator = createReducer(initialObjectFormState, on(loadApplicationPending, (state) => {
|
|
577
|
-
return { ...state, isLoading: true };
|
|
578
|
-
}), on(loadApplicationSuccess, (state, { templateSettings, sectionValues, applicationId, isDraft }) => {
|
|
579
|
-
return {
|
|
580
|
-
...state,
|
|
581
|
-
isLoading: false,
|
|
582
|
-
settings: templateSettings,
|
|
583
|
-
sectionValues: sectionValues,
|
|
584
|
-
isEdited: isDraft,
|
|
585
|
-
menuModel: getMenuModel(templateSettings, sectionValues, applicationId)
|
|
586
|
-
};
|
|
587
|
-
}), on(loadApplicationError, (state) => {
|
|
588
|
-
return { ...state, isLoading: false };
|
|
589
|
-
}), on(updateValues, (state, { value }) => {
|
|
590
|
-
const dependenceRulesResults = getDependenceRulesResults(state.dependencyRuleCheckResults, state.sectionValues, value, state.settings?.dependenceRules.rules);
|
|
591
|
-
const selectedSectionValues = state.sectionValues.map((sectionValue) => {
|
|
592
|
-
// пришлось отказаться от условия проверки выбранной секции,
|
|
593
|
-
// т.к. зависимые поля могут находиться в других секциях, а их необходимо обнулять.
|
|
594
|
-
return getUpdatedValues(sectionValue, Array.isArray(value) ? value : [value], getValuesToClean(dependenceRulesResults));
|
|
595
|
-
});
|
|
596
|
-
return {
|
|
597
|
-
...state,
|
|
598
|
-
sectionValues: selectedSectionValues,
|
|
599
|
-
isEdited: true,
|
|
600
|
-
dependencyRuleCheckResults: dependenceRulesResults
|
|
601
|
-
};
|
|
602
|
-
}), on(saveValuesSuccess, (state, { result, applicationId }) => {
|
|
603
|
-
const updatedSectionValues = state.sectionValues.map((sectionValue) => {
|
|
604
|
-
const section = {
|
|
605
|
-
...sectionValue,
|
|
606
|
-
percent: result.fillness.find(x => x.name === sectionValue.sysName)?.percent || 0
|
|
607
|
-
};
|
|
608
|
-
return getUpdatedValues(section, result.values);
|
|
609
|
-
});
|
|
610
|
-
return {
|
|
611
|
-
...state,
|
|
612
|
-
sectionValues: updatedSectionValues,
|
|
613
|
-
isEdited: true,
|
|
614
|
-
menuModel: getMenuModel(state.settings, updatedSectionValues, applicationId)
|
|
615
|
-
};
|
|
616
|
-
}), on(saveValuesError, (state) => {
|
|
617
|
-
return { ...state };
|
|
618
|
-
}), on(saveApplicationPending, (state) => {
|
|
619
|
-
return { ...state, isApplicationSaveLoading: true };
|
|
620
|
-
}), on(saveApplicationSuccess, (state) => {
|
|
621
|
-
return { ...state, isApplicationSaveLoading: false, isEdited: false };
|
|
622
|
-
}), on(saveApplicationError, (state) => {
|
|
623
|
-
return { ...state, isApplicationSaveLoading: false };
|
|
624
|
-
}), on(updateSelectedSectionSysName, (state, { sectionSysName }) => {
|
|
625
|
-
return { ...state, selectedSectionSysName: sectionSysName };
|
|
626
|
-
}), on(loadSectionFilesPending, (state) => {
|
|
627
|
-
return { ...state, sectionFiles: [] };
|
|
628
|
-
}), on(loadSectionFilesSuccess, (state, { sectionFiles }) => {
|
|
629
|
-
return { ...state, sectionFiles: sectionFiles };
|
|
630
|
-
}), on(toggleCheckRequired, (state) => {
|
|
631
|
-
return { ...state, isCheckRequired: !state.isCheckRequired };
|
|
632
|
-
}), on(updateCheckRequired, (state, { isCheckRequired }) => {
|
|
633
|
-
return { ...state, isCheckRequired: isCheckRequired };
|
|
634
|
-
}), on(loadPreviewTemplatePending, (state) => {
|
|
635
|
-
return { ...state, isLoading: true };
|
|
636
|
-
}), on(loadPreviewTemplateSuccess, (state, { templateSettings, templateSysName }) => {
|
|
637
|
-
return {
|
|
638
|
-
...state,
|
|
639
|
-
isLoading: false,
|
|
640
|
-
settings: templateSettings,
|
|
641
|
-
menuModel: getPreviewMenuModel(templateSettings, templateSysName)
|
|
642
|
-
};
|
|
643
|
-
}), on(loadPreviewTemplateError, (state) => {
|
|
644
|
-
return { ...state, isLoading: false };
|
|
645
|
-
}), on(checkAllDependencyRules, (state) => {
|
|
646
|
-
const dependenceResults = state.settings?.dependenceRules.rules
|
|
647
|
-
.map((rule) => (checkDependenceRule(rule, state.sectionValues)))
|
|
648
|
-
.flat() || [];
|
|
649
|
-
return { ...state, dependencyRuleCheckResults: dependenceResults };
|
|
650
|
-
}));
|
|
651
|
-
function objectReducer(state, action) {
|
|
652
|
-
return objectReducerCreator(state, action);
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
const tokenKey = 'Csy-Token';
|
|
656
|
-
const eTag = "ETag";
|
|
657
|
-
const ifMatch = "If-Match";
|
|
658
|
-
class ConcurrencyStoreService {
|
|
659
|
-
constructor() {
|
|
660
|
-
this._store = {};
|
|
661
|
-
}
|
|
662
|
-
get(key) {
|
|
663
|
-
const info = this._store[key];
|
|
664
|
-
if (!info) {
|
|
665
|
-
return null;
|
|
666
|
-
}
|
|
667
|
-
return info;
|
|
668
|
-
}
|
|
669
|
-
set(key, info) {
|
|
670
|
-
this._store[key] = info;
|
|
671
|
-
}
|
|
672
|
-
getHeaders(key) {
|
|
673
|
-
let headers = new HttpHeaders();
|
|
674
|
-
if (key) {
|
|
675
|
-
const info = this.get(key);
|
|
676
|
-
if (info?.token) {
|
|
677
|
-
headers = headers.append(tokenKey, info.token);
|
|
678
|
-
}
|
|
679
|
-
if (info?.eTag) {
|
|
680
|
-
headers = headers.append(ifMatch, info.eTag);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
return { headers: headers, observe: 'response' };
|
|
684
|
-
}
|
|
685
|
-
appendHeaders(key, headers) {
|
|
686
|
-
if (key) {
|
|
687
|
-
const info = this.get(key);
|
|
688
|
-
if (info?.token) {
|
|
689
|
-
headers = headers.set(tokenKey, info.token);
|
|
690
|
-
}
|
|
691
|
-
if (info?.eTag) {
|
|
692
|
-
headers = headers.set(ifMatch, info.eTag);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
return headers;
|
|
696
|
-
}
|
|
697
|
-
fromHeaders(key, response) {
|
|
698
|
-
if (key) {
|
|
699
|
-
const info = {
|
|
700
|
-
token: response.headers.get(tokenKey),
|
|
701
|
-
eTag: response.headers.get(eTag)
|
|
702
|
-
};
|
|
703
|
-
if (info.token || info.eTag) {
|
|
704
|
-
this.set(key, info);
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
709
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyStoreService }); }
|
|
710
|
-
}
|
|
711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyStoreService, decorators: [{
|
|
712
|
-
type: Injectable
|
|
713
|
-
}] });
|
|
714
|
-
|
|
715
|
-
class ObjectFormService {
|
|
716
|
-
constructor() {
|
|
717
|
-
this._http = inject(HttpClient);
|
|
718
|
-
this._concurrencyService = inject(ConcurrencyStoreService);
|
|
719
|
-
this._concurrencyKey = 'application-values';
|
|
720
|
-
}
|
|
721
|
-
get apiUrl() {
|
|
722
|
-
return '/form/api/v2';
|
|
723
|
-
}
|
|
724
|
-
getTemplate(applicationId) {
|
|
725
|
-
return this._http.get(`${this.apiUrl}/application/${applicationId}/params`);
|
|
726
|
-
}
|
|
727
|
-
getSectionValues(applicationId) {
|
|
728
|
-
return this._http
|
|
729
|
-
.get(`${this.apiUrl}/application/${applicationId}`, this.getHeaders())
|
|
730
|
-
.pipe(map(this.mapResult.bind(this)));
|
|
731
|
-
}
|
|
732
|
-
getTemplateSettings(templateSysName) {
|
|
733
|
-
return this._http.get(`${this.apiUrl}/template/settings/${templateSysName}`);
|
|
734
|
-
}
|
|
735
|
-
updateApplicationValues(applicationId, sectionValues) {
|
|
736
|
-
return this._http
|
|
737
|
-
.put(`${this.apiUrl}/application/${applicationId}`, { sectionValues }, this.getHeaders())
|
|
738
|
-
.pipe(map(this.mapResult.bind(this)));
|
|
739
|
-
}
|
|
740
|
-
saveApplication(applicationId) {
|
|
741
|
-
return this._http
|
|
742
|
-
.post(`${this.apiUrl}/application/${applicationId}/save`, null, this.getHeaders())
|
|
743
|
-
.pipe(map(this.mapResult.bind(this)));
|
|
744
|
-
}
|
|
745
|
-
copyApplication(copyCommand) {
|
|
746
|
-
return this._http.post(`${this.apiUrl}/application/copy`, copyCommand);
|
|
747
|
-
}
|
|
748
|
-
getSectionFiles(applicationId, sectionSysName) {
|
|
749
|
-
return this._http
|
|
750
|
-
.get(`${this.apiUrl}/application/${applicationId}/${sectionSysName}/files`, this.getHeaders())
|
|
751
|
-
.pipe(map(this.mapResult.bind(this)));
|
|
752
|
-
}
|
|
753
|
-
getHeaders() {
|
|
754
|
-
return this._concurrencyService.getHeaders(this._concurrencyKey);
|
|
755
|
-
}
|
|
756
|
-
mapResult(resp) {
|
|
757
|
-
this._concurrencyService.fromHeaders(this._concurrencyKey, resp);
|
|
758
|
-
return resp.body;
|
|
759
|
-
}
|
|
760
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
761
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormService }); }
|
|
762
|
-
}
|
|
763
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormService, decorators: [{
|
|
764
|
-
type: Injectable
|
|
765
|
-
}] });
|
|
766
|
-
|
|
767
|
-
class ObjectFormEffects {
|
|
768
|
-
constructor(_actions$, _store, _router, _applicationService, _toasterService) {
|
|
769
|
-
this._actions$ = _actions$;
|
|
770
|
-
this._store = _store;
|
|
771
|
-
this._router = _router;
|
|
772
|
-
this._applicationService = _applicationService;
|
|
773
|
-
this._toasterService = _toasterService;
|
|
774
|
-
this._autoSaveStore = inject(AutoSaveStore);
|
|
775
|
-
this.loadTemplatePending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.LoadTemplatePending), withLatestFrom(this._store.select(selectRouteNestedParam('objectId')), this._store.select(selectRouteNestedParam('templateSysName'))), switchMap(([_, applicationId, templateSysName]) => {
|
|
776
|
-
if (applicationId) {
|
|
777
|
-
return this._applicationService.getTemplate(applicationId).pipe(switchMap(({ templateSysName }) => ([
|
|
778
|
-
loadTemplateSuccess({ templateSysName }),
|
|
779
|
-
loadApplicationPending({ templateSysName })
|
|
780
|
-
])), catchError(() => {
|
|
781
|
-
return of(loadTemplateError());
|
|
782
|
-
}));
|
|
783
|
-
}
|
|
784
|
-
else {
|
|
785
|
-
return of(loadPreviewTemplatePending({ templateSysName }));
|
|
786
|
-
}
|
|
787
|
-
})));
|
|
788
|
-
this.loadPreviewTemplatePending = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.LoadPreviewTemplatePending), map((props) => props.templateSysName), withLatestFrom(this._store.select(selectRouteNestedParam('sectionSysName'))), switchMap(([templateSysName, sectionSysName]) => {
|
|
789
|
-
return this._applicationService.getTemplateSettings(templateSysName).pipe(map((templateSettings) => {
|
|
790
|
-
const activeSection = templateSettings.sections.find((s) => s.sysName === sectionSysName);
|
|
791
|
-
if (!activeSection && templateSettings.sections.length) {
|
|
792
|
-
this._router.navigate([`/form/application/preview/${templateSysName}/${templateSettings.sections[0].sysName}`]);
|
|
793
|
-
}
|
|
794
|
-
return loadPreviewTemplateSuccess({ templateSettings, templateSysName });
|
|
795
|
-
}), catchError((error) => {
|
|
796
|
-
return of(loadPreviewTemplateError());
|
|
797
|
-
}));
|
|
798
|
-
})));
|
|
799
|
-
this.loadApplicationPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.LoadApplicationPending), map((props) => props.templateSysName), withLatestFrom(this._store.select(selectRouteNestedParam('objectId')), this._store.select(selectRouteNestedParam('sectionSysName'))), switchMap(([templateSysName, applicationId, sectionSysName]) => {
|
|
800
|
-
const requests = [
|
|
801
|
-
this._applicationService.getTemplateSettings(templateSysName),
|
|
802
|
-
this._applicationService.getSectionValues(applicationId)
|
|
803
|
-
];
|
|
804
|
-
return forkJoin(requests).pipe(switchMap(([templateSettings, valueDto]) => {
|
|
805
|
-
const activeSection = templateSettings.sections.find((s) => s.sysName === sectionSysName);
|
|
806
|
-
if (!activeSection && templateSettings.sections.length) {
|
|
807
|
-
this._router.navigate([`/form/application/${applicationId}/${templateSettings.sections[0].sysName}`]);
|
|
808
|
-
}
|
|
809
|
-
return [
|
|
810
|
-
loadApplicationSuccess({
|
|
811
|
-
templateSettings: templateSettings,
|
|
812
|
-
sectionValues: valueDto.value.sectionValues,
|
|
813
|
-
applicationId: applicationId,
|
|
814
|
-
isDraft: valueDto.isDraft
|
|
815
|
-
}),
|
|
816
|
-
checkAllDependencyRules()
|
|
817
|
-
];
|
|
818
|
-
}), catchError(() => {
|
|
819
|
-
return of(loadApplicationError());
|
|
820
|
-
}));
|
|
821
|
-
})));
|
|
822
|
-
this.checkCanUpdateValues$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.UpdateValues), map((props) => props.value), distinctUntilChanged(), withLatestFrom(this._store.select(selectRouteNestedParam('templateSysName'))), tap(([value, templateSysName]) => {
|
|
823
|
-
if (templateSysName) {
|
|
824
|
-
return;
|
|
825
|
-
}
|
|
826
|
-
this._store.dispatch(accessUpdateValues());
|
|
827
|
-
})), { dispatch: false });
|
|
828
|
-
this.saveValuesDebounced$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.AccessUpdateValues), distinctUntilChanged(), debounceTime(1500), tap(() => {
|
|
829
|
-
this._autoSaveStore.start();
|
|
830
|
-
this._store.dispatch(saveValuesPending());
|
|
831
|
-
})), { dispatch: false });
|
|
832
|
-
this.updateApplicationValues$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.SaveValuesPending), withLatestFrom(this._store.select(selectRouteNestedParam('objectId')), this._store.select(selectSectionValues)), switchMap(([_, applicationId, sectionValues]) => {
|
|
833
|
-
return this._applicationService.updateApplicationValues(applicationId, sectionValues).pipe(map((result) => {
|
|
834
|
-
this._autoSaveStore.success();
|
|
835
|
-
return saveValuesSuccess({ result, applicationId });
|
|
836
|
-
}), catchError((error) => {
|
|
837
|
-
this._autoSaveStore.error();
|
|
838
|
-
return of(saveValuesError());
|
|
839
|
-
}));
|
|
840
|
-
})));
|
|
841
|
-
this.saveApplicationPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.SaveApplicationPending), withLatestFrom(this._store.select(selectRouteNestedParam('objectId'))), switchMap(([_, applicationId]) => {
|
|
842
|
-
return this._applicationService.saveApplication(applicationId).pipe(map(() => {
|
|
843
|
-
this._toasterService.show({
|
|
844
|
-
title: 'Сохранено успешно',
|
|
845
|
-
type: ToasterType.Positive
|
|
846
|
-
});
|
|
847
|
-
return saveApplicationSuccess();
|
|
848
|
-
}), catchError(() => {
|
|
849
|
-
this._toasterService.show({
|
|
850
|
-
title: 'Возникли ошибки при сохранении, повторите',
|
|
851
|
-
type: ToasterType.Negative
|
|
852
|
-
});
|
|
853
|
-
return of(saveApplicationError());
|
|
854
|
-
}));
|
|
855
|
-
})));
|
|
856
|
-
this.copyApplicationPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.CopyApplicationPending), map((action) => action), switchMap((action) => {
|
|
857
|
-
return this._applicationService.copyApplication(action).pipe(map((result) => {
|
|
858
|
-
this._toasterService.show({
|
|
859
|
-
title: 'Копировнаие прошло успешно',
|
|
860
|
-
type: ToasterType.Positive
|
|
861
|
-
});
|
|
862
|
-
window.open('/form/application/' + result.id, '_blank');
|
|
863
|
-
return copyApplicationSuccess();
|
|
864
|
-
}), catchError(() => {
|
|
865
|
-
this._toasterService.show({
|
|
866
|
-
title: 'Возникли ошибки при копировании заявки, повторите',
|
|
867
|
-
type: ToasterType.Negative
|
|
868
|
-
});
|
|
869
|
-
return of(copyApplicationError());
|
|
870
|
-
}));
|
|
871
|
-
})), { dispatch: false });
|
|
872
|
-
this.loadSectionFilesPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions.LoadSectionFilesPending), withLatestFrom(this._store.select(selectRouteNestedParam('objectId')), this._store.select(selectRouteNestedParam('sectionSysName'))), switchMap(([_, applicationId, sectionSysName]) => {
|
|
873
|
-
return this._applicationService.getSectionFiles(applicationId, sectionSysName).pipe(map((sectionFiles) => {
|
|
874
|
-
return loadSectionFilesSuccess({ sectionFiles: sectionFiles });
|
|
875
|
-
}), catchError(() => {
|
|
876
|
-
return of(loadSectionFilesError());
|
|
877
|
-
}));
|
|
878
|
-
})));
|
|
879
|
-
}
|
|
880
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormEffects, deps: [{ token: i1.Actions }, { token: i2.Store }, { token: i3.Router }, { token: ObjectFormService }, { token: i1$1.ToasterService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
881
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormEffects }); }
|
|
882
|
-
}
|
|
883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormEffects, decorators: [{
|
|
884
|
-
type: Injectable
|
|
885
|
-
}], ctorParameters: () => [{ type: i1.Actions }, { type: i2.Store }, { type: i3.Router }, { type: ObjectFormService }, { type: i1$1.ToasterService }] });
|
|
886
|
-
|
|
887
|
-
class ObjectFormComponent {
|
|
888
|
-
constructor() {
|
|
889
|
-
this._store = inject(Store);
|
|
890
|
-
this._subscriptions$ = [];
|
|
891
|
-
this.isLoading$ = this._store.select(selectIsLoading);
|
|
892
|
-
this.menuModel$ = this._store.select(selectMenuModel);
|
|
893
|
-
}
|
|
894
|
-
ngOnInit() {
|
|
895
|
-
this._store.dispatch(loadTemplatePending());
|
|
896
|
-
this._subscriptions$.push(this._store.select(selectRouteNestedParam('sectionSysName')).pipe(withLatestFrom(this._store.select(selectRouteNestedParam('templateSysName')))).subscribe(([sectionSysName, templateSysName]) => {
|
|
897
|
-
this._store.dispatch(updateSelectedSectionSysName({ sectionSysName }));
|
|
898
|
-
if (sectionSysName && !templateSysName) {
|
|
899
|
-
this._store.dispatch(loadSectionFilesPending());
|
|
900
|
-
}
|
|
901
|
-
}));
|
|
902
|
-
}
|
|
903
|
-
ngOnDestroy() {
|
|
904
|
-
this._subscriptions$.forEach((subscription) => subscription.unsubscribe());
|
|
905
|
-
}
|
|
906
|
-
showProgress(item) {
|
|
907
|
-
return !!(item?.params?.['percent'] || item?.params?.['percent'] === 0);
|
|
908
|
-
}
|
|
909
|
-
getDashArray(item) {
|
|
910
|
-
return 57 / 100 * item?.params?.['percent'] + 60;
|
|
911
|
-
}
|
|
912
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
913
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ObjectFormComponent, selector: "app-object-form", ngImport: i0, template: "@if (!(isLoading$ | async)) {\r\n <div class=\"object-form__sidebar\">\r\n @if ((menuModel$ | async)?.items?.length) {\r\n <mrx-menu-admin [model]=\"(menuModel$ | async) || {}\">\r\n <ng-template #viewLinkTemplate let-menuItem=\"menuItem\">\r\n <div class=\"object-form__sidebar__link\">\r\n @if (showProgress(menuItem)) {\r\n <div class=\"progress-bar\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <circle class=\"progress-bar__circle\" cx=\"12\" cy=\"12\" r=\"9\" stroke-width=\"2\" stroke=\"#DBDFE5\"/>\r\n\r\n <circle\r\n class=\"progress-bar__filler\"\r\n [class.progress-bar__filler_full]=\"menuItem.params?.['percent'] === 100\"\r\n cx=\"12\" cy=\"12\" r=\"9\"\r\n stroke-width=\"2\"\r\n [attr.stroke-dasharray]=\"getDashArray(menuItem)\"\r\n stroke-dashoffset=\"60\"\r\n />\r\n </svg>\r\n\r\n @if (menuItem.params?.['percent'] === 100) {\r\n <div class=\"mrx-icon icon-check icon-font-16 icon-color-green progress-bar__icon text-bold\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n <span>{{ menuItem.title }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n </mrx-menu-admin>\r\n }\r\n </div>\r\n\r\n <div class=\"object-form__content\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n} @else {\r\n <div class=\"d-flex justify-content-center align-items-center h-100 w-100\">\r\n <mrx-loader [size]=\"'large'\" [color]=\"'brand'\"></mrx-loader>\r\n </div>\r\n}\r\n", styles: [".object-form__sidebar{background-color:#fff;overflow-y:hidden}.object-form__sidebar__link{display:flex;align-items:center;gap:8px;padding:8px 12px;color:#000;min-height:40px}.object-form__sidebar__link .progress-bar{position:relative;display:flex;align-items:center;justify-content:center}.object-form__sidebar__link .progress-bar__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.object-form__sidebar__link .progress-bar__filler{transform-origin:center;transform:rotate(-90deg);stroke:var(--brand-bg-primary-default);transition:stroke-dasharray .3s}.object-form__sidebar__link .progress-bar__filler_full{stroke:var(--system-icon-positive)}.object-form__content{flex-grow:1;overflow-y:scroll;padding-top:24px;padding-bottom:24px}:host{position:relative;display:flex;width:100%}\n"], dependencies: [{ kind: "directive", type: i3.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2$1.MenuAdminComponent, selector: "mrx-menu-admin", inputs: ["model", "open"], outputs: ["toggleMenu"] }, { kind: "component", type: i1$1.LoaderComponent, selector: "mrx-loader", inputs: ["size", "color", "customClasses"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
914
|
-
}
|
|
915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormComponent, decorators: [{
|
|
916
|
-
type: Component,
|
|
917
|
-
args: [{ selector: 'app-object-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!(isLoading$ | async)) {\r\n <div class=\"object-form__sidebar\">\r\n @if ((menuModel$ | async)?.items?.length) {\r\n <mrx-menu-admin [model]=\"(menuModel$ | async) || {}\">\r\n <ng-template #viewLinkTemplate let-menuItem=\"menuItem\">\r\n <div class=\"object-form__sidebar__link\">\r\n @if (showProgress(menuItem)) {\r\n <div class=\"progress-bar\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <circle class=\"progress-bar__circle\" cx=\"12\" cy=\"12\" r=\"9\" stroke-width=\"2\" stroke=\"#DBDFE5\"/>\r\n\r\n <circle\r\n class=\"progress-bar__filler\"\r\n [class.progress-bar__filler_full]=\"menuItem.params?.['percent'] === 100\"\r\n cx=\"12\" cy=\"12\" r=\"9\"\r\n stroke-width=\"2\"\r\n [attr.stroke-dasharray]=\"getDashArray(menuItem)\"\r\n stroke-dashoffset=\"60\"\r\n />\r\n </svg>\r\n\r\n @if (menuItem.params?.['percent'] === 100) {\r\n <div class=\"mrx-icon icon-check icon-font-16 icon-color-green progress-bar__icon text-bold\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n <span>{{ menuItem.title }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n </mrx-menu-admin>\r\n }\r\n </div>\r\n\r\n <div class=\"object-form__content\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n} @else {\r\n <div class=\"d-flex justify-content-center align-items-center h-100 w-100\">\r\n <mrx-loader [size]=\"'large'\" [color]=\"'brand'\"></mrx-loader>\r\n </div>\r\n}\r\n", styles: [".object-form__sidebar{background-color:#fff;overflow-y:hidden}.object-form__sidebar__link{display:flex;align-items:center;gap:8px;padding:8px 12px;color:#000;min-height:40px}.object-form__sidebar__link .progress-bar{position:relative;display:flex;align-items:center;justify-content:center}.object-form__sidebar__link .progress-bar__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.object-form__sidebar__link .progress-bar__filler{transform-origin:center;transform:rotate(-90deg);stroke:var(--brand-bg-primary-default);transition:stroke-dasharray .3s}.object-form__sidebar__link .progress-bar__filler_full{stroke:var(--system-icon-positive)}.object-form__content{flex-grow:1;overflow-y:scroll;padding-top:24px;padding-bottom:24px}:host{position:relative;display:flex;width:100%}\n"] }]
|
|
918
|
-
}] });
|
|
919
|
-
|
|
920
|
-
class ComponentFactoryDirective {
|
|
921
|
-
constructor(viewContainer) {
|
|
922
|
-
this.viewContainer = viewContainer;
|
|
923
|
-
this.values = [];
|
|
924
|
-
this.changed = new EventEmitter();
|
|
925
|
-
}
|
|
926
|
-
ngOnChanges(changes) {
|
|
927
|
-
if ('type' in changes && this.type && changes['type'].previousValue !== changes['type'].currentValue) {
|
|
928
|
-
this.initWidget(this.type);
|
|
929
|
-
}
|
|
930
|
-
if ('data' in changes && this.data) {
|
|
931
|
-
this.applyData(this.data);
|
|
932
|
-
}
|
|
933
|
-
if ('valueMode' in changes && this.data && this.valueMode) {
|
|
934
|
-
this.applyValueMode(this.valueMode);
|
|
935
|
-
}
|
|
936
|
-
if ('values' in changes && this.data) {
|
|
937
|
-
this.applyValues(this.values);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
initWidget(type) {
|
|
941
|
-
const componentType = this.map[type];
|
|
942
|
-
if (!componentType) {
|
|
943
|
-
return;
|
|
944
|
-
}
|
|
945
|
-
if (this.dynamicComponent) {
|
|
946
|
-
this.viewContainer.clear();
|
|
947
|
-
this.dynamicComponent = undefined;
|
|
948
|
-
}
|
|
949
|
-
this.dynamicComponent = this.viewContainer.createComponent(componentType);
|
|
950
|
-
if (this.data) {
|
|
951
|
-
this.dynamicComponent.instance.data = this.data;
|
|
952
|
-
}
|
|
953
|
-
if (this.dynamicComponent.instance.changed) {
|
|
954
|
-
this.dynamicComponent.instance.changed.subscribe((res) => {
|
|
955
|
-
this.changed.emit(res);
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
applyData(data) {
|
|
960
|
-
if (this.dynamicComponent) {
|
|
961
|
-
this.dynamicComponent.instance.data = data;
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
applyValues(values) {
|
|
965
|
-
if (this.dynamicComponent) {
|
|
966
|
-
this.dynamicComponent.instance.values = values;
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
applyValueMode(valueMode) {
|
|
970
|
-
if (this.dynamicComponent) {
|
|
971
|
-
this.dynamicComponent.instance.valueMode = valueMode;
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ComponentFactoryDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
975
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: ComponentFactoryDirective, isStandalone: true, selector: "[appComponentFactory]", inputs: { type: "type", data: "data", values: "values", valueMode: "valueMode", map: "map" }, outputs: { changed: "changed" }, usesOnChanges: true, ngImport: i0 }); }
|
|
976
|
-
}
|
|
977
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ComponentFactoryDirective, decorators: [{
|
|
978
|
-
type: Directive,
|
|
979
|
-
args: [{
|
|
980
|
-
selector: '[appComponentFactory]',
|
|
981
|
-
standalone: true
|
|
982
|
-
}]
|
|
983
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { type: [{
|
|
984
|
-
type: Input
|
|
985
|
-
}], data: [{
|
|
986
|
-
type: Input
|
|
987
|
-
}], values: [{
|
|
988
|
-
type: Input
|
|
989
|
-
}], valueMode: [{
|
|
990
|
-
type: Input
|
|
991
|
-
}], map: [{
|
|
992
|
-
type: Input
|
|
993
|
-
}], changed: [{
|
|
994
|
-
type: Output
|
|
995
|
-
}] } });
|
|
996
|
-
|
|
997
|
-
class BaseElementComponent {
|
|
998
|
-
constructor() {
|
|
999
|
-
this._store = inject(Store);
|
|
1000
|
-
this._detector = inject(ChangeDetectorRef);
|
|
1001
|
-
this.applicationId$ = this._store.select(selectObjectId);
|
|
1002
|
-
this.values = [];
|
|
1003
|
-
}
|
|
1004
|
-
set data(settings) {
|
|
1005
|
-
this.settings = settings;
|
|
1006
|
-
this.model = defaultValueModel(this.settings);
|
|
1007
|
-
this._detector.detectChanges();
|
|
1008
|
-
}
|
|
1009
|
-
ngOnInit() {
|
|
1010
|
-
this._initModel();
|
|
1011
|
-
}
|
|
1012
|
-
_initModel() {
|
|
1013
|
-
this.model = cloneDeep(getValueModel(this.settings, this.values)) || defaultValueModel(this.settings);
|
|
1014
|
-
}
|
|
1015
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1016
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseElementComponent }); }
|
|
1017
|
-
}
|
|
1018
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseElementComponent, decorators: [{
|
|
1019
|
-
type: Injectable
|
|
1020
|
-
}], propDecorators: { values: [{
|
|
1021
|
-
type: Input
|
|
1022
|
-
}], data: [{
|
|
1023
|
-
type: Input
|
|
1024
|
-
}] } });
|
|
1025
|
-
|
|
1026
|
-
class BaseFieldComponent {
|
|
1027
|
-
constructor() {
|
|
1028
|
-
this._store = inject(Store);
|
|
1029
|
-
this._detector = inject(ChangeDetectorRef);
|
|
1030
|
-
this._subscriptions$ = [];
|
|
1031
|
-
this._autoSaveStore = inject(AutoSaveStore);
|
|
1032
|
-
this._isCheckRequired = false;
|
|
1033
|
-
this.manualValues = [];
|
|
1034
|
-
this.valueMode = 'auto';
|
|
1035
|
-
this.changed = new EventEmitter();
|
|
1036
|
-
}
|
|
1037
|
-
set values(value) {
|
|
1038
|
-
if (this.valueMode === 'manual') {
|
|
1039
|
-
this.manualValues = value;
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1042
|
-
set data(settings) {
|
|
1043
|
-
this.settings = settings;
|
|
1044
|
-
this._customInit();
|
|
1045
|
-
this._detector.detectChanges();
|
|
1046
|
-
}
|
|
1047
|
-
ngOnInit() {
|
|
1048
|
-
this._initModel();
|
|
1049
|
-
this._subscriptions$.push(this._store.select(selectIsCheckRequired)
|
|
1050
|
-
.subscribe(result => {
|
|
1051
|
-
this._isCheckRequired = result;
|
|
1052
|
-
this._detector.detectChanges();
|
|
1053
|
-
}));
|
|
1054
|
-
if (this.valueMode === 'auto') {
|
|
1055
|
-
this._initSubscriptionForValue();
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
ngOnDestroy() {
|
|
1059
|
-
this._subscriptions$.forEach((subscription) => subscription.unsubscribe());
|
|
1060
|
-
}
|
|
1061
|
-
get autosaveFields() {
|
|
1062
|
-
return this._autoSaveStore.fields();
|
|
1063
|
-
}
|
|
1064
|
-
get getInvalid() {
|
|
1065
|
-
if (this._isCheckRequired) {
|
|
1066
|
-
return this.settings.options.required && !this._requiredValidate(this.model.valueType);
|
|
1067
|
-
}
|
|
1068
|
-
else {
|
|
1069
|
-
return false;
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
get getInvalidMessage() {
|
|
1073
|
-
if (this._isCheckRequired) {
|
|
1074
|
-
return 'Поле обязательно для заполнения';
|
|
1075
|
-
}
|
|
1076
|
-
else {
|
|
1077
|
-
return '';
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
_requiredValidate(type) {
|
|
1081
|
-
switch (type) {
|
|
1082
|
-
case (ValueType.String):
|
|
1083
|
-
case (ValueType.DateTime):
|
|
1084
|
-
return !!this.model.value?.trim();
|
|
1085
|
-
case (ValueType.Decimal):
|
|
1086
|
-
return !!this.model.value;
|
|
1087
|
-
case (ValueType.Boolean):
|
|
1088
|
-
return !!this.model.value;
|
|
1089
|
-
case (ValueType.StringArray):
|
|
1090
|
-
case (ValueType.GuidArray):
|
|
1091
|
-
return !!this.model.value?.length;
|
|
1092
|
-
default:
|
|
1093
|
-
return true;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
_initSubscriptionForValue() {
|
|
1097
|
-
this._subscriptions$.push(this._store.select(selectValueModel(this.settings))
|
|
1098
|
-
.subscribe((result) => {
|
|
1099
|
-
if (result) {
|
|
1100
|
-
if (!Array.isArray(result)) {
|
|
1101
|
-
this.model.value = result.value;
|
|
1102
|
-
this._customInit();
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
}));
|
|
1106
|
-
}
|
|
1107
|
-
_updateValue() {
|
|
1108
|
-
this.changed.emit(this._transformOutputValue());
|
|
1109
|
-
}
|
|
1110
|
-
_transformOutputValue() {
|
|
1111
|
-
return cloneDeep(this.model);
|
|
1112
|
-
}
|
|
1113
|
-
_customModelModify(event) {
|
|
1114
|
-
}
|
|
1115
|
-
_customInit() {
|
|
1116
|
-
this.model = this.model || defaultValueModel(this.settings);
|
|
1117
|
-
}
|
|
1118
|
-
_initModel() {
|
|
1119
|
-
if (this.valueMode === 'manual') {
|
|
1120
|
-
this.model = cloneDeep(getValueModel(this.settings, this.manualValues)) || defaultValueModel(this.settings);
|
|
1121
|
-
}
|
|
1122
|
-
else {
|
|
1123
|
-
this.model = defaultValueModel(this.settings);
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
dispatchModify(event) {
|
|
1127
|
-
this._autoSaveStore.addId(event.id);
|
|
1128
|
-
this._customModelModify(event);
|
|
1129
|
-
setTimeout(() => this._updateValue());
|
|
1130
|
-
}
|
|
1131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1132
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseFieldComponent }); }
|
|
1133
|
-
}
|
|
1134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseFieldComponent, decorators: [{
|
|
1135
|
-
type: Injectable
|
|
1136
|
-
}], propDecorators: { values: [{
|
|
1137
|
-
type: Input
|
|
1138
|
-
}], valueMode: [{
|
|
1139
|
-
type: Input
|
|
1140
|
-
}], data: [{
|
|
1141
|
-
type: Input
|
|
1142
|
-
}], changed: [{
|
|
1143
|
-
type: Output
|
|
1144
|
-
}] } });
|
|
1145
|
-
|
|
1146
|
-
class InputTextComponent extends BaseFieldComponent {
|
|
1147
|
-
constructor() {
|
|
1148
|
-
super(...arguments);
|
|
1149
|
-
this.type = ComponentType.InputText;
|
|
1150
|
-
}
|
|
1151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputTextComponent, selector: "app-input-text", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-text-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-text\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [mask]=\"settings.options.mask || ''\"\r\n [showMaskTyped]=\"true\"\r\n [minlength]=\"settings.options.minLength || 0\"\r\n [maxlength]=\"settings.options.maxLength || 0\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-text>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.InputTextComponent, selector: "mrx-input-text", inputs: ["fields", "disabled", "required", "readonly", "maxlength", "minlength", "placeholder", "invalid", "invalidMessage", "checkInvalid", "customClasses", "size", "isTooltipValue", "icon", "iconColor", "mask", "maskPrefix", "showMaskTyped", "maskDropSpecialCharacters"], outputs: ["changed", "modelChange"] }, { kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1153
|
-
}
|
|
1154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTextComponent, decorators: [{
|
|
1155
|
-
type: Component,
|
|
1156
|
-
args: [{ selector: 'app-input-text', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-text-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-text\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [mask]=\"settings.options.mask || ''\"\r\n [showMaskTyped]=\"true\"\r\n [minlength]=\"settings.options.minLength || 0\"\r\n [maxlength]=\"settings.options.maxLength || 0\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-text>\r\n </div>\r\n}\r\n" }]
|
|
1157
|
-
}] });
|
|
1158
|
-
|
|
1159
|
-
class InputTextareaComponent extends BaseFieldComponent {
|
|
1160
|
-
constructor() {
|
|
1161
|
-
super(...arguments);
|
|
1162
|
-
this.type = ComponentType.InputTextarea;
|
|
1163
|
-
this.config = {
|
|
1164
|
-
buttons: []
|
|
1165
|
-
};
|
|
1166
|
-
}
|
|
1167
|
-
_customInit() {
|
|
1168
|
-
this.model = this.model || defaultValueModel(this.settings);
|
|
1169
|
-
this.config = {
|
|
1170
|
-
buttons: [
|
|
1171
|
-
...this.settings?.options.textType ? ['paragraph'] : [],
|
|
1172
|
-
...this.settings?.options.textFamily ? ['font'] : [],
|
|
1173
|
-
...this.settings?.options.textSize ? ['fontsize'] : [],
|
|
1174
|
-
...this.settings?.options.textColor ? ['brush'] : [],
|
|
1175
|
-
...this.settings?.options.textStyle ? ['bold', 'italic', 'underline', 'strikethrough'] : [],
|
|
1176
|
-
...this.settings?.options.textAlign ? [{ name: 'left', list: ['left', 'right', 'center', 'justify'] }] : [],
|
|
1177
|
-
...this.settings?.options.textHeight ? ['lineHeight'] : [],
|
|
1178
|
-
...this.settings?.options.textMargin ? ['indent', 'outdent'] : [],
|
|
1179
|
-
...this.settings?.options.textList ? ['ol', 'ul'] : [],
|
|
1180
|
-
...this.settings?.options.textLink ? ['link'] : [],
|
|
1181
|
-
// ...this.model.options.textQuote ? ['blockquote'] : [],
|
|
1182
|
-
...this.settings?.options.textImage ? ['image'] : [],
|
|
1183
|
-
...this.settings?.options.textTable ? ['table'] : [],
|
|
1184
|
-
...this.settings?.options.textVideo ? ['video'] : [],
|
|
1185
|
-
...this.settings?.options.textSource ? ['source'] : [],
|
|
1186
|
-
]
|
|
1187
|
-
};
|
|
1188
|
-
}
|
|
1189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputTextareaComponent, selector: "app-input-textarea", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-textarea-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n @if (!settings.options.editor) {\r\n <mrx-input-textarea\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [rows]=\"2\"\r\n [autosize]=\"true\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [mask]=\"settings.options.mask || ''\"\r\n [minlength]=\"settings.options.min || 0\"\r\n [maxlength]=\"settings.options.max || 0\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-textarea>\r\n } @else {\r\n <mrx-editor\r\n [(ngModel)]=\"model.value\"\r\n [readonly]=\"false\"\r\n [fields]=\"autosaveFields\"\r\n [toolbar]=\"config\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-editor>\r\n }\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "component", type: i1$1.EditorComponent, selector: "mrx-editor", inputs: ["fields", "toolbar", "maxLength", "minHeight", "customClasses", "placeholder", "disabled", "readonly", "iframe", "defaultInlineStyle", "config", "editHTMLDocumentMode", "defaultMode", "invalid", "invalidMessage", "checkInvalid"], outputs: ["changed", "modelChange"] }, { kind: "component", type: i1$1.InputTextareaComponent, selector: "mrx-input-textarea", inputs: ["fields", "disabled", "readonly", "autosize", "maxlength", "minlength", "rows", "placeholder", "invalid", "invalidMessage", "checkInvalid", "customClasses", "mask", "size"], outputs: ["changed", "blurred", "modelChange"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1191
|
-
}
|
|
1192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTextareaComponent, decorators: [{
|
|
1193
|
-
type: Component,
|
|
1194
|
-
args: [{ selector: 'app-input-textarea', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-textarea-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n @if (!settings.options.editor) {\r\n <mrx-input-textarea\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [rows]=\"2\"\r\n [autosize]=\"true\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [mask]=\"settings.options.mask || ''\"\r\n [minlength]=\"settings.options.min || 0\"\r\n [maxlength]=\"settings.options.max || 0\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-textarea>\r\n } @else {\r\n <mrx-editor\r\n [(ngModel)]=\"model.value\"\r\n [readonly]=\"false\"\r\n [fields]=\"autosaveFields\"\r\n [toolbar]=\"config\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-editor>\r\n }\r\n </div>\r\n}\r\n" }]
|
|
1195
|
-
}] });
|
|
1196
|
-
|
|
1197
|
-
class InputLinkComponent extends BaseFieldComponent {
|
|
1198
|
-
constructor() {
|
|
1199
|
-
super(...arguments);
|
|
1200
|
-
this.type = ComponentType.InputLink;
|
|
1201
|
-
}
|
|
1202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1203
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputLinkComponent, selector: "app-input-link", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-link-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-text\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [showMaskTyped]=\"true\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-text>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.InputTextComponent, selector: "mrx-input-text", inputs: ["fields", "disabled", "required", "readonly", "maxlength", "minlength", "placeholder", "invalid", "invalidMessage", "checkInvalid", "customClasses", "size", "isTooltipValue", "icon", "iconColor", "mask", "maskPrefix", "showMaskTyped", "maskDropSpecialCharacters"], outputs: ["changed", "modelChange"] }, { kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1204
|
-
}
|
|
1205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputLinkComponent, decorators: [{
|
|
1206
|
-
type: Component,
|
|
1207
|
-
args: [{ selector: 'app-input-link', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-link-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-text\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [showMaskTyped]=\"true\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-text>\r\n </div>\r\n}\r\n" }]
|
|
1208
|
-
}] });
|
|
1209
|
-
|
|
1210
|
-
class InputSwitchComponent extends BaseFieldComponent {
|
|
1211
|
-
constructor() {
|
|
1212
|
-
super(...arguments);
|
|
1213
|
-
this.type = ComponentType.InputText;
|
|
1214
|
-
}
|
|
1215
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1216
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputSwitchComponent, selector: "app-input-switch", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-switch-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n @switch (settings.options.switchType) {\r\n @case (0) {\r\n <mrx-switch\r\n [(ngModel)]=\"model.value\"\r\n [size]=\"'large'\"\r\n [label]=\"settings.options.switchText\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-switch>\r\n }\r\n @case (1) {\r\n <mrx-checkbox\r\n [(ngModel)]=\"model.value\"\r\n [invalid]=\"getInvalid\"\r\n [label]=\"settings.options.switchText\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-checkbox>\r\n }\r\n }\r\n\r\n @if (getInvalid) {\r\n <mrx-error-message>{{ getInvalidMessage }}</mrx-error-message>\r\n }\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.CheckboxComponent, selector: "mrx-checkbox", inputs: ["fields", "required", "boldLabel", "indeterminate", "disabled", "readonly", "label", "customClasses", "customWrapperClasses", "invalid", "checkInvalid", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changed", "modelChange"] }, { kind: "component", type: i1$1.SwitchComponent, selector: "mrx-switch", inputs: ["fields", "size", "type", "label", "boldLabel", "disabled", "readonly", "required", "customClasses", "leftText", "rightText"], outputs: ["changed", "modelChange"] }, { kind: "component", type: i1$1.ErrorMessageComponent, selector: "mrx-error-message", inputs: ["invalid", "invalidMessage", "customClasses"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1217
|
-
}
|
|
1218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputSwitchComponent, decorators: [{
|
|
1219
|
-
type: Component,
|
|
1220
|
-
args: [{ selector: 'app-input-switch', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-switch-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n @switch (settings.options.switchType) {\r\n @case (0) {\r\n <mrx-switch\r\n [(ngModel)]=\"model.value\"\r\n [size]=\"'large'\"\r\n [label]=\"settings.options.switchText\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-switch>\r\n }\r\n @case (1) {\r\n <mrx-checkbox\r\n [(ngModel)]=\"model.value\"\r\n [invalid]=\"getInvalid\"\r\n [label]=\"settings.options.switchText\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-checkbox>\r\n }\r\n }\r\n\r\n @if (getInvalid) {\r\n <mrx-error-message>{{ getInvalidMessage }}</mrx-error-message>\r\n }\r\n </div>\r\n}\r\n" }]
|
|
1221
|
-
}] });
|
|
1222
|
-
|
|
1223
|
-
class InputNumberComponent extends BaseFieldComponent {
|
|
1224
|
-
constructor() {
|
|
1225
|
-
super(...arguments);
|
|
1226
|
-
this.type = ComponentType.InputNumber;
|
|
1227
|
-
}
|
|
1228
|
-
get isReadonly() {
|
|
1229
|
-
return this.settings.options.inputState === InputState.Formula;
|
|
1230
|
-
}
|
|
1231
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1232
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputNumberComponent, selector: "app-input-number", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-number-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-number\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"isReadonly\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [minValue]=\"settings.options.minValue || 0\"\r\n [maxValue]=\"settings.options.maxValue || 0\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-number>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.InputNumberComponent, selector: "mrx-input-number", inputs: ["fields", "placeholder", "innerClass", "customClasses", "required", "allowNegative", "size", "separator", "decimalSeparator", "decimals", "isNullableValue", "isAutoCorrectingValue", "invalid", "checkInvalid", "numberType", "invalidMessage", "disabled", "readonly", "minValue", "maxValue"], outputs: ["modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1233
|
-
}
|
|
1234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputNumberComponent, decorators: [{
|
|
1235
|
-
type: Component,
|
|
1236
|
-
args: [{ selector: 'app-input-number', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-number-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-number\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"isReadonly\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [minValue]=\"settings.options.minValue || 0\"\r\n [maxValue]=\"settings.options.maxValue || 0\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-number>\r\n </div>\r\n}\r\n" }]
|
|
1237
|
-
}] });
|
|
1238
|
-
|
|
1239
|
-
class InputSelectComponent extends BaseFieldComponent {
|
|
1240
|
-
constructor() {
|
|
1241
|
-
super(...arguments);
|
|
1242
|
-
this.type = ComponentType.InputSelect;
|
|
1243
|
-
}
|
|
1244
|
-
updateValue(event) {
|
|
1245
|
-
if (!this.settings.options.multiply) {
|
|
1246
|
-
this.model.value = event.value ? [event.value] : null;
|
|
1247
|
-
}
|
|
1248
|
-
else {
|
|
1249
|
-
this.model.value = event.value;
|
|
1250
|
-
}
|
|
1251
|
-
this.dispatchModify(event);
|
|
1252
|
-
}
|
|
1253
|
-
_customInit() {
|
|
1254
|
-
this.model = this.model || defaultValueModel(this.settings);
|
|
1255
|
-
if (!this.settings.options.multiply) {
|
|
1256
|
-
this.value = this.model.value?.[0] || null;
|
|
1257
|
-
}
|
|
1258
|
-
else {
|
|
1259
|
-
this.value = this.model.value || null;
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
_customModelModify(event) {
|
|
1263
|
-
this.model.displayValue = this._getDisplayValue(event.value);
|
|
1264
|
-
}
|
|
1265
|
-
_getDisplayValue(selectedValue) {
|
|
1266
|
-
if (!this.settings.options.items) {
|
|
1267
|
-
return '';
|
|
1268
|
-
}
|
|
1269
|
-
if (!Array.isArray(selectedValue)) {
|
|
1270
|
-
return this.settings.options.items
|
|
1271
|
-
.filter(x => x.value === selectedValue)
|
|
1272
|
-
.map(x => x.text).join(', ');
|
|
1273
|
-
}
|
|
1274
|
-
const result = [];
|
|
1275
|
-
selectedValue.forEach(val => {
|
|
1276
|
-
const selectedItem = this.settings.options.items
|
|
1277
|
-
.find(x => x.value === val);
|
|
1278
|
-
if (selectedItem) {
|
|
1279
|
-
result.push(selectedItem.text);
|
|
1280
|
-
}
|
|
1281
|
-
});
|
|
1282
|
-
return result.join(', ');
|
|
1283
|
-
}
|
|
1284
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1285
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputSelectComponent, selector: "app-input-select", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-select-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-select\r\n [(ngModel)]=\"value\"\r\n [fields]=\"autosaveFields\"\r\n [items]=\"settings.options.items\"\r\n [readonly]=\"false\"\r\n [searchable]=\"false\"\r\n bindValue=\"value\"\r\n bindLabel=\"text\"\r\n [multiple]=\"settings.options.multiply\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-input-select>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.InputSelectComponent, selector: "mrx-input-select", inputs: ["fields", "size", "selected", "bindValue", "bindLabel", "customClasses", "wrapperCustomClasses", "multiple", "loading", "addTag", "clearable", "items", "groupBy", "emptyValue", "virtualScroll", "trackByFn", "displayValue", "disabledFromDisplay", "maxLength", "customSearchFn", "isBottomLabel", "search", "required", "disabled", "readonly", "showEmptyFields", "placeholder", "searchable", "loadLabel", "notFoundText", "closeOnSelect", "multiCollapseCount", "dropdownPosition", "invalid", "invalidMessage", "checkInvalid", "label", "labelRequiredHidden", "labelExtraClass", "tooltip", "tooltipHidden", "tooltipVisible", "maxSelectedItems"], outputs: ["changed", "modelChange", "searched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1286
|
-
}
|
|
1287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputSelectComponent, decorators: [{
|
|
1288
|
-
type: Component,
|
|
1289
|
-
args: [{ selector: 'app-input-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-select-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-select\r\n [(ngModel)]=\"value\"\r\n [fields]=\"autosaveFields\"\r\n [items]=\"settings.options.items\"\r\n [readonly]=\"false\"\r\n [searchable]=\"false\"\r\n bindValue=\"value\"\r\n bindLabel=\"text\"\r\n [multiple]=\"settings.options.multiply\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-input-select>\r\n </div>\r\n}\r\n" }]
|
|
1290
|
-
}] });
|
|
1291
|
-
|
|
1292
|
-
class InputDateComponent extends BaseFieldComponent {
|
|
1293
|
-
constructor() {
|
|
1294
|
-
super(...arguments);
|
|
1295
|
-
this.type = ComponentType.InputDate;
|
|
1296
|
-
this._isInit = false;
|
|
1297
|
-
this.dateModel = '';
|
|
1298
|
-
}
|
|
1299
|
-
get value() {
|
|
1300
|
-
if (this.settings.options.range) {
|
|
1301
|
-
return [this.modelStart.value, this.modelEnd.value];
|
|
1302
|
-
}
|
|
1303
|
-
else {
|
|
1304
|
-
return this.model.value;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
get getViewTypeTimepicker() {
|
|
1308
|
-
return this.settings.options.viewType === DateTypeEnum.DateTime;
|
|
1309
|
-
}
|
|
1310
|
-
updateValue(event) {
|
|
1311
|
-
if (this._isInit) {
|
|
1312
|
-
if (this.settings.options.range) {
|
|
1313
|
-
if (event.value?.length === 0) {
|
|
1314
|
-
this.dateModel = [];
|
|
1315
|
-
this.modelStart.value = null;
|
|
1316
|
-
this.modelEnd.value = null;
|
|
1317
|
-
this.model.value = [null, null];
|
|
1318
|
-
}
|
|
1319
|
-
if (event.value?.length === 2) {
|
|
1320
|
-
this.dateModel = [event.value[0], event.value[1]];
|
|
1321
|
-
this.modelStart['value'] = event.value[0];
|
|
1322
|
-
this.modelEnd['value'] = event.value[1];
|
|
1323
|
-
this.model.value = [this.modelStart.value, this.modelEnd.value];
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
else {
|
|
1327
|
-
this.dateModel = event.value;
|
|
1328
|
-
this.model.value = event.value;
|
|
1329
|
-
}
|
|
1330
|
-
this.dispatchModify(event);
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
_transformOutputValue() {
|
|
1334
|
-
if (this.settings.options.range) {
|
|
1335
|
-
return [cloneDeep(this.modelStart), cloneDeep(this.modelEnd)];
|
|
1336
|
-
}
|
|
1337
|
-
else {
|
|
1338
|
-
return cloneDeep(this.model);
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
_initSubscriptionForValue() {
|
|
1342
|
-
this._subscriptions$.push(this._store.select(selectValueModel(this.settings))
|
|
1343
|
-
.subscribe((result) => {
|
|
1344
|
-
if (result) {
|
|
1345
|
-
if (Array.isArray(result)) {
|
|
1346
|
-
this.modelStart = cloneDeep(result[0]) || defaultValueModel(this.settings);
|
|
1347
|
-
this.modelEnd = cloneDeep(result[1]) || defaultValueModel(this.settings);
|
|
1348
|
-
}
|
|
1349
|
-
else {
|
|
1350
|
-
this.model = cloneDeep(result || defaultValueModel(this.settings));
|
|
1351
|
-
}
|
|
1352
|
-
this._customInit();
|
|
1353
|
-
}
|
|
1354
|
-
}));
|
|
1355
|
-
}
|
|
1356
|
-
_customInit() {
|
|
1357
|
-
if (!this.model) {
|
|
1358
|
-
this.model = defaultValueModel(this.settings);
|
|
1359
|
-
}
|
|
1360
|
-
if (this.settings.options.range) {
|
|
1361
|
-
if (!this.modelStart?.value || !this.modelEnd?.value) {
|
|
1362
|
-
this.dateModel = [];
|
|
1363
|
-
}
|
|
1364
|
-
else {
|
|
1365
|
-
this.dateModel = [this.modelStart.value, this.modelEnd.value];
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
else {
|
|
1369
|
-
this.dateModel = this.model.value;
|
|
1370
|
-
}
|
|
1371
|
-
setTimeout(() => {
|
|
1372
|
-
this._isInit = true;
|
|
1373
|
-
}, 500);
|
|
1374
|
-
}
|
|
1375
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1376
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputDateComponent, selector: "app-input-date", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-date-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-date-time\r\n [ngModel]=\"dateModel\"\r\n [fields]=\"autosaveFields\"\r\n [range]=\"settings.options.range\"\r\n [datePlaceholder]=\"settings.options.placeholder || ''\"\r\n [isManualInput]=\"!settings.options.range\"\r\n [timepicker]=\"getViewTypeTimepicker\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-input-date-time>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.InputDateTimeComponent, selector: "mrx-input-date-time", inputs: ["fields", "size", "customClasses", "dateLabel", "timeLabel", "datePlaceholder", "timePlaceholder", "disabled", "readonly", "required", "timepicker", "range", "minDate", "maxDate", "timezone", "inline", "isManualInput", "addMinTime", "addMaxTime", "addMinTimeObj", "addMaxTimeObj", "disableValidate", "container", "invalid", "invalidMessage", "checkInvalid"], outputs: ["changed", "modelChange", "blurred"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1377
|
-
}
|
|
1378
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputDateComponent, decorators: [{
|
|
1379
|
-
type: Component,
|
|
1380
|
-
args: [{ selector: 'app-input-date', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-date-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-date-time\r\n [ngModel]=\"dateModel\"\r\n [fields]=\"autosaveFields\"\r\n [range]=\"settings.options.range\"\r\n [datePlaceholder]=\"settings.options.placeholder || ''\"\r\n [isManualInput]=\"!settings.options.range\"\r\n [timepicker]=\"getViewTypeTimepicker\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-input-date-time>\r\n </div>\r\n}\r\n" }]
|
|
1381
|
-
}] });
|
|
1382
|
-
|
|
1383
|
-
class InputInnComponent extends BaseFieldComponent {
|
|
1384
|
-
constructor() {
|
|
1385
|
-
super(...arguments);
|
|
1386
|
-
this.type = ComponentType.InputINN;
|
|
1387
|
-
}
|
|
1388
|
-
get getMask() {
|
|
1389
|
-
switch (this.settings.options.viewType) {
|
|
1390
|
-
case InnTypeEnum.Personal:
|
|
1391
|
-
return '000000000000';
|
|
1392
|
-
case InnTypeEnum.Legal:
|
|
1393
|
-
return '0000000000';
|
|
1394
|
-
case InnTypeEnum.ForeignLegal:
|
|
1395
|
-
return '000000';
|
|
1396
|
-
default:
|
|
1397
|
-
return '';
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
get getMaskPrefix() {
|
|
1401
|
-
return this.settings.options.viewType === InnTypeEnum.ForeignLegal ? '9909' : '';
|
|
1402
|
-
}
|
|
1403
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputInnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1404
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputInnComponent, selector: "app-input-inn", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-inn-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-text\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [mask]=\"getMask\"\r\n [maskPrefix]=\"getMaskPrefix\"\r\n [maskDropSpecialCharacters]=\"false\"\r\n [showMaskTyped]=\"true\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-text>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.InputTextComponent, selector: "mrx-input-text", inputs: ["fields", "disabled", "required", "readonly", "maxlength", "minlength", "placeholder", "invalid", "invalidMessage", "checkInvalid", "customClasses", "size", "isTooltipValue", "icon", "iconColor", "mask", "maskPrefix", "showMaskTyped", "maskDropSpecialCharacters"], outputs: ["changed", "modelChange"] }, { kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1405
|
-
}
|
|
1406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputInnComponent, decorators: [{
|
|
1407
|
-
type: Component,
|
|
1408
|
-
args: [{ selector: 'app-input-inn', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-inn-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-text\r\n [(ngModel)]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [readonly]=\"false\"\r\n [placeholder]=\"settings.options.placeholder || ''\"\r\n [mask]=\"getMask\"\r\n [maskPrefix]=\"getMaskPrefix\"\r\n [maskDropSpecialCharacters]=\"false\"\r\n [showMaskTyped]=\"true\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"dispatchModify($event)\"\r\n ></mrx-input-text>\r\n </div>\r\n}\r\n" }]
|
|
1409
|
-
}] });
|
|
1410
|
-
|
|
1411
|
-
class InputFileComponent extends BaseFieldComponent {
|
|
1412
|
-
constructor() {
|
|
1413
|
-
super(...arguments);
|
|
1414
|
-
this.type = ComponentType.InputFile;
|
|
1415
|
-
this._store = inject(Store);
|
|
1416
|
-
this._detector = inject(ChangeDetectorRef);
|
|
1417
|
-
this._changeFileSubject$ = new Subject();
|
|
1418
|
-
this._fileSubscriptions$ = [];
|
|
1419
|
-
this._isFileCheckRequired = false;
|
|
1420
|
-
this.applicationId$ = this._store.select(selectObjectId);
|
|
1421
|
-
this.files = [];
|
|
1422
|
-
}
|
|
1423
|
-
ngOnInit() {
|
|
1424
|
-
this._initModel();
|
|
1425
|
-
this._changeFileSubject$.pipe(debounceTime(700)).subscribe(model => {
|
|
1426
|
-
this._store.dispatch(updateValues({ value: cloneDeep(this.model) }));
|
|
1427
|
-
});
|
|
1428
|
-
this._fileSubscriptions$.push(this._store.select(selectIsCheckRequired)
|
|
1429
|
-
.subscribe(result => {
|
|
1430
|
-
this._isFileCheckRequired = result;
|
|
1431
|
-
this._detector.detectChanges();
|
|
1432
|
-
}));
|
|
1433
|
-
if (this.valueMode === 'auto') {
|
|
1434
|
-
this._subscriptions$.push(this._store.select(selectValueModel(this.settings))
|
|
1435
|
-
.subscribe((result) => {
|
|
1436
|
-
if (result && !Array.isArray(result)) {
|
|
1437
|
-
this.model.value = result.value;
|
|
1438
|
-
this._customInit();
|
|
1439
|
-
}
|
|
1440
|
-
}));
|
|
1441
|
-
}
|
|
1442
|
-
this._fileSubscriptions$.push(this._store.select(selectSectionFiles)
|
|
1443
|
-
.subscribe((sectionFiles) => {
|
|
1444
|
-
if (sectionFiles.length) {
|
|
1445
|
-
this._initFiles(sectionFiles);
|
|
1446
|
-
}
|
|
1447
|
-
}));
|
|
1448
|
-
}
|
|
1449
|
-
ngOnDestroy() {
|
|
1450
|
-
this._fileSubscriptions$.forEach((subscription) => subscription.unsubscribe());
|
|
1451
|
-
}
|
|
1452
|
-
filesChanged(files) {
|
|
1453
|
-
this.files = files;
|
|
1454
|
-
this.model.value = this.files.map(f => f.id);
|
|
1455
|
-
this.dispatchModify();
|
|
1456
|
-
}
|
|
1457
|
-
deleteFile(file) {
|
|
1458
|
-
this.files = this.files.filter((f) => f.id !== file.id);
|
|
1459
|
-
this.model.value = this.files.map(f => f.id);
|
|
1460
|
-
this.dispatchModify();
|
|
1461
|
-
}
|
|
1462
|
-
get getInvalid() {
|
|
1463
|
-
if (this._isFileCheckRequired) {
|
|
1464
|
-
return this.settings.options.required && !this.model.value?.length;
|
|
1465
|
-
}
|
|
1466
|
-
else {
|
|
1467
|
-
return false;
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
dispatchModify() {
|
|
1471
|
-
this._changeFileSubject$.next(this.model);
|
|
1472
|
-
}
|
|
1473
|
-
_initFiles(sectionFiles) {
|
|
1474
|
-
this.files = sectionFiles.filter(f => this.model.value.includes(f.id)).map(f => ({ uuid: f.id, name: f.name, size: f.length }));
|
|
1475
|
-
this._detector.detectChanges();
|
|
1476
|
-
}
|
|
1477
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputFileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1478
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputFileComponent, selector: "app-input-file", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-file-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-file\r\n [files]=\"files\"\r\n [allowedExtensions]=\"settings.options.allowedExtensions\"\r\n [maxFiles]=\"settings.options.maxFiles\"\r\n [maxSize]=\"settings.options.maxSize\"\r\n [uploadEndPoint]=\"'/form/api/v1/application/' + (applicationId$ | async) + '/upload-temp-file'\"\r\n [deleteConfirm]=\"deleteFile.bind(this)\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"'\u041F\u043E\u043B\u0435 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0434\u043B\u044F \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F'\"\r\n (filesChanged)=\"filesChanged($event)\"\r\n ></mrx-input-file>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "component", type: i1$1.InputFileComponent, selector: "mrx-input-file", inputs: ["autoUpload", "required", "disabled", "viewOnly", "lightDisabled", "bottomFiles", "maxSize", "maxFiles", "minFiles", "formData", "uploadEndPoint", "deleteEndPoint", "downloadEndPoint", "fileNamePlaceholder", "showInputWithError", "showDeleteButton", "isTooltipValue", "isDownloadingFile", "isHideListFiles", "target", "deleteConfirm", "innerTemplate", "uploadAdditionalData", "invalid", "invalidMessage", "checkInvalid", "messageTooManyFiles", "messageFileTooBig", "messageEmptyFile", "messageInvalidFileFormat", "placeholder", "placeholderFileMaxSize", "placeholderFileFormat", "files", "allowedExtensions"], outputs: ["filesChanged", "checkDroppedFile"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1479
|
-
}
|
|
1480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputFileComponent, decorators: [{
|
|
1481
|
-
type: Component,
|
|
1482
|
-
args: [{ selector: 'app-input-file', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-file-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-file\r\n [files]=\"files\"\r\n [allowedExtensions]=\"settings.options.allowedExtensions\"\r\n [maxFiles]=\"settings.options.maxFiles\"\r\n [maxSize]=\"settings.options.maxSize\"\r\n [uploadEndPoint]=\"'/form/api/v1/application/' + (applicationId$ | async) + '/upload-temp-file'\"\r\n [deleteConfirm]=\"deleteFile.bind(this)\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"'\u041F\u043E\u043B\u0435 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0434\u043B\u044F \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F'\"\r\n (filesChanged)=\"filesChanged($event)\"\r\n ></mrx-input-file>\r\n </div>\r\n}\r\n" }]
|
|
1483
|
-
}] });
|
|
1484
|
-
|
|
1485
|
-
//TODO InputTelValueWithId добавить в компонент
|
|
1486
|
-
class InputPhoneComponent extends BaseFieldComponent {
|
|
1487
|
-
constructor() {
|
|
1488
|
-
super(...arguments);
|
|
1489
|
-
this.type = ComponentType.InputPhone;
|
|
1490
|
-
this.onlyCountries = [];
|
|
1491
|
-
}
|
|
1492
|
-
updateValue(event) {
|
|
1493
|
-
//TODO InputTelValueWithId добавить в компонент
|
|
1494
|
-
if (event.value.isNumberValid) {
|
|
1495
|
-
this.model.value = event.value.unFormattedNumber;
|
|
1496
|
-
this.dispatchModify({ id: event.id, value: event.value.unFormattedNumber });
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
_customInit() {
|
|
1500
|
-
this.model = this.model || defaultValueModel(this.settings);
|
|
1501
|
-
this.onlyCountries = this.settings.options.countries.map(country => {
|
|
1502
|
-
return country.value;
|
|
1503
|
-
});
|
|
1504
|
-
}
|
|
1505
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputPhoneComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1506
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputPhoneComponent, selector: "app-input-phone", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-phone-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-tel\r\n [ngModel]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [onlyCountries]=\"onlyCountries\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n [readonly]=\"false\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-input-tel>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.InputTelComponent, selector: "mrx-input-tel", inputs: ["fields", "disabled", "readonly", "maxLength", "customClasses", "size", "cssClass", "preferredCountries", "onlyCountries", "enableAutoCountrySelect", "enablePlaceholder", "customPlaceholder", "numberFormat", "searchCountryFlag", "searchCountryField", "searchCountryPlaceholder", "selectFirstCountry", "phoneValidation", "inputId", "selectedCountryISO", "separateDialCode", "autoDealCode", "autoCloseDropdown", "invalid", "invalidMessage", "invalidPhoneMessage", "checkInvalid"], outputs: ["changed", "modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1507
|
-
}
|
|
1508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputPhoneComponent, decorators: [{
|
|
1509
|
-
type: Component,
|
|
1510
|
-
args: [{ selector: 'app-input-phone', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-phone-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-input-tel\r\n [ngModel]=\"model.value\"\r\n [fields]=\"autosaveFields\"\r\n [onlyCountries]=\"onlyCountries\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n [readonly]=\"false\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-input-tel>\r\n </div>\r\n}\r\n" }]
|
|
1511
|
-
}] });
|
|
1512
|
-
|
|
1513
|
-
class InputCheckboxGroupComponent extends BaseFieldComponent {
|
|
1514
|
-
constructor() {
|
|
1515
|
-
super(...arguments);
|
|
1516
|
-
this.type = ComponentType.InputCheckboxGroup;
|
|
1517
|
-
this.list = [];
|
|
1518
|
-
this.value = [];
|
|
1519
|
-
}
|
|
1520
|
-
updateValue(event) {
|
|
1521
|
-
this.model.value = event.value.map(i => String(i.id));
|
|
1522
|
-
this.dispatchModify(event);
|
|
1523
|
-
}
|
|
1524
|
-
_customInit() {
|
|
1525
|
-
this.model = this.model || defaultValueModel(this.settings, []);
|
|
1526
|
-
this.list = this.settings.options.items.map(item => ({ id: item.value, text: item.text }));
|
|
1527
|
-
this.value = this.model.value?.map((i) => ({ id: i, text: '' })) || [];
|
|
1528
|
-
this._detector.detectChanges();
|
|
1529
|
-
}
|
|
1530
|
-
_customModelModify(event) {
|
|
1531
|
-
this.model.displayValue = this._getDisplayValue(event.value);
|
|
1532
|
-
}
|
|
1533
|
-
_getDisplayValue(selectedValue) {
|
|
1534
|
-
if (!this.settings.options.items) {
|
|
1535
|
-
return '';
|
|
1536
|
-
}
|
|
1537
|
-
const result = [];
|
|
1538
|
-
selectedValue.forEach(val => {
|
|
1539
|
-
const selectedItem = this.settings.options.items
|
|
1540
|
-
.find(x => x.value === val.id);
|
|
1541
|
-
if (selectedItem) {
|
|
1542
|
-
result.push(selectedItem.text);
|
|
1543
|
-
}
|
|
1544
|
-
});
|
|
1545
|
-
return result.join(', ');
|
|
1546
|
-
}
|
|
1547
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputCheckboxGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1548
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputCheckboxGroupComponent, selector: "app-input-checkbox-group", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"checkbox-group-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-checkbox-group\r\n [(ngModel)]=\"value\"\r\n [items]=\"list\"\r\n [fields]=\"autosaveFields\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-checkbox-group>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.CheckboxGroupComponent, selector: "mrx-checkbox-group", inputs: ["fields", "scrollMaxHeight", "searchable", "scrollable", "sortable", "disabled", "readonly", "enableMessage", "searchPlaceholder", "customClasses", "tooltip", "labelText", "linkText", "invalid", "invalidMessage", "items"], outputs: ["changed", "modelChange", "changedInner", "modelChangeInner", "modelItemChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1549
|
-
}
|
|
1550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputCheckboxGroupComponent, decorators: [{
|
|
1551
|
-
type: Component,
|
|
1552
|
-
args: [{ selector: 'app-input-checkbox-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"checkbox-group-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-checkbox-group\r\n [(ngModel)]=\"value\"\r\n [items]=\"list\"\r\n [fields]=\"autosaveFields\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-checkbox-group>\r\n </div>\r\n}\r\n" }]
|
|
1553
|
-
}] });
|
|
1554
|
-
|
|
1555
|
-
class InputRadioGroupComponent extends BaseFieldComponent {
|
|
1556
|
-
constructor() {
|
|
1557
|
-
super(...arguments);
|
|
1558
|
-
this.type = ComponentType.InputRadioGroup;
|
|
1559
|
-
this.list = [];
|
|
1560
|
-
}
|
|
1561
|
-
updateValue(event) {
|
|
1562
|
-
if (event.value) {
|
|
1563
|
-
this.model.value = String(event.value.id);
|
|
1564
|
-
}
|
|
1565
|
-
else {
|
|
1566
|
-
this.model.value = '';
|
|
1567
|
-
}
|
|
1568
|
-
this.dispatchModify(event);
|
|
1569
|
-
}
|
|
1570
|
-
_customInit() {
|
|
1571
|
-
this.model = this.model || defaultValueModel(this.settings);
|
|
1572
|
-
this.list = this.settings.options.items.map(item => ({ id: item.value, text: item.text, parentId: 'none', value: false, type: 'single', items: [] }));
|
|
1573
|
-
if (!!this.model.value) {
|
|
1574
|
-
this.value = this.list.find(i => String(i.id) === this.model.value) || this.list[0];
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
_customModelModify(event) {
|
|
1578
|
-
this.model.displayValue = this._getDisplayValue(event.value);
|
|
1579
|
-
}
|
|
1580
|
-
_getDisplayValue(selectedValue) {
|
|
1581
|
-
if (!this.settings.options.items) {
|
|
1582
|
-
return '';
|
|
1583
|
-
}
|
|
1584
|
-
return this.settings.options.items
|
|
1585
|
-
.filter(x => x.value === selectedValue?.id)
|
|
1586
|
-
.map(x => x.text).join(', ');
|
|
1587
|
-
}
|
|
1588
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputRadioGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1589
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputRadioGroupComponent, selector: "app-input-radio-group", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-radio-group-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-radio-group\r\n [(ngModel)]=\"value\"\r\n [fields]=\"autosaveFields\"\r\n [items]=\"list\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-radio-group>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.RadioGroupComponent, selector: "mrx-radio-group", inputs: ["fields", "searchSize", "name", "scrollMaxHeight", "searchable", "bold", "scrollable", "sortable", "disabled", "readonly", "enableMessage", "searchPlaceholder", "customClasses", "required", "invalid", "invalidMessage", "checkInvalid", "tooltip", "labelText", "items"], outputs: ["changed", "modelChange", "modelCheckedChange", "modelItemChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1590
|
-
}
|
|
1591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputRadioGroupComponent, decorators: [{
|
|
1592
|
-
type: Component,
|
|
1593
|
-
args: [{ selector: 'app-input-radio-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-radio-group-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <mrx-radio-group\r\n [(ngModel)]=\"value\"\r\n [fields]=\"autosaveFields\"\r\n [items]=\"list\"\r\n [invalid]=\"getInvalid\"\r\n [invalidMessage]=\"getInvalidMessage\"\r\n (modelChange)=\"updateValue($event)\"\r\n ></mrx-radio-group>\r\n </div>\r\n}\r\n" }]
|
|
1594
|
-
}] });
|
|
1595
|
-
|
|
1596
|
-
class FormDispenserModal {
|
|
1597
|
-
constructor() {
|
|
1598
|
-
this._store = inject(Store);
|
|
1599
|
-
this._detector = inject(ChangeDetectorRef);
|
|
1600
|
-
this._subscriptions$ = [];
|
|
1601
|
-
this._fieldDependencyRulesCheckResults = [];
|
|
1602
|
-
this.mapper = contentComponentsMap;
|
|
1603
|
-
this.values = [];
|
|
1604
|
-
this.valueMode = 'auto';
|
|
1605
|
-
this.changed = new EventEmitter();
|
|
1606
|
-
}
|
|
1607
|
-
ngOnInit() {
|
|
1608
|
-
this._subscriptions$.push(this._store.select(selectDependencyRulesResults)
|
|
1609
|
-
.subscribe(results => {
|
|
1610
|
-
this._fieldDependencyRulesCheckResults = results;
|
|
1611
|
-
this._detector.detectChanges();
|
|
1612
|
-
}));
|
|
1613
|
-
}
|
|
1614
|
-
ngOnDestroy() {
|
|
1615
|
-
this._subscriptions$.forEach((subscription) => subscription.unsubscribe());
|
|
1616
|
-
}
|
|
1617
|
-
componentValueChanged(event) {
|
|
1618
|
-
this.changed.emit(event);
|
|
1619
|
-
}
|
|
1620
|
-
isComponentVisible(sysName) {
|
|
1621
|
-
const result = this._fieldDependencyRulesCheckResults.find(x => x.sysName === sysName);
|
|
1622
|
-
if (!result) {
|
|
1623
|
-
return true;
|
|
1624
|
-
}
|
|
1625
|
-
let visible = true;
|
|
1626
|
-
switch (result.actionType) {
|
|
1627
|
-
case DependenceActionType.show:
|
|
1628
|
-
visible = result.conditionResult;
|
|
1629
|
-
break;
|
|
1630
|
-
default:
|
|
1631
|
-
break;
|
|
1632
|
-
}
|
|
1633
|
-
return visible;
|
|
1634
|
-
}
|
|
1635
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormDispenserModal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1636
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: FormDispenserModal, isStandalone: true, selector: "app-form-dispenser-modal", inputs: { sectionSettings: "sectionSettings", values: "values", valueMode: "valueMode" }, outputs: { changed: "changed" }, ngImport: i0, template: "@if (sectionSettings?.components?.length) {\r\n <div class=\"row application-form__content\">\r\n @for (component of sectionSettings?.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n}\r\n\r\n\r\n\r\n<ng-template #dragGroup let-component='component'>\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n @if (component.options.label) {\r\n <mrx-label>{{ component.options.label }}</mrx-label>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"application-form__group p-2\">\r\n @if (component.components.length) {\r\n <div class=\"row\">\r\n @for (component of component.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n } @else {\r\n <p class=\"p-2\">\u042D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0433\u0440\u0443\u043F\u043F\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442</p>\r\n }\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dragInput let-component='component'>\r\n @if (isComponentVisible(component.sysName)) {\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"application-form__input\">\r\n <ng-template\r\n appComponentFactory\r\n [type]=\"component.type\"\r\n [data]=\"component\"\r\n [map]=\"mapper\"\r\n [values]=\"values\"\r\n [valueMode]=\"valueMode\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".application-form__group{border-radius:4px;border:1px solid var(--neutral-bg-stroke-default, #DBDFE5)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: LabelModule }, { kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: ComponentFactoryDirective, selector: "[appComponentFactory]", inputs: ["type", "data", "values", "valueMode", "map"], outputs: ["changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1637
|
-
}
|
|
1638
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormDispenserModal, decorators: [{
|
|
1639
|
-
type: Component,
|
|
1640
|
-
args: [{ selector: 'app-form-dispenser-modal', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1641
|
-
CommonModule,
|
|
1642
|
-
LabelModule,
|
|
1643
|
-
ComponentFactoryDirective
|
|
1644
|
-
], template: "@if (sectionSettings?.components?.length) {\r\n <div class=\"row application-form__content\">\r\n @for (component of sectionSettings?.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n}\r\n\r\n\r\n\r\n<ng-template #dragGroup let-component='component'>\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n @if (component.options.label) {\r\n <mrx-label>{{ component.options.label }}</mrx-label>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"application-form__group p-2\">\r\n @if (component.components.length) {\r\n <div class=\"row\">\r\n @for (component of component.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n } @else {\r\n <p class=\"p-2\">\u042D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0433\u0440\u0443\u043F\u043F\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442</p>\r\n }\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dragInput let-component='component'>\r\n @if (isComponentVisible(component.sysName)) {\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"application-form__input\">\r\n <ng-template\r\n appComponentFactory\r\n [type]=\"component.type\"\r\n [data]=\"component\"\r\n [map]=\"mapper\"\r\n [values]=\"values\"\r\n [valueMode]=\"valueMode\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".application-form__group{border-radius:4px;border:1px solid var(--neutral-bg-stroke-default, #DBDFE5)}\n"] }]
|
|
1645
|
-
}], propDecorators: { sectionSettings: [{
|
|
1646
|
-
type: Input
|
|
1647
|
-
}], values: [{
|
|
1648
|
-
type: Input
|
|
1649
|
-
}], valueMode: [{
|
|
1650
|
-
type: Input
|
|
1651
|
-
}], changed: [{
|
|
1652
|
-
type: Output
|
|
1653
|
-
}] } });
|
|
1654
|
-
|
|
1655
|
-
class InputTableModalComponent extends ModalServiceComponent {
|
|
1656
|
-
constructor(dialogRef, data) {
|
|
1657
|
-
super();
|
|
1658
|
-
this.dialogRef = dialogRef;
|
|
1659
|
-
this.title = data.title;
|
|
1660
|
-
this.settings = data.settings;
|
|
1661
|
-
this.rowModel = data.rowModel;
|
|
1662
|
-
this.result = { result: false, rowModel: this.rowModel };
|
|
1663
|
-
}
|
|
1664
|
-
componentValueChanged(valueModel) {
|
|
1665
|
-
if (isArray(valueModel)) {
|
|
1666
|
-
valueModel.forEach(model => {
|
|
1667
|
-
this._transformValues(model);
|
|
1668
|
-
});
|
|
1669
|
-
}
|
|
1670
|
-
else {
|
|
1671
|
-
this._transformValues(valueModel);
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
ok() {
|
|
1675
|
-
this.result = { result: true, rowModel: this.rowModel };
|
|
1676
|
-
this.dialogRef.close(this.result);
|
|
1677
|
-
}
|
|
1678
|
-
close() {
|
|
1679
|
-
this.result = { result: false, rowModel: this.rowModel };
|
|
1680
|
-
this.dialogRef.close(this.result);
|
|
1681
|
-
}
|
|
1682
|
-
_transformValues(value) {
|
|
1683
|
-
const cloneRowModel = cloneDeep(this.rowModel);
|
|
1684
|
-
const findValue = cloneRowModel.data.find((c) => c.sysName === value.sysName);
|
|
1685
|
-
if (findValue) {
|
|
1686
|
-
findValue.value = value.value;
|
|
1687
|
-
}
|
|
1688
|
-
this.rowModel = cloneRowModel;
|
|
1689
|
-
}
|
|
1690
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTableModalComponent, deps: [{ token: i1$1.ModalRef }, { token: MODAL_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1691
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InputTableModalComponent, isStandalone: true, selector: "app-input-table-modal", providers: [
|
|
1692
|
-
provideNgxMask()
|
|
1693
|
-
], usesInheritance: true, ngImport: i0, template: "<mrx-modal\r\n [title]=\"title\"\r\n size=\"large\"\r\n (close)=\"close()\"\r\n (ok)=\"ok()\"\r\n>\r\n <app-form-dispenser-modal\r\n [sectionSettings]=\"settings\"\r\n [values]=\"rowModel.data\"\r\n [valueMode]=\"'manual'\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></app-form-dispenser-modal>\r\n\r\n <ng-template #footerContent>\r\n <mrx-button\r\n [customClasses]=\"'mr-3'\"\r\n [type]=\"'secondary'\"\r\n [size]=\"'medium'\"\r\n (click)=\"close()\"\r\n >\u041E\u0442\u043C\u0435\u043D\u0430\r\n </mrx-button>\r\n <mrx-button\r\n [type]=\"'primary'\"\r\n [size]=\"'medium'\"\r\n (click)=\"ok()\"\r\n >\u0421\u043E\u0437\u0434\u0430\u0442\u044C\r\n </mrx-button>\r\n </ng-template>\r\n</mrx-modal>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ModalModule }, { kind: "component", type: i1$1.ModalComponent, selector: "mrx-modal", inputs: ["title", "message", "alert", "okText", "closeText", "size", "color", "customClasses", "expandable", "isEmbed", "isClose", "isBack", "backText", "enableFooter", "alignButtons", "isLoading", "iconPosition"], outputs: ["ok", "close", "back"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.ButtonComponent, selector: "mrx-button", inputs: ["size", "type", "color", "iconPosition", "active", "disabled", "isLoading", "iconOnly", "customClasses", "label", "icon", "iconClass", "buttonType", "href", "target", "routerLink", "queryParams"], outputs: ["mrxClick"] }, { kind: "component", type: FormDispenserModal, selector: "app-form-dispenser-modal", inputs: ["sectionSettings", "values", "valueMode"], outputs: ["changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1694
|
-
}
|
|
1695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTableModalComponent, decorators: [{
|
|
1696
|
-
type: Component,
|
|
1697
|
-
args: [{ selector: 'app-input-table-modal', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1698
|
-
ModalModule,
|
|
1699
|
-
ButtonModule,
|
|
1700
|
-
FormDispenserModal,
|
|
1701
|
-
], providers: [
|
|
1702
|
-
provideNgxMask()
|
|
1703
|
-
], template: "<mrx-modal\r\n [title]=\"title\"\r\n size=\"large\"\r\n (close)=\"close()\"\r\n (ok)=\"ok()\"\r\n>\r\n <app-form-dispenser-modal\r\n [sectionSettings]=\"settings\"\r\n [values]=\"rowModel.data\"\r\n [valueMode]=\"'manual'\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></app-form-dispenser-modal>\r\n\r\n <ng-template #footerContent>\r\n <mrx-button\r\n [customClasses]=\"'mr-3'\"\r\n [type]=\"'secondary'\"\r\n [size]=\"'medium'\"\r\n (click)=\"close()\"\r\n >\u041E\u0442\u043C\u0435\u043D\u0430\r\n </mrx-button>\r\n <mrx-button\r\n [type]=\"'primary'\"\r\n [size]=\"'medium'\"\r\n (click)=\"ok()\"\r\n >\u0421\u043E\u0437\u0434\u0430\u0442\u044C\r\n </mrx-button>\r\n </ng-template>\r\n</mrx-modal>\r\n" }]
|
|
1704
|
-
}], ctorParameters: () => [{ type: i1$1.ModalRef }, { type: undefined, decorators: [{
|
|
1705
|
-
type: Inject,
|
|
1706
|
-
args: [MODAL_DATA]
|
|
1707
|
-
}] }] });
|
|
1708
|
-
|
|
1709
|
-
const getRowModel = (model) => {
|
|
1710
|
-
const getValuesFromModel = (model) => {
|
|
1711
|
-
let values = [];
|
|
1712
|
-
model.components.forEach((c) => {
|
|
1713
|
-
if (c.type === ComponentType.Group) {
|
|
1714
|
-
values = values.concat(getValuesFromModel(c));
|
|
1715
|
-
}
|
|
1716
|
-
else {
|
|
1717
|
-
values = values.concat(defaultValueModel(c));
|
|
1718
|
-
}
|
|
1719
|
-
});
|
|
1720
|
-
return values;
|
|
1721
|
-
};
|
|
1722
|
-
return { id: v4(), data: getValuesFromModel(model) };
|
|
1723
|
-
};
|
|
1724
|
-
|
|
1725
|
-
class InputTableComponent {
|
|
1726
|
-
constructor() {
|
|
1727
|
-
this.type = ComponentType.InputTable;
|
|
1728
|
-
this._store = inject(Store);
|
|
1729
|
-
this._detector = inject(ChangeDetectorRef);
|
|
1730
|
-
this._modalService = inject(ModalService);
|
|
1731
|
-
this._changeSubject$ = new Subject();
|
|
1732
|
-
this._subscriptions$ = [];
|
|
1733
|
-
this._isCheckRequired = false;
|
|
1734
|
-
this.dataSource = [];
|
|
1735
|
-
this.values = [];
|
|
1736
|
-
this.changed = new EventEmitter();
|
|
1737
|
-
}
|
|
1738
|
-
set data(settings) {
|
|
1739
|
-
this.settings = settings;
|
|
1740
|
-
this.model = { sysName: settings.sysName, type: settings.type, data: [], totals: [] };
|
|
1741
|
-
this._detector.detectChanges();
|
|
1742
|
-
}
|
|
1743
|
-
ngOnInit() {
|
|
1744
|
-
this._initModel();
|
|
1745
|
-
this._changeSubject$.pipe(debounceTime(700)).subscribe(model => {
|
|
1746
|
-
this._store.dispatch(updateValues({ value: model }));
|
|
1747
|
-
});
|
|
1748
|
-
this._subscriptions$.push(this._store.select(selectIsCheckRequired).subscribe(result => {
|
|
1749
|
-
this._isCheckRequired = result;
|
|
1750
|
-
this._detector.detectChanges();
|
|
1751
|
-
}));
|
|
1752
|
-
this._subscriptions$.push(this._store.select(selectValueModel(this.settings))
|
|
1753
|
-
.subscribe((result) => {
|
|
1754
|
-
const cloneResult = cloneDeep(result);
|
|
1755
|
-
if (cloneResult && !Array.isArray(cloneResult) && this.model.data !== cloneResult.data) {
|
|
1756
|
-
this.model = cloneResult;
|
|
1757
|
-
this._initDataSource(this.model.data);
|
|
1758
|
-
}
|
|
1759
|
-
}));
|
|
1760
|
-
}
|
|
1761
|
-
ngOnDestroy() {
|
|
1762
|
-
this._changeSubject$.unsubscribe();
|
|
1763
|
-
this._subscriptions$.forEach((subscription) => subscription.unsubscribe());
|
|
1764
|
-
}
|
|
1765
|
-
createRow() {
|
|
1766
|
-
this._modalService.open(InputTableModalComponent, {
|
|
1767
|
-
title: 'Создание строки',
|
|
1768
|
-
settings: this.settings,
|
|
1769
|
-
rowModel: getRowModel(this.settings)
|
|
1770
|
-
}).afterClosed().subscribe(resolve => {
|
|
1771
|
-
if (resolve.result) {
|
|
1772
|
-
this.model.data = [...this.model.data, resolve.rowModel];
|
|
1773
|
-
this._initDataSource(this.model.data);
|
|
1774
|
-
this._changeSubject$.next(this.model);
|
|
1775
|
-
}
|
|
1776
|
-
});
|
|
1777
|
-
}
|
|
1778
|
-
deleteRow(event) {
|
|
1779
|
-
const findRow = this.model.data.find(item => item.id === event.row.data.id);
|
|
1780
|
-
if (findRow) {
|
|
1781
|
-
this.model.data = this.model.data.filter(item => item.id !== event.row.data.id);
|
|
1782
|
-
this._initDataSource(this.model.data);
|
|
1783
|
-
this._changeSubject$.next(this.model);
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
editRow(event) {
|
|
1787
|
-
const findRow = this.model.data.find(item => item.id === event.row.data.id);
|
|
1788
|
-
if (findRow) {
|
|
1789
|
-
this._modalService.open(InputTableModalComponent, {
|
|
1790
|
-
title: 'Редактирование строки',
|
|
1791
|
-
settings: this.settings,
|
|
1792
|
-
rowModel: findRow
|
|
1793
|
-
}).afterClosed().subscribe(resolve => {
|
|
1794
|
-
if (resolve.result) {
|
|
1795
|
-
const cloneModel = cloneDeep(this.model);
|
|
1796
|
-
const findRow = cloneModel.data.find(row => row.id === resolve.rowModel.id);
|
|
1797
|
-
if (findRow) {
|
|
1798
|
-
findRow.data = resolve.rowModel.data;
|
|
1799
|
-
this._changeSubject$.next(cloneModel);
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
});
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
getFormat(component) {
|
|
1806
|
-
switch (component.type) {
|
|
1807
|
-
case ComponentType.InputDate:
|
|
1808
|
-
return 'dd.MM.yyyy';
|
|
1809
|
-
default:
|
|
1810
|
-
return '';
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
getDataType(component) {
|
|
1814
|
-
switch (component.type) {
|
|
1815
|
-
case ComponentType.InputDate:
|
|
1816
|
-
return 'date';
|
|
1817
|
-
default:
|
|
1818
|
-
return undefined;
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
showTotal(component) {
|
|
1822
|
-
if (component.type === ComponentType.InputNumber) {
|
|
1823
|
-
const element = component;
|
|
1824
|
-
return element.options.inTotals;
|
|
1825
|
-
}
|
|
1826
|
-
return false;
|
|
1827
|
-
}
|
|
1828
|
-
isTotalColumn(component) {
|
|
1829
|
-
return component.options['inTotals'];
|
|
1830
|
-
}
|
|
1831
|
-
_initModel() {
|
|
1832
|
-
this.model = {
|
|
1833
|
-
sysName: this.settings.sysName,
|
|
1834
|
-
type: this.settings.type,
|
|
1835
|
-
data: [],
|
|
1836
|
-
totals: []
|
|
1837
|
-
};
|
|
1838
|
-
}
|
|
1839
|
-
_initDataSource(data) {
|
|
1840
|
-
this.dataSource = data.map((item) => {
|
|
1841
|
-
const newDataItem = {};
|
|
1842
|
-
for (let i in item.data) {
|
|
1843
|
-
newDataItem[item.data[i].sysName] = item.data[i].value;
|
|
1844
|
-
}
|
|
1845
|
-
newDataItem.id = item.id;
|
|
1846
|
-
return newDataItem;
|
|
1847
|
-
});
|
|
1848
|
-
this._detector.detectChanges();
|
|
1849
|
-
this.dataGrid.instance.refresh();
|
|
1850
|
-
}
|
|
1851
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputTableComponent, selector: "app-input-table", inputs: { values: "values", data: "data" }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: ["dataGrid"], descendants: true }], ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-table-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <dx-data-grid\r\n #dataGrid\r\n [dataSource]=\"dataSource\"\r\n noDataText=\"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445\"\r\n >\r\n <dxo-toolbar>\r\n <dxi-item location=\"after\">\r\n <div *dxTemplate class=\"add-row\">\r\n <mrx-button\r\n [size]=\"'medium'\"\r\n [type]=\"'tertiary'\"\r\n [customClasses]=\"'px-3'\"\r\n (mrxClick)=\"createRow()\"\r\n >\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\r\n </mrx-button>\r\n </div>\r\n </dxi-item>\r\n </dxo-toolbar>\r\n\r\n @for (component of settings.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n >\r\n @for (component of component.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n >\r\n @for (component of component.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n ></dxi-column>\r\n }\r\n </dxi-column>\r\n }\r\n </dxi-column>\r\n }\r\n\r\n <dxi-column\r\n [width]=\"60\"\r\n [allowFiltering]=\"false\"\r\n [allowSorting]=\"false\"\r\n [visible]=\"true\"\r\n cellTemplate=\"editCellTemplate\"\r\n >\r\n <div *dxTemplate=\"let cellInfo of 'editCellTemplate'\">\r\n <div class=\"d-flex align-items-center justify-content-center\" style=\"gap: 4px\">\r\n <span class=\"mrx-icon icon-edit icon-font-16 cursor-pointer\" (click)=\"editRow(cellInfo)\"></span>\r\n <span class=\"mrx-icon icon-delete icon-font-16 cursor-pointer\" (click)=\"deleteRow(cellInfo)\"></span>\r\n </div>\r\n </div>\r\n </dxi-column>\r\n\r\n @if (dataSource.length) {\r\n <dxo-summary>\r\n @for (component of settings.components; track component.id; let first = $first) {\r\n @if (!first) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n } @else {\r\n @if (isTotalColumn(component)) {\r\n <dxi-total-item [column]=\"component.sysName\" [displayFormat]=\"'{0}'\"></dxi-total-item>\r\n } @else {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [cssClass]=\"'text-bold'\"\r\n [displayFormat]=\"'\u0418\u0422\u041E\u0413\u041E'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n </dxo-summary>\r\n }\r\n </dx-data-grid>\r\n </div>\r\n}\r\n\r\n\r\n", styles: [":host::ng-deep .input-table-content .dx-datagrid{padding:0}:host::ng-deep .input-table-content .dx-datagrid-header-panel{display:flex;align-items:center;min-height:40px;padding:0}:host::ng-deep .input-table-content .dx-datagrid-rowsview{border-bottom:none}:host::ng-deep .input-table-content .dx-datagrid-rowsview.dx-empty{border-bottom:1px solid #ddd;height:48px}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer{border-top:none;border-left:none;border-right:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content{padding:0}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content th,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content td{border:1px solid #ddd;border-top:none;border-collapse:collapse}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table{border-top:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content .dx-datagrid-summary-item{font-weight:400}\n"], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "component", type: i1$1.ButtonComponent, selector: "mrx-button", inputs: ["size", "type", "color", "iconPosition", "active", "disabled", "isLoading", "iconOnly", "customClasses", "label", "icon", "iconClass", "buttonType", "href", "target", "routerLink", "queryParams"], outputs: ["mrxClick"] }, { kind: "component", type: i2$3.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i3$1.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i3$1.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "linkAttr", "url", "heightRatio", "widthRatio", "expanded", "hasItems", "id", "parentId"] }, { kind: "component", type: i3$1.DxoSummaryComponent, selector: "dxo-summary", inputs: ["calculateCustomSummary", "groupItems", "recalculateWhileEditing", "skipEmptyValues", "texts", "totalItems"] }, { kind: "component", type: i3$1.DxiTotalItemComponent, selector: "dxi-total-item", inputs: ["alignment", "column", "cssClass", "customizeText", "displayFormat", "name", "showInColumn", "skipEmptyValues", "summaryType", "valueFormat"] }, { kind: "component", type: i3$1.DxoToolbarComponent, selector: "dxo-toolbar", inputs: ["disabled", "items", "visible", "fileSelectionItems", "container", "multiline"] }, { kind: "directive", type: i4.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1853
|
-
}
|
|
1854
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTableComponent, decorators: [{
|
|
1855
|
-
type: Component,
|
|
1856
|
-
args: [{ selector: 'app-input-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-table-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <dx-data-grid\r\n #dataGrid\r\n [dataSource]=\"dataSource\"\r\n noDataText=\"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445\"\r\n >\r\n <dxo-toolbar>\r\n <dxi-item location=\"after\">\r\n <div *dxTemplate class=\"add-row\">\r\n <mrx-button\r\n [size]=\"'medium'\"\r\n [type]=\"'tertiary'\"\r\n [customClasses]=\"'px-3'\"\r\n (mrxClick)=\"createRow()\"\r\n >\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\r\n </mrx-button>\r\n </div>\r\n </dxi-item>\r\n </dxo-toolbar>\r\n\r\n @for (component of settings.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n >\r\n @for (component of component.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n >\r\n @for (component of component.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n ></dxi-column>\r\n }\r\n </dxi-column>\r\n }\r\n </dxi-column>\r\n }\r\n\r\n <dxi-column\r\n [width]=\"60\"\r\n [allowFiltering]=\"false\"\r\n [allowSorting]=\"false\"\r\n [visible]=\"true\"\r\n cellTemplate=\"editCellTemplate\"\r\n >\r\n <div *dxTemplate=\"let cellInfo of 'editCellTemplate'\">\r\n <div class=\"d-flex align-items-center justify-content-center\" style=\"gap: 4px\">\r\n <span class=\"mrx-icon icon-edit icon-font-16 cursor-pointer\" (click)=\"editRow(cellInfo)\"></span>\r\n <span class=\"mrx-icon icon-delete icon-font-16 cursor-pointer\" (click)=\"deleteRow(cellInfo)\"></span>\r\n </div>\r\n </div>\r\n </dxi-column>\r\n\r\n @if (dataSource.length) {\r\n <dxo-summary>\r\n @for (component of settings.components; track component.id; let first = $first) {\r\n @if (!first) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n } @else {\r\n @if (isTotalColumn(component)) {\r\n <dxi-total-item [column]=\"component.sysName\" [displayFormat]=\"'{0}'\"></dxi-total-item>\r\n } @else {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [cssClass]=\"'text-bold'\"\r\n [displayFormat]=\"'\u0418\u0422\u041E\u0413\u041E'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n </dxo-summary>\r\n }\r\n </dx-data-grid>\r\n </div>\r\n}\r\n\r\n\r\n", styles: [":host::ng-deep .input-table-content .dx-datagrid{padding:0}:host::ng-deep .input-table-content .dx-datagrid-header-panel{display:flex;align-items:center;min-height:40px;padding:0}:host::ng-deep .input-table-content .dx-datagrid-rowsview{border-bottom:none}:host::ng-deep .input-table-content .dx-datagrid-rowsview.dx-empty{border-bottom:1px solid #ddd;height:48px}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer{border-top:none;border-left:none;border-right:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content{padding:0}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content th,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content td{border:1px solid #ddd;border-top:none;border-collapse:collapse}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table{border-top:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content .dx-datagrid-summary-item{font-weight:400}\n"] }]
|
|
1857
|
-
}], propDecorators: { values: [{
|
|
1858
|
-
type: Input
|
|
1859
|
-
}], data: [{
|
|
1860
|
-
type: Input
|
|
1861
|
-
}], dataGrid: [{
|
|
1862
|
-
type: ViewChild,
|
|
1863
|
-
args: ['dataGrid', { static: false }]
|
|
1864
|
-
}], changed: [{
|
|
1865
|
-
type: Output
|
|
1866
|
-
}] } });
|
|
1867
|
-
|
|
1868
|
-
class ContentTitleComponent extends BaseElementComponent {
|
|
1869
|
-
constructor() {
|
|
1870
|
-
super(...arguments);
|
|
1871
|
-
this.type = ComponentType.ContentTitle;
|
|
1872
|
-
}
|
|
1873
|
-
get getSizeClass() {
|
|
1874
|
-
return this.settings.options.size === 'large' ? '-large' : this.settings.options.size === 'medium' ? '-medium' : '-small';
|
|
1875
|
-
}
|
|
1876
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentTitleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1877
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentTitleComponent, selector: "app-content-title", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"content-title-content\">\r\n <h4\r\n class=\"content-title-content__title\"\r\n [class]=\"getSizeClass\"\r\n [class.mb-2]=\"settings.options.text && (settings.options.size === 'large' || settings.options.size === 'medium')\"\r\n [class.mb-1]=\"settings.options.text && (settings.options.size === 'small')\"\r\n >\r\n {{ settings.options.title }}\r\n </h4>\r\n\r\n <p class=\"content-title-content__text\" [innerHTML]=\"settings.options.text\"></p>\r\n </div>\r\n}\r\n", styles: [".content-title-content__title{color:var(--neutral-text-primary, #262626);font-style:normal}.content-title-content__title.-large{font-family:var(--headlines-lvl-4-font-family, \"PT Sans Caption\");font-size:var(--headlines-lvl-4-font-size, 18px);line-height:var(--headlines-lvl-4-line-height, 24px);font-weight:var(--headlines-lvl-4-font-weight, 700)}.content-title-content__title.-medium{font-family:var(--headlines-lvl-5-font-family, \"PT Sans Caption\");font-size:var(--headlines-lvl-5-font-size, 18px);line-height:var(--headlines-lvl-5-line-height, 24px);font-weight:var(--headlines-lvl-5-font-weight, 700)}.content-title-content__title.-small{font-family:var(--headlines-lvl-6-font-family, \"PT Sans Caption\");font-size:var(--headlines-lvl-6-font-size, 18px);line-height:var(--headlines-lvl-6-line-height, 24px);font-weight:var(--headlines-lvl-6-font-weight, 700)}.content-title-content__text{color:var(--neutral-text-primary, #262626);font-style:normal;font-family:var(--body-md-font-family, \"PT Sans\");font-size:var(--body-md-font-size, 14px);line-height:var(--body-md-line-height, 20px);font-weight:var(--body-md-font-weight, 400)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1878
|
-
}
|
|
1879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentTitleComponent, decorators: [{
|
|
1880
|
-
type: Component,
|
|
1881
|
-
args: [{ selector: 'app-content-title', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"content-title-content\">\r\n <h4\r\n class=\"content-title-content__title\"\r\n [class]=\"getSizeClass\"\r\n [class.mb-2]=\"settings.options.text && (settings.options.size === 'large' || settings.options.size === 'medium')\"\r\n [class.mb-1]=\"settings.options.text && (settings.options.size === 'small')\"\r\n >\r\n {{ settings.options.title }}\r\n </h4>\r\n\r\n <p class=\"content-title-content__text\" [innerHTML]=\"settings.options.text\"></p>\r\n </div>\r\n}\r\n", styles: [".content-title-content__title{color:var(--neutral-text-primary, #262626);font-style:normal}.content-title-content__title.-large{font-family:var(--headlines-lvl-4-font-family, \"PT Sans Caption\");font-size:var(--headlines-lvl-4-font-size, 18px);line-height:var(--headlines-lvl-4-line-height, 24px);font-weight:var(--headlines-lvl-4-font-weight, 700)}.content-title-content__title.-medium{font-family:var(--headlines-lvl-5-font-family, \"PT Sans Caption\");font-size:var(--headlines-lvl-5-font-size, 18px);line-height:var(--headlines-lvl-5-line-height, 24px);font-weight:var(--headlines-lvl-5-font-weight, 700)}.content-title-content__title.-small{font-family:var(--headlines-lvl-6-font-family, \"PT Sans Caption\");font-size:var(--headlines-lvl-6-font-size, 18px);line-height:var(--headlines-lvl-6-line-height, 24px);font-weight:var(--headlines-lvl-6-font-weight, 700)}.content-title-content__text{color:var(--neutral-text-primary, #262626);font-style:normal;font-family:var(--body-md-font-family, \"PT Sans\");font-size:var(--body-md-font-size, 14px);line-height:var(--body-md-line-height, 20px);font-weight:var(--body-md-font-weight, 400)}\n"] }]
|
|
1882
|
-
}] });
|
|
1883
|
-
|
|
1884
|
-
class ContentTextComponent extends BaseElementComponent {
|
|
1885
|
-
constructor() {
|
|
1886
|
-
super(...arguments);
|
|
1887
|
-
this.type = ComponentType.ContentText;
|
|
1888
|
-
}
|
|
1889
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1890
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentTextComponent, selector: "app-content-input-table-modal", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"content-text-content\">\r\n <p class=\"content-text-content__text\" [innerHTML]=\"settings.options.text\"></p>\r\n </div>\r\n}\r\n", styles: [".content-text-content__text{color:var(--neutral-text-primary, #262626);font-style:normal;font-family:var(--body-md-font-family, \"PT Sans\");font-size:var(--body-md-font-size, 14px);line-height:var(--body-md-line-height, 20px);font-weight:var(--body-md-font-weight, 400)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1891
|
-
}
|
|
1892
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentTextComponent, decorators: [{
|
|
1893
|
-
type: Component,
|
|
1894
|
-
args: [{ selector: 'app-content-input-table-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"content-text-content\">\r\n <p class=\"content-text-content__text\" [innerHTML]=\"settings.options.text\"></p>\r\n </div>\r\n}\r\n", styles: [".content-text-content__text{color:var(--neutral-text-primary, #262626);font-style:normal;font-family:var(--body-md-font-family, \"PT Sans\");font-size:var(--body-md-font-size, 14px);line-height:var(--body-md-line-height, 20px);font-weight:var(--body-md-font-weight, 400)}\n"] }]
|
|
1895
|
-
}] });
|
|
1896
|
-
|
|
1897
|
-
class ContentTooltipComponent extends BaseElementComponent {
|
|
1898
|
-
constructor() {
|
|
1899
|
-
super(...arguments);
|
|
1900
|
-
this.type = ComponentType.ContentTooltip;
|
|
1901
|
-
}
|
|
1902
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentTooltipComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1903
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentTooltipComponent, selector: "app-content-tooltip", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"content-tooltip-content\">\r\n <mrx-alert\r\n [title]=\"settings.options.title\"\r\n [message]=\"settings.options.text\"\r\n [color]=\"settings.options.color\"\r\n ></mrx-alert>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.AlertComponent, selector: "mrx-alert", inputs: ["customClasses", "color", "customColor", "message", "title", "closable"], outputs: ["close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1904
|
-
}
|
|
1905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentTooltipComponent, decorators: [{
|
|
1906
|
-
type: Component,
|
|
1907
|
-
args: [{ selector: 'app-content-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"content-tooltip-content\">\r\n <mrx-alert\r\n [title]=\"settings.options.title\"\r\n [message]=\"settings.options.text\"\r\n [color]=\"settings.options.color\"\r\n ></mrx-alert>\r\n </div>\r\n}\r\n" }]
|
|
1908
|
-
}] });
|
|
1909
|
-
|
|
1910
|
-
class ContentFileComponent extends BaseElementComponent {
|
|
1911
|
-
constructor() {
|
|
1912
|
-
super(...arguments);
|
|
1913
|
-
this.type = ComponentType.ContentFile;
|
|
1914
|
-
this.formatBytes = formatBytes;
|
|
1915
|
-
}
|
|
1916
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentFileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1917
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentFileComponent, selector: "app-content-file", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"content-file-content\">\r\n @if (settings.options.fileId) {\r\n <a\r\n [href]=\"'/form/api/v1/admin/template/' + (applicationId$ | async) + '/file/' + settings.options.fileId\"\r\n target=\"_blank\"\r\n class=\"content-file-content__file\"\r\n >\r\n <div class=\"content-file-content__file-content\">\r\n <div class=\"content-file-content__file-content__title\">\r\n <span class=\"mrx-icon icon-file icon-font-24\"></span>\r\n <p>{{ settings.options.fileName }}</p>\r\n </div>\r\n\r\n <div class=\"content-file-content__file-content__info\">\r\n <div class=\"content-file-content__file-content__info--item\">\r\n <span>{{formatBytes(settings.options.fileSize)}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n } @else {\r\n <div class=\"content-file-content__file\">\r\n <div class=\"content-file-content__file-content\">\r\n <div class=\"content-file-content__file-content__title\">\r\n <span class=\"mrx-icon icon-file icon-font-24\"></span>\r\n <p>\u0424\u0430\u0439\u043B \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D</p>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".content-file-content__file{border-radius:4px;border:1px solid var(--neutral-bg-stroke-default, #DBDFE5);background:var(--brand-bg-tertiary-default, #FFF);padding:11px;display:block;color:var(--neutral-text-primary, #262626)}.content-file-content__file:hover{color:var(--brand-bg-primary-hover, #0f54aa);border:1px solid var(--brand-bg-primary-hover, #0f54aa)}.content-file-content__file-content{display:flex;align-items:center;justify-content:space-between;gap:8px}.content-file-content__file-content__title{display:flex;align-items:center;justify-content:flex-start;gap:8px}.content-file-content__file-content__title p{font-style:normal;font-family:var(--body-md-font-family, \"PT Sans\");font-size:var(--body-md-font-size, 14px);line-height:var(--body-md-line-height, 20px);font-weight:var(--body-md-font-weight, 400)}.content-file-content__file-content__info{display:flex;align-items:center;justify-content:flex-end;gap:8px}.content-file-content__file-content__info--item{display:flex;align-items:center;gap:4px}\n"], dependencies: [{ kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1918
|
-
}
|
|
1919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentFileComponent, decorators: [{
|
|
1920
|
-
type: Component,
|
|
1921
|
-
args: [{ selector: 'app-content-file', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"content-file-content\">\r\n @if (settings.options.fileId) {\r\n <a\r\n [href]=\"'/form/api/v1/admin/template/' + (applicationId$ | async) + '/file/' + settings.options.fileId\"\r\n target=\"_blank\"\r\n class=\"content-file-content__file\"\r\n >\r\n <div class=\"content-file-content__file-content\">\r\n <div class=\"content-file-content__file-content__title\">\r\n <span class=\"mrx-icon icon-file icon-font-24\"></span>\r\n <p>{{ settings.options.fileName }}</p>\r\n </div>\r\n\r\n <div class=\"content-file-content__file-content__info\">\r\n <div class=\"content-file-content__file-content__info--item\">\r\n <span>{{formatBytes(settings.options.fileSize)}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n } @else {\r\n <div class=\"content-file-content__file\">\r\n <div class=\"content-file-content__file-content\">\r\n <div class=\"content-file-content__file-content__title\">\r\n <span class=\"mrx-icon icon-file icon-font-24\"></span>\r\n <p>\u0424\u0430\u0439\u043B \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D</p>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".content-file-content__file{border-radius:4px;border:1px solid var(--neutral-bg-stroke-default, #DBDFE5);background:var(--brand-bg-tertiary-default, #FFF);padding:11px;display:block;color:var(--neutral-text-primary, #262626)}.content-file-content__file:hover{color:var(--brand-bg-primary-hover, #0f54aa);border:1px solid var(--brand-bg-primary-hover, #0f54aa)}.content-file-content__file-content{display:flex;align-items:center;justify-content:space-between;gap:8px}.content-file-content__file-content__title{display:flex;align-items:center;justify-content:flex-start;gap:8px}.content-file-content__file-content__title p{font-style:normal;font-family:var(--body-md-font-family, \"PT Sans\");font-size:var(--body-md-font-size, 14px);line-height:var(--body-md-line-height, 20px);font-weight:var(--body-md-font-weight, 400)}.content-file-content__file-content__info{display:flex;align-items:center;justify-content:flex-end;gap:8px}.content-file-content__file-content__info--item{display:flex;align-items:center;gap:4px}\n"] }]
|
|
1922
|
-
}] });
|
|
1923
|
-
|
|
1924
|
-
class ContentDividerComponent extends BaseElementComponent {
|
|
1925
|
-
constructor() {
|
|
1926
|
-
super(...arguments);
|
|
1927
|
-
this.type = ComponentType.ContentDivider;
|
|
1928
|
-
}
|
|
1929
|
-
get getSizeClass() {
|
|
1930
|
-
return this.settings.options.size === 'large' ? '-large' : this.settings.options.size === 'medium' ? '-medium' : '-small';
|
|
1931
|
-
}
|
|
1932
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentDividerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1933
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ContentDividerComponent, selector: "app-content-divider", usesInheritance: true, ngImport: i0, template: "@if (settings) {\r\n <div class=\"content-divider-content\">\r\n <hr class=\"content-divider-content__line\" [class]=\"getSizeClass\">\r\n </div>\r\n}\r\n", styles: [".content-divider-content__line{background:#dbdfe5}.content-divider-content__line.-large{margin-top:12px;margin-bottom:12px}.content-divider-content__line.-medium{margin-top:8px;margin-bottom:8px}.content-divider-content__line.-small{margin-top:4px;margin-bottom:4px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1934
|
-
}
|
|
1935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentDividerComponent, decorators: [{
|
|
1936
|
-
type: Component,
|
|
1937
|
-
args: [{ selector: 'app-content-divider', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"content-divider-content\">\r\n <hr class=\"content-divider-content__line\" [class]=\"getSizeClass\">\r\n </div>\r\n}\r\n", styles: [".content-divider-content__line{background:#dbdfe5}.content-divider-content__line.-large{margin-top:12px;margin-bottom:12px}.content-divider-content__line.-medium{margin-top:8px;margin-bottom:8px}.content-divider-content__line.-small{margin-top:4px;margin-bottom:4px}\n"] }]
|
|
1938
|
-
}] });
|
|
1939
|
-
|
|
1940
|
-
const contentComponentsMap = {
|
|
1941
|
-
[ComponentType.InputText]: InputTextComponent,
|
|
1942
|
-
[ComponentType.InputTextarea]: InputTextareaComponent,
|
|
1943
|
-
[ComponentType.InputLink]: InputLinkComponent,
|
|
1944
|
-
[ComponentType.InputSwitch]: InputSwitchComponent,
|
|
1945
|
-
[ComponentType.InputNumber]: InputNumberComponent,
|
|
1946
|
-
[ComponentType.InputSelect]: InputSelectComponent,
|
|
1947
|
-
[ComponentType.InputDate]: InputDateComponent,
|
|
1948
|
-
[ComponentType.InputINN]: InputInnComponent,
|
|
1949
|
-
[ComponentType.InputFile]: InputFileComponent,
|
|
1950
|
-
[ComponentType.InputPhone]: InputPhoneComponent,
|
|
1951
|
-
[ComponentType.InputCheckboxGroup]: InputCheckboxGroupComponent,
|
|
1952
|
-
[ComponentType.InputRadioGroup]: InputRadioGroupComponent,
|
|
1953
|
-
[ComponentType.InputTable]: InputTableComponent,
|
|
1954
|
-
[ComponentType.ContentTitle]: ContentTitleComponent,
|
|
1955
|
-
[ComponentType.ContentText]: ContentTextComponent,
|
|
1956
|
-
[ComponentType.ContentTooltip]: ContentTooltipComponent,
|
|
1957
|
-
[ComponentType.ContentFile]: ContentFileComponent,
|
|
1958
|
-
[ComponentType.ContentDivider]: ContentDividerComponent,
|
|
1959
|
-
};
|
|
1960
|
-
|
|
1961
|
-
class AbstractComponent {
|
|
1962
|
-
constructor() {
|
|
1963
|
-
this.changed = new EventEmitter();
|
|
1964
|
-
}
|
|
1965
|
-
set data(settings) { }
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
class FormDispenser {
|
|
1969
|
-
constructor() {
|
|
1970
|
-
this._store = inject(Store);
|
|
1971
|
-
this._detector = inject(ChangeDetectorRef);
|
|
1972
|
-
this._subscriptions$ = [];
|
|
1973
|
-
this._fieldDependencyRulesCheckResults = [];
|
|
1974
|
-
this.mapper = contentComponentsMap;
|
|
1975
|
-
this.values = [];
|
|
1976
|
-
this.valueMode = 'auto';
|
|
1977
|
-
this.changed = new EventEmitter();
|
|
1978
|
-
}
|
|
1979
|
-
ngOnInit() {
|
|
1980
|
-
this._subscriptions$.push(this._store.select(selectDependencyRulesResults)
|
|
1981
|
-
.subscribe(results => {
|
|
1982
|
-
this._fieldDependencyRulesCheckResults = results;
|
|
1983
|
-
this._detector.detectChanges();
|
|
1984
|
-
}));
|
|
1985
|
-
}
|
|
1986
|
-
ngOnDestroy() {
|
|
1987
|
-
this._subscriptions$.forEach((subscription) => subscription.unsubscribe());
|
|
1988
|
-
}
|
|
1989
|
-
componentValueChanged(event) {
|
|
1990
|
-
this.changed.emit(event);
|
|
1991
|
-
}
|
|
1992
|
-
isComponentVisible(sysName) {
|
|
1993
|
-
const result = this._fieldDependencyRulesCheckResults.find(x => x.sysName === sysName);
|
|
1994
|
-
if (!result) {
|
|
1995
|
-
return true;
|
|
1996
|
-
}
|
|
1997
|
-
let visible = true;
|
|
1998
|
-
switch (result.actionType) {
|
|
1999
|
-
case DependenceActionType.show:
|
|
2000
|
-
visible = result.conditionResult;
|
|
2001
|
-
break;
|
|
2002
|
-
default:
|
|
2003
|
-
break;
|
|
2004
|
-
}
|
|
2005
|
-
return visible;
|
|
2006
|
-
}
|
|
2007
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormDispenser, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2008
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: FormDispenser, isStandalone: true, selector: "app-form-dispenser", inputs: { sectionSettings: "sectionSettings", values: "values", valueMode: "valueMode" }, outputs: { changed: "changed" }, ngImport: i0, template: "@if (sectionSettings?.components?.length) {\r\n <div class=\"row application-form__content\">\r\n @for (component of sectionSettings?.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n}\r\n\r\n<ng-template #dragGroup let-component='component'>\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n @if (component.options.label) {\r\n <mrx-label>{{ component.options.label }}</mrx-label>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"application-form__group p-2\">\r\n @if (component.components.length) {\r\n <div class=\"row\">\r\n @for (component of component.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n } @else {\r\n <p class=\"p-2\">\u042D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0433\u0440\u0443\u043F\u043F\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442</p>\r\n }\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dragInput let-component='component'>\r\n @if (isComponentVisible(component.sysName)) {\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"application-form__input\">\r\n <ng-template\r\n appComponentFactory\r\n [type]=\"component.type\"\r\n [data]=\"component\"\r\n [map]=\"mapper\"\r\n [values]=\"values\"\r\n [valueMode]=\"valueMode\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".application-form__group{border-radius:4px;border:1px solid var(--neutral-bg-stroke-default, #DBDFE5)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: LabelModule }, { kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "directive", type: ComponentFactoryDirective, selector: "[appComponentFactory]", inputs: ["type", "data", "values", "valueMode", "map"], outputs: ["changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2009
|
-
}
|
|
2010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormDispenser, decorators: [{
|
|
2011
|
-
type: Component,
|
|
2012
|
-
args: [{ selector: 'app-form-dispenser', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
2013
|
-
CommonModule,
|
|
2014
|
-
LabelModule,
|
|
2015
|
-
ComponentFactoryDirective
|
|
2016
|
-
], template: "@if (sectionSettings?.components?.length) {\r\n <div class=\"row application-form__content\">\r\n @for (component of sectionSettings?.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n}\r\n\r\n<ng-template #dragGroup let-component='component'>\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n @if (component.options.label) {\r\n <mrx-label>{{ component.options.label }}</mrx-label>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"application-form__group p-2\">\r\n @if (component.components.length) {\r\n <div class=\"row\">\r\n @for (component of component.components; track component.id) {\r\n @switch (component.type) {\r\n @case ('group') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragGroup\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n @default {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dragInput\"\r\n [ngTemplateOutletContext]=\"{component: component}\"\r\n ></ng-container>\r\n }\r\n }\r\n }\r\n </div>\r\n } @else {\r\n <p class=\"p-2\">\u042D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0433\u0440\u0443\u043F\u043F\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442</p>\r\n }\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dragInput let-component='component'>\r\n @if (isComponentVisible(component.sysName)) {\r\n <div class=\"col col-{{component.options.width}}\">\r\n <div class=\"application-form__input\">\r\n <ng-template\r\n appComponentFactory\r\n [type]=\"component.type\"\r\n [data]=\"component\"\r\n [map]=\"mapper\"\r\n [values]=\"values\"\r\n [valueMode]=\"valueMode\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".application-form__group{border-radius:4px;border:1px solid var(--neutral-bg-stroke-default, #DBDFE5)}\n"] }]
|
|
2017
|
-
}], propDecorators: { sectionSettings: [{
|
|
2018
|
-
type: Input
|
|
2019
|
-
}], values: [{
|
|
2020
|
-
type: Input
|
|
2021
|
-
}], valueMode: [{
|
|
2022
|
-
type: Input
|
|
2023
|
-
}], changed: [{
|
|
2024
|
-
type: Output
|
|
2025
|
-
}] } });
|
|
2026
|
-
|
|
2027
|
-
class ApplicationContent {
|
|
2028
|
-
constructor() {
|
|
2029
|
-
this._store = inject(Store);
|
|
2030
|
-
this._changeSubject$ = new Subject();
|
|
2031
|
-
this.sectionSettings$ = this._store.select(selectSectionSettings);
|
|
2032
|
-
}
|
|
2033
|
-
ngOnInit() {
|
|
2034
|
-
this._changeSubject$.subscribe(model => {
|
|
2035
|
-
this._store.dispatch(updateValues({ value: model }));
|
|
2036
|
-
});
|
|
2037
|
-
}
|
|
2038
|
-
changeCheckRequiredState() {
|
|
2039
|
-
this._store.dispatch(toggleCheckRequired());
|
|
2040
|
-
}
|
|
2041
|
-
componentValueChanged(model) {
|
|
2042
|
-
this._changeSubject$.next(model);
|
|
2043
|
-
}
|
|
2044
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ApplicationContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2045
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ApplicationContent, selector: "app-object-form-content", ngImport: i0, template: "<mrx-content-wrapper maxWidth=\"1144px\" customClasses=\"px-3\">\r\n @if (sectionSettings$ | async) {\r\n <mrx-content-wrapper type=\"default\" maxWidth=\"1112px\">\r\n <div class=\"row mb-4 mt-12px\">\r\n <div class=\"col\">\r\n <div class=\"application-form__title\">\r\n <h3>{{ (sectionSettings$ | async)?.options?.title }}</h3>\r\n <mrx-link type=\"pseudo\" [prevent]=\"true\" (click)=\"changeCheckRequiredState()\">\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0444\u043E\u0440\u043C\u0443</mrx-link>\r\n </div>\r\n </div>\r\n </div>\r\n </mrx-content-wrapper>\r\n\r\n <mrx-content-wrapper type=\"colored\" maxWidth=\"1112px\">\r\n <app-form-dispenser\r\n [sectionSettings]=\"sectionSettings$ | async\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></app-form-dispenser>\r\n </mrx-content-wrapper>\r\n }\r\n</mrx-content-wrapper>\r\n\r\n\r\n", styles: ["::ng-deep .application-form__title{display:flex;align-items:flex-end;justify-content:flex-start;flex-wrap:wrap;gap:8px 16px}::ng-deep .application-form__content{row-gap:16px}::ng-deep .application-form__group .row{row-gap:16px}\n"], dependencies: [{ kind: "component", type: FormDispenser, selector: "app-form-dispenser", inputs: ["sectionSettings", "values", "valueMode"], outputs: ["changed"] }, { kind: "component", type: i1$1.ContentWrapperComponent, selector: "mrx-content-wrapper", inputs: ["type", "customClasses", "maxWidth"] }, { kind: "component", type: i1$1.LinkComponent, selector: "mrx-link", inputs: ["href", "target", "routerLink", "queryParams", "type", "monochrome", "customClasses", "prevent", "size"], outputs: ["clicked"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2046
|
-
}
|
|
2047
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ApplicationContent, decorators: [{
|
|
2048
|
-
type: Component,
|
|
2049
|
-
args: [{ selector: 'app-object-form-content', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mrx-content-wrapper maxWidth=\"1144px\" customClasses=\"px-3\">\r\n @if (sectionSettings$ | async) {\r\n <mrx-content-wrapper type=\"default\" maxWidth=\"1112px\">\r\n <div class=\"row mb-4 mt-12px\">\r\n <div class=\"col\">\r\n <div class=\"application-form__title\">\r\n <h3>{{ (sectionSettings$ | async)?.options?.title }}</h3>\r\n <mrx-link type=\"pseudo\" [prevent]=\"true\" (click)=\"changeCheckRequiredState()\">\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0444\u043E\u0440\u043C\u0443</mrx-link>\r\n </div>\r\n </div>\r\n </div>\r\n </mrx-content-wrapper>\r\n\r\n <mrx-content-wrapper type=\"colored\" maxWidth=\"1112px\">\r\n <app-form-dispenser\r\n [sectionSettings]=\"sectionSettings$ | async\"\r\n (changed)=\"componentValueChanged($event)\"\r\n ></app-form-dispenser>\r\n </mrx-content-wrapper>\r\n }\r\n</mrx-content-wrapper>\r\n\r\n\r\n", styles: ["::ng-deep .application-form__title{display:flex;align-items:flex-end;justify-content:flex-start;flex-wrap:wrap;gap:8px 16px}::ng-deep .application-form__content{row-gap:16px}::ng-deep .application-form__group .row{row-gap:16px}\n"] }]
|
|
2050
|
-
}] });
|
|
2051
|
-
|
|
2052
|
-
const routes = [
|
|
2053
|
-
{
|
|
2054
|
-
path: 'preview/:templateSysName',
|
|
2055
|
-
component: ObjectFormComponent,
|
|
2056
|
-
children: [
|
|
2057
|
-
{
|
|
2058
|
-
path: ':sectionSysName',
|
|
2059
|
-
component: ApplicationContent
|
|
2060
|
-
}
|
|
2061
|
-
]
|
|
2062
|
-
},
|
|
2063
|
-
{
|
|
2064
|
-
path: '',
|
|
2065
|
-
component: ObjectFormComponent,
|
|
2066
|
-
children: [
|
|
2067
|
-
{
|
|
2068
|
-
path: ':sectionSysName',
|
|
2069
|
-
component: ApplicationContent
|
|
2070
|
-
}
|
|
2071
|
-
]
|
|
2072
|
-
},
|
|
2073
|
-
];
|
|
2074
|
-
class ObjectFormRoutingModule {
|
|
2075
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2076
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormRoutingModule, imports: [i3.RouterModule], exports: [RouterModule] }); }
|
|
2077
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
2078
|
-
}
|
|
2079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormRoutingModule, decorators: [{
|
|
2080
|
-
type: NgModule,
|
|
2081
|
-
args: [{
|
|
2082
|
-
imports: [RouterModule.forChild(routes)],
|
|
2083
|
-
exports: [RouterModule]
|
|
2084
|
-
}]
|
|
2085
|
-
}] });
|
|
2086
|
-
|
|
2087
|
-
class ConcurrencyInterceptor {
|
|
2088
|
-
constructor(_toasterService) {
|
|
2089
|
-
this._toasterService = _toasterService;
|
|
2090
|
-
}
|
|
2091
|
-
intercept(req, next) {
|
|
2092
|
-
return next.handle(req).pipe(catchError(error => {
|
|
2093
|
-
return this.handleError(error);
|
|
2094
|
-
}));
|
|
2095
|
-
}
|
|
2096
|
-
handleError(error) {
|
|
2097
|
-
if (error.status === 409) {
|
|
2098
|
-
this._toasterService.show({
|
|
2099
|
-
title: 'Данные были изменены.',
|
|
2100
|
-
message: 'Для продолжения работы обновите страницу.',
|
|
2101
|
-
type: ToasterType.Negative
|
|
2102
|
-
});
|
|
2103
|
-
}
|
|
2104
|
-
return throwError(error);
|
|
2105
|
-
}
|
|
2106
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyInterceptor, deps: [{ token: i1$1.ToasterService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2107
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyInterceptor }); }
|
|
2108
|
-
}
|
|
2109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyInterceptor, decorators: [{
|
|
2110
|
-
type: Injectable
|
|
2111
|
-
}], ctorParameters: () => [{ type: i1$1.ToasterService }] });
|
|
2112
|
-
|
|
2113
|
-
const FORM_SHARED_STORE_MODULE_NAME = 'FORM_SHARED_STORE_MODULE_NAME';
|
|
2114
|
-
|
|
2115
|
-
class SharedStoreModule {
|
|
2116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2117
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, imports: [CommonModule, i1.EffectsFeatureModule, i2.StoreFeatureModule] }); }
|
|
2118
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, imports: [CommonModule,
|
|
2119
|
-
EffectsModule.forFeature(EFFECTS),
|
|
2120
|
-
StoreModule.forFeature(FORM_SHARED_STORE_MODULE_NAME, sharedStoreReducer)] }); }
|
|
2121
|
-
}
|
|
2122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, decorators: [{
|
|
2123
|
-
type: NgModule,
|
|
2124
|
-
args: [{
|
|
2125
|
-
imports: [
|
|
2126
|
-
CommonModule,
|
|
2127
|
-
EffectsModule.forFeature(EFFECTS),
|
|
2128
|
-
StoreModule.forFeature(FORM_SHARED_STORE_MODULE_NAME, sharedStoreReducer),
|
|
2129
|
-
]
|
|
2130
|
-
}]
|
|
2131
|
-
}] });
|
|
2132
|
-
|
|
2133
|
-
class ObjectFormModule {
|
|
2134
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2135
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, declarations: [ObjectFormComponent,
|
|
2136
|
-
ApplicationContent,
|
|
2137
|
-
InputTextComponent,
|
|
2138
|
-
InputTextareaComponent,
|
|
2139
|
-
InputLinkComponent,
|
|
2140
|
-
InputSwitchComponent,
|
|
2141
|
-
InputNumberComponent,
|
|
2142
|
-
InputSelectComponent,
|
|
2143
|
-
InputDateComponent,
|
|
2144
|
-
InputInnComponent,
|
|
2145
|
-
InputFileComponent,
|
|
2146
|
-
InputPhoneComponent,
|
|
2147
|
-
InputCheckboxGroupComponent,
|
|
2148
|
-
InputRadioGroupComponent,
|
|
2149
|
-
InputTableComponent,
|
|
2150
|
-
ContentTitleComponent,
|
|
2151
|
-
ContentTextComponent,
|
|
2152
|
-
ContentTooltipComponent,
|
|
2153
|
-
ContentFileComponent,
|
|
2154
|
-
ContentDividerComponent], imports: [CommonModule,
|
|
2155
|
-
ObjectFormRoutingModule, i2.StoreFeatureModule, i1.EffectsFeatureModule, FormDispenser,
|
|
2156
|
-
FormHeaderModule,
|
|
2157
|
-
MenuAdminModule,
|
|
2158
|
-
LoaderModule,
|
|
2159
|
-
InputTextModule,
|
|
2160
|
-
LabelModule,
|
|
2161
|
-
ContentWrapperModule,
|
|
2162
|
-
EditorModule,
|
|
2163
|
-
InputTextareaModule,
|
|
2164
|
-
ButtonModule,
|
|
2165
|
-
FormsModule,
|
|
2166
|
-
CheckboxModule,
|
|
2167
|
-
SwitchModule,
|
|
2168
|
-
InputNumberModule,
|
|
2169
|
-
InputSelectModule,
|
|
2170
|
-
InputDateTimeModule,
|
|
2171
|
-
InputTimepickerModule,
|
|
2172
|
-
InputFileModule,
|
|
2173
|
-
AlertModule,
|
|
2174
|
-
CheckboxGroupModule,
|
|
2175
|
-
RadioGroupModule,
|
|
2176
|
-
DropdownModule,
|
|
2177
|
-
InputTelModule,
|
|
2178
|
-
LinkModule,
|
|
2179
|
-
ErrorMessageModule,
|
|
2180
|
-
DxDataGridModule,
|
|
2181
|
-
DxiColumnModule,
|
|
2182
|
-
DxiItemModule,
|
|
2183
|
-
DxoToolbarModule,
|
|
2184
|
-
ModalModule,
|
|
2185
|
-
ToasterServiceModule,
|
|
2186
|
-
SharedStoreModule] }); }
|
|
2187
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, providers: [
|
|
2188
|
-
ObjectFormService,
|
|
2189
|
-
ConcurrencyStoreService,
|
|
2190
|
-
{
|
|
2191
|
-
provide: HTTP_INTERCEPTORS,
|
|
2192
|
-
useClass: ConcurrencyInterceptor,
|
|
2193
|
-
multi: true
|
|
2194
|
-
}
|
|
2195
|
-
], imports: [CommonModule,
|
|
2196
|
-
ObjectFormRoutingModule,
|
|
2197
|
-
StoreModule.forFeature(STATE_NAME, objectReducer),
|
|
2198
|
-
EffectsModule.forFeature([ObjectFormEffects]),
|
|
2199
|
-
FormDispenser,
|
|
2200
|
-
FormHeaderModule,
|
|
2201
|
-
MenuAdminModule,
|
|
2202
|
-
LoaderModule,
|
|
2203
|
-
InputTextModule,
|
|
2204
|
-
LabelModule,
|
|
2205
|
-
ContentWrapperModule,
|
|
2206
|
-
EditorModule,
|
|
2207
|
-
InputTextareaModule,
|
|
2208
|
-
ButtonModule,
|
|
2209
|
-
FormsModule,
|
|
2210
|
-
CheckboxModule,
|
|
2211
|
-
SwitchModule,
|
|
2212
|
-
InputNumberModule,
|
|
2213
|
-
InputSelectModule,
|
|
2214
|
-
InputDateTimeModule,
|
|
2215
|
-
InputTimepickerModule,
|
|
2216
|
-
InputFileModule,
|
|
2217
|
-
AlertModule,
|
|
2218
|
-
CheckboxGroupModule,
|
|
2219
|
-
RadioGroupModule,
|
|
2220
|
-
DropdownModule,
|
|
2221
|
-
InputTelModule,
|
|
2222
|
-
LinkModule,
|
|
2223
|
-
ErrorMessageModule,
|
|
2224
|
-
DxDataGridModule,
|
|
2225
|
-
DxiColumnModule,
|
|
2226
|
-
DxiItemModule,
|
|
2227
|
-
DxoToolbarModule,
|
|
2228
|
-
ModalModule,
|
|
2229
|
-
ToasterServiceModule,
|
|
2230
|
-
SharedStoreModule] }); }
|
|
2231
|
-
}
|
|
2232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, decorators: [{
|
|
2233
|
-
type: NgModule,
|
|
2234
|
-
args: [{
|
|
2235
|
-
declarations: [
|
|
2236
|
-
ObjectFormComponent,
|
|
2237
|
-
ApplicationContent,
|
|
2238
|
-
InputTextComponent,
|
|
2239
|
-
InputTextareaComponent,
|
|
2240
|
-
InputLinkComponent,
|
|
2241
|
-
InputSwitchComponent,
|
|
2242
|
-
InputNumberComponent,
|
|
2243
|
-
InputSelectComponent,
|
|
2244
|
-
InputDateComponent,
|
|
2245
|
-
InputInnComponent,
|
|
2246
|
-
InputFileComponent,
|
|
2247
|
-
InputPhoneComponent,
|
|
2248
|
-
InputCheckboxGroupComponent,
|
|
2249
|
-
InputRadioGroupComponent,
|
|
2250
|
-
InputTableComponent,
|
|
2251
|
-
ContentTitleComponent,
|
|
2252
|
-
ContentTextComponent,
|
|
2253
|
-
ContentTooltipComponent,
|
|
2254
|
-
ContentFileComponent,
|
|
2255
|
-
ContentDividerComponent,
|
|
2256
|
-
],
|
|
2257
|
-
imports: [
|
|
2258
|
-
CommonModule,
|
|
2259
|
-
ObjectFormRoutingModule,
|
|
2260
|
-
StoreModule.forFeature(STATE_NAME, objectReducer),
|
|
2261
|
-
EffectsModule.forFeature([ObjectFormEffects]),
|
|
2262
|
-
FormDispenser,
|
|
2263
|
-
FormHeaderModule,
|
|
2264
|
-
MenuAdminModule,
|
|
2265
|
-
LoaderModule,
|
|
2266
|
-
InputTextModule,
|
|
2267
|
-
LabelModule,
|
|
2268
|
-
ContentWrapperModule,
|
|
2269
|
-
EditorModule,
|
|
2270
|
-
InputTextareaModule,
|
|
2271
|
-
ButtonModule,
|
|
2272
|
-
FormsModule,
|
|
2273
|
-
CheckboxModule,
|
|
2274
|
-
SwitchModule,
|
|
2275
|
-
InputNumberModule,
|
|
2276
|
-
InputSelectModule,
|
|
2277
|
-
InputDateTimeModule,
|
|
2278
|
-
InputTimepickerModule,
|
|
2279
|
-
InputFileModule,
|
|
2280
|
-
AlertModule,
|
|
2281
|
-
CheckboxGroupModule,
|
|
2282
|
-
RadioGroupModule,
|
|
2283
|
-
DropdownModule,
|
|
2284
|
-
InputTelModule,
|
|
2285
|
-
LinkModule,
|
|
2286
|
-
ErrorMessageModule,
|
|
2287
|
-
DxDataGridModule,
|
|
2288
|
-
DxiColumnModule,
|
|
2289
|
-
DxiItemModule,
|
|
2290
|
-
DxoToolbarModule,
|
|
2291
|
-
ModalModule,
|
|
2292
|
-
ToasterServiceModule,
|
|
2293
|
-
SharedStoreModule
|
|
2294
|
-
],
|
|
2295
|
-
providers: [
|
|
2296
|
-
ObjectFormService,
|
|
2297
|
-
ConcurrencyStoreService,
|
|
2298
|
-
{
|
|
2299
|
-
provide: HTTP_INTERCEPTORS,
|
|
2300
|
-
useClass: ConcurrencyInterceptor,
|
|
2301
|
-
multi: true
|
|
2302
|
-
}
|
|
2303
|
-
]
|
|
2304
|
-
}]
|
|
2305
|
-
}] });
|
|
2306
|
-
|
|
2307
|
-
function isNumeric(str) {
|
|
2308
|
-
if (typeof str != 'string') {
|
|
2309
|
-
return false; // we only process strings!
|
|
2310
|
-
}
|
|
2311
|
-
return !isNaN(str) && !isNaN(parseInt(str)) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
|
|
2312
|
-
!isNaN(parseFloat(str)); // ...and ensure strings of whitespace fail
|
|
2313
|
-
}
|
|
2314
|
-
const isNullOrUndefined = (model) => {
|
|
2315
|
-
return model === null || typeof model === 'undefined';
|
|
2316
|
-
};
|
|
1
|
+
export * from '../lib/modules/object-form/object-form.module';
|
|
2
|
+
export * from '../lib/modules/object-form/models';
|
|
3
|
+
export * from '../lib/modules/object-form/store';
|
|
4
|
+
export * from '../lib/modules/shared-form/shared-form.module';
|
|
5
|
+
export * from '../lib/modules/shared-form/store';
|
|
6
|
+
export * from '../lib/modules/shared-form/enums';
|
|
7
|
+
export * from '../lib/modules/shared-form/helpers';
|
|
8
|
+
export * from '../lib/modules/shared-form/interceptors';
|
|
9
|
+
export * from '../lib/modules/shared-form/models';
|
|
10
|
+
export * from '../lib/modules/shared-form/services';
|
|
2317
11
|
|
|
2318
12
|
/*
|
|
2319
13
|
* Public API Surface of myrtex-form
|
|
@@ -2322,6 +16,4 @@ const isNullOrUndefined = (model) => {
|
|
|
2322
16
|
/**
|
|
2323
17
|
* Generated bundle index. Do not edit.
|
|
2324
18
|
*/
|
|
2325
|
-
|
|
2326
|
-
export { ComponentShortType, ComponentSizeEnum, ComponentType, ConcurrencyInterceptor, ConcurrencyStoreService, ConditionOperatorType, CustomInputStateEnum, CustomInputStateEnumLabel, DateFormatEnum, DateFormatLabelEnum, DateTypeEnum, DateTypeLabelEnum, DependenceActionType, EApplicationActions, EFFECTS, InnTypeEnum, InnTypeLabelEnum, InputState, LogicalOperatorType, ObjectFormEffects, ObjectFormModule, SharedStoreModule, TemplateComponentsGroupTypeEnum, TemplateComponentsGroupTypeLabels, TemplateStatus, ValueType, conditionOperatorTypeLabel, getConditionOperatorsList, getDependenceActionsList, getTemplateStatusText, initialObjectFormState, initialSharedStoreState, isNullOrUndefined, isNumeric, objectForm_actions as objectFormActions, objectForm_selector as objectFormSelectors, objectReducer, sharedStore_selector as sharedSelectors, sharedStoreReducer };
|
|
2327
19
|
//# sourceMappingURL=myrtex-org-form.mjs.map
|