@dignite-ng/expand.cms 2.0.0-rc.1 → 2.0.0-rc.10
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/config/ng-package.json +6 -0
- package/config/src/cms-config.module.ts +13 -0
- package/config/{enums/index.d.ts → src/enums/index.ts} +1 -1
- package/config/src/enums/route-names.ts +7 -0
- package/config/{providers/index.d.ts → src/providers/index.ts} +1 -1
- package/config/src/providers/route.provider.ts +68 -0
- package/config/{public-api.d.ts → src/public-api.ts} +3 -3
- package/ng-package.json +10 -0
- package/package.json +7 -22
- package/src/lib/cms-routing.module.ts +102 -0
- package/src/lib/cms.module.ts +113 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.html +137 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.scss +0 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.ts +216 -0
- package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +26 -0
- package/src/lib/components/admin/entries/create.component.html +16 -0
- package/src/lib/components/admin/entries/create.component.scss +0 -0
- package/src/lib/components/admin/entries/create.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/create.component.ts +130 -0
- package/src/lib/components/admin/entries/edit.component.html +9 -0
- package/src/lib/components/admin/entries/edit.component.scss +0 -0
- package/src/lib/components/admin/entries/edit.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/edit.component.ts +134 -0
- package/src/lib/components/admin/entries/entries.component.html +225 -0
- package/src/lib/components/admin/entries/entries.component.scss +109 -0
- package/src/lib/components/admin/entries/entries.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/entries.component.ts +394 -0
- package/src/lib/components/admin/entries/index.ts +4 -0
- package/src/lib/components/admin/fields/create-field.component.html +12 -0
- package/src/lib/components/admin/fields/create-field.component.scss +1 -0
- package/src/lib/components/admin/fields/create-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/create-field.component.ts +85 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.html +39 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.ts +140 -0
- package/src/lib/components/admin/fields/create-or-update-field-input-base.ts +33 -0
- package/src/lib/components/admin/fields/edit-field.component.html +14 -0
- package/src/lib/components/admin/fields/edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/edit-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/edit-field.component.ts +112 -0
- package/src/lib/components/admin/fields/field-group.component.html +69 -0
- package/src/lib/components/admin/fields/field-group.component.scss +0 -0
- package/src/lib/components/admin/fields/field-group.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/field-group.component.ts +151 -0
- package/src/lib/components/admin/fields/fields.component.html +25 -0
- package/src/lib/components/admin/fields/fields.component.scss +1 -0
- package/src/lib/components/admin/fields/fields.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/fields.component.ts +109 -0
- package/src/lib/components/admin/fields/index.ts +6 -0
- package/src/lib/components/admin/index.ts +3 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.html +81 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.scss +0 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.spec.ts +23 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.ts +239 -0
- package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +23 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +52 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +195 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +1 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.spec.ts +21 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.ts +442 -0
- package/src/lib/components/admin/sections/entry-types/index.ts +2 -0
- package/src/lib/components/admin/sections/index.ts +3 -0
- package/src/lib/components/admin/sections/sections.component.html +189 -0
- package/src/lib/components/admin/sections/sections.component.scss +1 -0
- package/src/lib/components/admin/sections/sections.component.spec.ts +21 -0
- package/src/lib/components/admin/sections/sections.component.ts +136 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.html +26 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.scss +27 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.ts +119 -0
- package/src/lib/components/dynamic-form/entry/entry-config.ts +22 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.html +25 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.scss +35 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.ts +111 -0
- package/src/lib/components/dynamic-form/entry/index.ts +3 -0
- package/src/lib/components/dynamic-form/form-control-group.ts +27 -0
- package/src/lib/components/dynamic-form/index.ts +4 -0
- package/src/lib/components/dynamic-form/matrix/index.ts +3 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.html +148 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.scss +0 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.ts +244 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.ts +63 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.html +42 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.scss +0 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.ts +118 -0
- package/src/lib/components/dynamic-form/table/index.ts +3 -0
- package/src/lib/components/dynamic-form/table/table-config.component.html +85 -0
- package/src/lib/components/dynamic-form/table/table-config.component.scss +10 -0
- package/src/lib/components/dynamic-form/table/table-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/table/table-config.component.ts +177 -0
- package/src/lib/components/dynamic-form/table/table-config.ts +45 -0
- package/src/lib/components/dynamic-form/table/table-control.component.html +54 -0
- package/src/lib/components/dynamic-form/table/table-control.component.scss +1 -0
- package/src/lib/components/dynamic-form/table/table-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/table/table-control.component.ts +127 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/constants/index.ts +1 -0
- package/src/lib/constants/styles.ts +18 -0
- package/src/lib/enums/ecms-component.ts +11 -0
- package/src/lib/enums/index.ts +1 -0
- package/src/lib/proxy/README.md +17 -0
- package/src/lib/proxy/dignite/abp/data/index.ts +1 -0
- package/src/lib/proxy/dignite/abp/data/models.ts +4 -0
- package/src/lib/proxy/dignite/abp/index.ts +3 -0
- package/src/lib/proxy/dignite/abp/regionalization-management/index.ts +2 -0
- package/src/lib/proxy/dignite/abp/regionalization-management/models.ts +10 -0
- package/src/lib/proxy/dignite/abp/regionalization-management/regionalization.service.ts +29 -0
- package/src/lib/proxy/dignite/cms/admin/dynamic-forms/form-admin.service.ts +20 -0
- package/src/lib/proxy/dignite/cms/admin/dynamic-forms/models.ts +6 -0
- package/src/lib/proxy/dignite/cms/admin/entries/entry-admin.service.ts +109 -0
- package/src/lib/proxy/dignite/cms/admin/entries/models.ts +69 -0
- package/src/lib/proxy/dignite/cms/admin/fields/field-admin.service.ts +64 -0
- package/src/lib/proxy/dignite/cms/admin/fields/field-group-admin.service.ts +56 -0
- package/src/lib/proxy/dignite/cms/admin/fields/models.ts +42 -0
- package/src/lib/proxy/dignite/cms/admin/index.ts +5 -0
- package/src/lib/proxy/dignite/cms/admin/sections/entry-type-admin.service.ts +55 -0
- package/{lib/proxy/admin/sections/models.d.ts → src/lib/proxy/dignite/cms/admin/sections/models.ts} +82 -67
- package/src/lib/proxy/dignite/cms/admin/sections/section-admin.service.ts +74 -0
- package/src/lib/proxy/dignite/cms/entries/entry-status.enum.ts +8 -0
- package/src/lib/proxy/dignite/cms/fields/index.ts +1 -0
- package/src/lib/proxy/dignite/cms/fields/models.ts +9 -0
- package/src/lib/proxy/dignite/cms/index.ts +5 -0
- package/src/lib/proxy/dignite/cms/sections/models.ts +15 -0
- package/src/lib/proxy/dignite/cms/sections/section-type.enum.ts +9 -0
- package/src/lib/proxy/dignite/index.ts +3 -0
- package/src/lib/proxy/generate-proxy.json +54593 -0
- package/src/lib/proxy/index.ts +3 -0
- package/src/lib/proxy/volo/cms-kit/index.ts +2 -0
- package/src/lib/proxy/volo/cms-kit/users/index.ts +1 -0
- package/{lib/proxy/volo/cms-kit/users/models.d.ts → src/lib/proxy/volo/cms-kit/users/models.ts} +8 -7
- package/src/lib/proxy/volo/index.ts +2 -0
- package/src/lib/resolvers/extensions-props-action-token.resolver.ts +182 -0
- package/src/lib/resolvers/page-default-toolbar-actions.ts +173 -0
- package/src/lib/resolvers/table-default-entity-actions.ts +29 -0
- package/src/lib/resolvers/table-default-entity-props.ts +62 -0
- package/src/lib/services/appent-content.ts +13 -0
- package/src/lib/services/cms-api.service.ts +90 -0
- package/src/lib/services/cms.service.ts +18 -0
- package/src/lib/services/field-abstracts.service.ts +39 -0
- package/src/lib/services/index.ts +3 -0
- package/src/lib/services/validator.ts +10 -0
- package/src/public-api.ts +7 -0
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +16 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/config/cms-config.module.d.ts +0 -8
- package/config/components/domains/domains.component.d.ts +0 -31
- package/config/components/site-language/site-language.component.d.ts +0 -30
- package/config/enums/route-names.d.ts +0 -8
- package/config/index.d.ts +0 -5
- package/config/providers/route.provider.d.ts +0 -9
- package/config/proxy/admin/domains/domain-admin.service.d.ts +0 -13
- package/config/proxy/admin/domains/index.d.ts +0 -2
- package/config/proxy/admin/domains/models.d.ts +0 -7
- package/config/proxy/dignite/cms/admin/sites/index.d.ts +0 -2
- package/config/proxy/dignite/cms/admin/sites/models.d.ts +0 -4
- package/config/proxy/dignite/cms/admin/sites/site-admin.service.d.ts +0 -13
- package/config/proxy/dignite/cms/sites/models.d.ts +0 -4
- package/esm2022/config/cms-config.module.mjs +0 -18
- package/esm2022/config/components/domains/domains.component.mjs +0 -118
- package/esm2022/config/components/site-language/site-language.component.mjs +0 -113
- package/esm2022/config/dignite-ng-expand.cms-config.mjs +0 -5
- package/esm2022/config/enums/index.mjs +0 -2
- package/esm2022/config/enums/route-names.mjs +0 -10
- package/esm2022/config/providers/index.mjs +0 -2
- package/esm2022/config/providers/route.provider.mjs +0 -74
- package/esm2022/config/proxy/admin/domains/domain-admin.service.mjs +0 -32
- package/esm2022/config/proxy/admin/domains/index.mjs +0 -3
- package/esm2022/config/proxy/admin/domains/models.mjs +0 -2
- package/esm2022/config/proxy/dignite/cms/admin/sites/index.mjs +0 -3
- package/esm2022/config/proxy/dignite/cms/admin/sites/models.mjs +0 -2
- package/esm2022/config/proxy/dignite/cms/admin/sites/site-admin.service.mjs +0 -27
- package/esm2022/config/proxy/dignite/cms/sites/models.mjs +0 -2
- package/esm2022/config/public-api.mjs +0 -4
- package/esm2022/dignite-ng-expand.cms.mjs +0 -5
- package/esm2022/lib/cms-routing.module.mjs +0 -94
- package/esm2022/lib/cms.module.mjs +0 -139
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +0 -226
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +0 -25
- package/esm2022/lib/components/admin/entries/create.component.mjs +0 -136
- package/esm2022/lib/components/admin/entries/edit.component.mjs +0 -138
- package/esm2022/lib/components/admin/entries/entries.component.mjs +0 -203
- package/esm2022/lib/components/admin/entries/index.mjs +0 -5
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +0 -87
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +0 -120
- package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +0 -25
- package/esm2022/lib/components/admin/fields/edit-field.component.mjs +0 -109
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +0 -131
- package/esm2022/lib/components/admin/fields/fields.component.mjs +0 -108
- package/esm2022/lib/components/admin/fields/index.mjs +0 -7
- package/esm2022/lib/components/admin/index.mjs +0 -4
- package/esm2022/lib/components/admin/sections/create-or-edit-sections-modal.component.mjs +0 -210
- package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +0 -22
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +0 -71
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +0 -404
- package/esm2022/lib/components/admin/sections/entry-types/index.mjs +0 -3
- package/esm2022/lib/components/admin/sections/index.mjs +0 -4
- package/esm2022/lib/components/admin/sections/sections.component.mjs +0 -138
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +0 -114
- package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +0 -18
- package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +0 -101
- package/esm2022/lib/components/dynamic-form/entry/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/form-control-group.mjs +0 -28
- package/esm2022/lib/components/dynamic-form/index.mjs +0 -5
- package/esm2022/lib/components/dynamic-form/matrix/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +0 -212
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +0 -50
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +0 -94
- package/esm2022/lib/components/dynamic-form/table/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +0 -151
- package/esm2022/lib/components/dynamic-form/table/table-config.mjs +0 -38
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +0 -105
- package/esm2022/lib/components/index.mjs +0 -3
- package/esm2022/lib/constants/styles.mjs +0 -19
- package/esm2022/lib/enums/ecms-component.mjs +0 -13
- package/esm2022/lib/enums/index.mjs +0 -2
- package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +0 -22
- package/esm2022/lib/proxy/admin/dynamic-forms/index.mjs +0 -3
- package/esm2022/lib/proxy/admin/dynamic-forms/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +0 -70
- package/esm2022/lib/proxy/admin/entries/index.mjs +0 -3
- package/esm2022/lib/proxy/admin/entries/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +0 -45
- package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +0 -41
- package/esm2022/lib/proxy/admin/fields/index.mjs +0 -4
- package/esm2022/lib/proxy/admin/fields/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +0 -41
- package/esm2022/lib/proxy/admin/sections/index.mjs +0 -4
- package/esm2022/lib/proxy/admin/sections/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +0 -51
- package/esm2022/lib/proxy/admin/settings/index.mjs +0 -2
- package/esm2022/lib/proxy/admin/settings/site-settings-admin.service.mjs +0 -31
- package/esm2022/lib/proxy/dignite/abp/data/models.mjs +0 -2
- package/esm2022/lib/proxy/entries/entry-status.enum.mjs +0 -8
- package/esm2022/lib/proxy/entries/index.mjs +0 -2
- package/esm2022/lib/proxy/fields/models.mjs +0 -2
- package/esm2022/lib/proxy/sections/index.mjs +0 -3
- package/esm2022/lib/proxy/sections/models.mjs +0 -2
- package/esm2022/lib/proxy/sections/section-type.enum.mjs +0 -9
- package/esm2022/lib/proxy/settings/models.mjs +0 -2
- package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +0 -2
- package/esm2022/lib/resolvers/extensions-props-action-token.resolver.mjs +0 -136
- package/esm2022/lib/resolvers/page-default-toolbar-actions.mjs +0 -160
- package/esm2022/lib/resolvers/table-default-entity-actions.mjs +0 -49
- package/esm2022/lib/resolvers/table-default-entity-props.mjs +0 -53
- package/esm2022/lib/services/appent-content.mjs +0 -15
- package/esm2022/lib/services/cms-api.service.mjs +0 -70
- package/esm2022/lib/services/cms.service.mjs +0 -21
- package/esm2022/lib/services/field-abstracts.service.mjs +0 -42
- package/esm2022/lib/services/index.mjs +0 -4
- package/esm2022/public-api.mjs +0 -6
- package/fesm2022/dignite-ng-expand.cms-config.mjs +0 -371
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +0 -1
- package/fesm2022/dignite-ng-expand.cms.mjs +0 -3886
- package/fesm2022/dignite-ng-expand.cms.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/cms-routing.module.d.ts +0 -7
- package/lib/cms.module.d.ts +0 -37
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +0 -63
- package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +0 -23
- package/lib/components/admin/entries/create.component.d.ts +0 -50
- package/lib/components/admin/entries/edit.component.d.ts +0 -53
- package/lib/components/admin/entries/entries.component.d.ts +0 -67
- package/lib/components/admin/entries/index.d.ts +0 -4
- package/lib/components/admin/fields/create-field.component.d.ts +0 -37
- package/lib/components/admin/fields/create-or-edit-field.component.d.ts +0 -38
- package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +0 -16
- package/lib/components/admin/fields/edit-field.component.d.ts +0 -46
- package/lib/components/admin/fields/field-group.component.d.ts +0 -58
- package/lib/components/admin/fields/fields.component.d.ts +0 -35
- package/lib/components/admin/fields/index.d.ts +0 -6
- package/lib/components/admin/index.d.ts +0 -3
- package/lib/components/admin/sections/create-or-edit-sections-modal.component.d.ts +0 -49
- package/lib/components/admin/sections/create-or-update-sections-input-base.d.ts +0 -20
- package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +0 -38
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +0 -139
- package/lib/components/admin/sections/entry-types/index.d.ts +0 -2
- package/lib/components/admin/sections/index.d.ts +0 -3
- package/lib/components/admin/sections/sections.component.d.ts +0 -46
- package/lib/components/dynamic-form/entry/entry-config.component.d.ts +0 -39
- package/lib/components/dynamic-form/entry/entry-config.d.ts +0 -9
- package/lib/components/dynamic-form/entry/entry-control.component.d.ts +0 -35
- package/lib/components/dynamic-form/entry/index.d.ts +0 -3
- package/lib/components/dynamic-form/form-control-group.d.ts +0 -4
- package/lib/components/dynamic-form/index.d.ts +0 -4
- package/lib/components/dynamic-form/matrix/index.d.ts +0 -3
- package/lib/components/dynamic-form/matrix/matrix-config.component.d.ts +0 -73
- package/lib/components/dynamic-form/matrix/matrix-config.d.ts +0 -24
- package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +0 -39
- package/lib/components/dynamic-form/table/index.d.ts +0 -3
- package/lib/components/dynamic-form/table/table-config.component.d.ts +0 -58
- package/lib/components/dynamic-form/table/table-config.d.ts +0 -18
- package/lib/components/dynamic-form/table/table-control.component.d.ts +0 -39
- package/lib/components/index.d.ts +0 -2
- package/lib/constants/styles.d.ts +0 -2
- package/lib/enums/ecms-component.d.ts +0 -11
- package/lib/enums/index.d.ts +0 -1
- package/lib/proxy/admin/dynamic-forms/form-admin.service.d.ts +0 -12
- package/lib/proxy/admin/dynamic-forms/models.d.ts +0 -4
- package/lib/proxy/admin/entries/entry-admin.service.d.ts +0 -22
- package/lib/proxy/admin/entries/models.d.ts +0 -60
- package/lib/proxy/admin/fields/field-admin.service.d.ts +0 -17
- package/lib/proxy/admin/fields/field-group-admin.service.d.ts +0 -16
- package/lib/proxy/admin/fields/models.d.ts +0 -34
- package/lib/proxy/admin/sections/entry-type-admin.service.d.ts +0 -15
- package/lib/proxy/admin/sections/section-admin.service.d.ts +0 -18
- package/lib/proxy/admin/settings/index.d.ts +0 -1
- package/lib/proxy/admin/settings/site-settings-admin.service.d.ts +0 -13
- package/lib/proxy/dignite/abp/data/models.d.ts +0 -3
- package/lib/proxy/entries/entry-status.enum.d.ts +0 -5
- package/lib/proxy/fields/models.d.ts +0 -8
- package/lib/proxy/sections/models.d.ts +0 -12
- package/lib/proxy/sections/section-type.enum.d.ts +0 -6
- package/lib/proxy/settings/models.d.ts +0 -5
- package/lib/resolvers/extensions-props-action-token.resolver.d.ts +0 -75
- package/lib/resolvers/page-default-toolbar-actions.d.ts +0 -18
- package/lib/resolvers/table-default-entity-actions.d.ts +0 -5
- package/lib/resolvers/table-default-entity-props.d.ts +0 -5
- package/lib/services/appent-content.d.ts +0 -1
- package/lib/services/cms-api.service.d.ts +0 -16
- package/lib/services/cms.service.d.ts +0 -10
- package/lib/services/field-abstracts.service.d.ts +0 -20
- package/lib/services/index.d.ts +0 -3
- package/public-api.d.ts +0 -2
- /package/{lib/proxy/admin/dynamic-forms/index.d.ts → src/lib/proxy/dignite/cms/admin/dynamic-forms/index.ts} +0 -0
- /package/{lib/proxy/admin/entries/index.d.ts → src/lib/proxy/dignite/cms/admin/entries/index.ts} +0 -0
- /package/{lib/proxy/admin/fields/index.d.ts → src/lib/proxy/dignite/cms/admin/fields/index.ts} +0 -0
- /package/{lib/proxy/admin/sections/index.d.ts → src/lib/proxy/dignite/cms/admin/sections/index.ts} +0 -0
- /package/{lib/proxy/entries/index.d.ts → src/lib/proxy/dignite/cms/entries/index.ts} +0 -0
- /package/{lib/proxy/sections/index.d.ts → src/lib/proxy/dignite/cms/sections/index.ts} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<form [formGroup]="_entity">
|
|
2
|
+
<div formGroupName="extraProperties">
|
|
3
|
+
<div class="mb-3">
|
|
4
|
+
<label class="form-label" *ngIf="_fields.displayName">{{ _fields.displayName }}</label>
|
|
5
|
+
<div [class]="fieldNameControl?.controls?.length>0?'border p-2 rounded-2':''">
|
|
6
|
+
<div [formArrayName]="_fields.field.name">
|
|
7
|
+
<ng-container *ngFor="let item of fieldNameControl.controls;let i=index">
|
|
8
|
+
<div class="card mb-3 border " [formGroupName]="i">
|
|
9
|
+
<div class="card-header d-flex align-items-center justify-content-between border-bottom pt-1">
|
|
10
|
+
<div>{{item.value.displayName}}</div>
|
|
11
|
+
<button class="btn btn-sm btn-light p-0" (click.stop)="deleteMatrixControl(i,item)"><i
|
|
12
|
+
class="fas fa-trash p-2"></i></button>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="card-body">
|
|
15
|
+
<ng-container *ngFor="let el of MatrixBlockTypesList;let il =index">
|
|
16
|
+
<ng-container *ngIf="el.name===item.value.matrixBlockTypeName">
|
|
17
|
+
<ng-container *ngFor="let elf of el.fields; let fi=index">
|
|
18
|
+
<ng-container *ngIf="item&&elf&&_culture">
|
|
19
|
+
<df-dynamic
|
|
20
|
+
[fields]="{ field: elf,displayName:elf.displayName }"
|
|
21
|
+
[selected]="_selected ? _selected[i]?_selected[i][_parentFiledName][elf.name]:'': ''"
|
|
22
|
+
[parentFiledName]="'extraProperties'" [culture]="_culture" [entity]="item"></df-dynamic>
|
|
23
|
+
</ng-container>
|
|
24
|
+
</ng-container>
|
|
25
|
+
</ng-container>
|
|
26
|
+
</ng-container>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</ng-container>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="btn-group" role="group" aria-label="Basic example">
|
|
32
|
+
<ng-container *ngFor="let item of MatrixBlockTypesList;let i =index">
|
|
33
|
+
<button type="button" class="btn btn-primary btn-sm" (click.stop)="addMatrixControl(item)"><i
|
|
34
|
+
class="fas fa-plus me-1"></i>{{item.displayName}}</button>
|
|
35
|
+
</ng-container>
|
|
36
|
+
</div>
|
|
37
|
+
<small class="form-text text-muted d-block" *ngIf="_fields.field.description">{{_fields.field.description}}</small>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<button type="submit" style="display: none" #submitclick></button>
|
|
42
|
+
</form>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { MatrixControlComponent } from './matrix-control.component';
|
|
4
|
+
|
|
5
|
+
describe('MatrixControlComponent', () => {
|
|
6
|
+
let component: MatrixControlComponent;
|
|
7
|
+
let fixture: ComponentFixture<MatrixControlComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [MatrixControlComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(MatrixControlComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* eslint-disable @angular-eslint/component-selector */
|
|
2
|
+
import { ChangeDetectorRef, Component, ElementRef, inject, Input, ViewChild } from '@angular/core';
|
|
3
|
+
import { FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
4
|
+
import { CmsApiService } from '../../../services';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'df-matrix-control',
|
|
8
|
+
templateUrl: './matrix-control.component.html',
|
|
9
|
+
styleUrls: ['./matrix-control.component.scss'],
|
|
10
|
+
})
|
|
11
|
+
export class MatrixControlComponent {
|
|
12
|
+
constructor(private fb: FormBuilder, private _CmsApiService: CmsApiService) {}
|
|
13
|
+
|
|
14
|
+
/**字段配置列表 */
|
|
15
|
+
_fields: any = '';
|
|
16
|
+
@Input()
|
|
17
|
+
public set fields(v: any) {
|
|
18
|
+
if (v) {
|
|
19
|
+
for (const key in v.field?.formConfiguration) {
|
|
20
|
+
if (Array.isArray(v.field?.formConfiguration[key])) {
|
|
21
|
+
v.field.formConfiguration[key] = this._CmsApiService.convertKeysToCamelCase(
|
|
22
|
+
v.field?.formConfiguration[key]
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
this._fields = v;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
31
|
+
_parentFiledName: any;
|
|
32
|
+
@Input()
|
|
33
|
+
public set parentFiledName(v: any) {
|
|
34
|
+
this._parentFiledName = v;
|
|
35
|
+
}
|
|
36
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
37
|
+
_selected: any;
|
|
38
|
+
@Input()
|
|
39
|
+
public set selected(v: any) {
|
|
40
|
+
if (v) {
|
|
41
|
+
v = this._CmsApiService.convertKeysToCamelCase(v);
|
|
42
|
+
this._selected = v;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**语言 */
|
|
46
|
+
_culture: any;
|
|
47
|
+
@Input()
|
|
48
|
+
public set culture(v: any) {
|
|
49
|
+
this._culture = v;
|
|
50
|
+
}
|
|
51
|
+
/**表单实体 */
|
|
52
|
+
_entity: FormGroup | undefined;
|
|
53
|
+
@Input()
|
|
54
|
+
public set entity(v: any) {
|
|
55
|
+
this._entity = v;
|
|
56
|
+
if (v) {
|
|
57
|
+
this.dataLoaded();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
62
|
+
|
|
63
|
+
/** 获取父级字段代表的表单组*/
|
|
64
|
+
extraProperties: FormGroup | undefined;
|
|
65
|
+
|
|
66
|
+
private cdr = inject(ChangeDetectorRef);
|
|
67
|
+
/**数据加载完成 */
|
|
68
|
+
async dataLoaded() {
|
|
69
|
+
if (this._fields && this._entity && this._parentFiledName) {
|
|
70
|
+
this.extraProperties = this._entity.get(this._parentFiledName) as FormGroup;
|
|
71
|
+
await this.AfterInit();
|
|
72
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
73
|
+
this.submitclick?.nativeElement?.click();
|
|
74
|
+
if (this._selected) this.fieldNameControl.patchValue(this._selected);
|
|
75
|
+
this._selected = '';
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
formConfiguration: any;
|
|
80
|
+
/**获取表格字段代表的控件 */
|
|
81
|
+
fieldNameControl: FormArray | undefined;
|
|
82
|
+
|
|
83
|
+
AfterInit() {
|
|
84
|
+
return new Promise((resolve, rejects) => {
|
|
85
|
+
let formConfiguration = this._fields.field.formConfiguration;
|
|
86
|
+
let newArrayGroup = this.fb.array([]);
|
|
87
|
+
this.extraProperties.setControl(this._fields.field.name, newArrayGroup);
|
|
88
|
+
this.fieldNameControl = this.extraProperties.get(this._fields.field.name) as FormArray;
|
|
89
|
+
if (this._selected) {
|
|
90
|
+
this._selected.forEach(el => {
|
|
91
|
+
this.addMatrixControl(
|
|
92
|
+
formConfiguration.MatrixBlockTypes.find(item => item.name == el.matrixBlockTypeName)
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
this.MatrixBlockTypesList = formConfiguration.MatrixBlockTypes;
|
|
97
|
+
resolve(true);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**矩阵列表 */
|
|
102
|
+
MatrixBlockTypesList: any[] = [];
|
|
103
|
+
|
|
104
|
+
/**增加指定矩阵控件项 */
|
|
105
|
+
addMatrixControl(item) {
|
|
106
|
+
this.fieldNameControl.push(
|
|
107
|
+
new FormGroup({
|
|
108
|
+
extraProperties: new FormGroup({}),
|
|
109
|
+
matrixBlockTypeName: new FormControl(item.name),
|
|
110
|
+
displayName: new FormControl(item.displayName),
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
/**删除矩阵控件 */
|
|
115
|
+
deleteMatrixControl(index, item) {
|
|
116
|
+
this.fieldNameControl.removeAt(index);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<form [formGroup]="_Entity">
|
|
2
|
+
<div formGroupName="formConfiguration">
|
|
3
|
+
<div class="mb-3">
|
|
4
|
+
<label class="form-label">{{'DigniteAbpForms::SelectListItem' | abpLocalization}}</label>
|
|
5
|
+
<table class="table">
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th scope="col">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>
|
|
9
|
+
<th scope="col">{{'Cms::TableColumnName' | abpLocalization}}</th>
|
|
10
|
+
<th scope="col">{{'Cms::TableColumnForm' | abpLocalization}}</th>
|
|
11
|
+
<th scope="col" class="flex-end">
|
|
12
|
+
<button class="btn btn-light btn-sm" (click.stop)="addTableColumns()">
|
|
13
|
+
<i class="fas fa-plus-circle"></i>
|
|
14
|
+
</button>
|
|
15
|
+
</th>
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
<tbody formArrayName="TableColumns">
|
|
19
|
+
<ng-container *ngFor="let item of TableColumns.controls;let i=index">
|
|
20
|
+
<tr [formGroupName]="i">
|
|
21
|
+
<td><input type="text" class="form-control" formControlName="displayName" (blur)="disPlayNameInputBlur($event,item)" ></td>
|
|
22
|
+
<td><input type="text" class="form-control" formControlName="name"></td>
|
|
23
|
+
<td>
|
|
24
|
+
<select class="form-select" formControlName="formControlName"
|
|
25
|
+
(change)="selectTableControl($event,i,item)">
|
|
26
|
+
<option value="">SelectFrom</option>
|
|
27
|
+
<ng-container *ngFor="let item_f of _fieldControlGroup;let i_f =index">
|
|
28
|
+
<option [value]="item_f.name">{{item_f.displayName}}</option>
|
|
29
|
+
</ng-container>
|
|
30
|
+
</select>
|
|
31
|
+
</td>
|
|
32
|
+
<td scope="row">
|
|
33
|
+
<div class="flex-start">
|
|
34
|
+
<button class="btn btn-light btn-sm " (click.stop)="EditSitesBtn(item,i)">
|
|
35
|
+
<i class="fas fa-edit"></i>
|
|
36
|
+
</button>
|
|
37
|
+
<button class="btn btn-light btn-sm ms-1" (click.stop)="deleteTableColumns(i)">
|
|
38
|
+
<i class="fas fa-minus"></i>
|
|
39
|
+
</button>
|
|
40
|
+
<button class="btn btn-light btn-sm ms-1" *ngIf="i!==0"
|
|
41
|
+
(click.stop)="TableArrowUpOrDown('up',i)">
|
|
42
|
+
<i class="fas fa-arrow-up"></i>
|
|
43
|
+
</button>
|
|
44
|
+
<button class="btn btn-light btn-sm ms-1" *ngIf="i!==TableColumns.controls.length-1"
|
|
45
|
+
(click.stop)="TableArrowUpOrDown('down',i)">
|
|
46
|
+
<i class="fas fa-arrow-down"></i>
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
</td>
|
|
50
|
+
</tr>
|
|
51
|
+
</ng-container>
|
|
52
|
+
</tbody>
|
|
53
|
+
</table>
|
|
54
|
+
</div>
|
|
55
|
+
<button type="submit" (abpInit)="submitclick?.nativeElement?.click()" style="display: none;"
|
|
56
|
+
#submitclick></button>
|
|
57
|
+
</div>
|
|
58
|
+
</form>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<abp-modal [(visible)]="tableSelectOpen" [busy]="modalBusy" (visibleChange)="tableSelectVisibleChange($event)" [options]="{ size: CurrentSelectionTableControlName=='Matrix'?'xl':'' ,scrollable:false }">
|
|
62
|
+
<ng-template #abpHeader>
|
|
63
|
+
<h3>{{_tableSelected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>
|
|
64
|
+
</ng-template>
|
|
65
|
+
<ng-template #abpBody>
|
|
66
|
+
<ng-template #loaderRef>
|
|
67
|
+
<div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
|
|
68
|
+
</ng-template>
|
|
69
|
+
<ng-container *ngIf="tableSelectForm; else loaderRef">
|
|
70
|
+
<form class="sites-modal-form" #myForm="ngForm" [formGroup]="tableSelectForm"
|
|
71
|
+
(keydown.enter)="$event.preventDefault()" (submit)="createOrEditSave()">
|
|
72
|
+
<button type="submit" #tableSelectModalSubmit style="display: none"></button>
|
|
73
|
+
<ng-container *ngIf="CurrentSelectionTableControlName&&tableSelectForm">
|
|
74
|
+
<df-dynamic [type]="CurrentSelectionTableControlName"
|
|
75
|
+
[selected]="_tableSelected" [formGroup]="tableSelectForm" [entity]="tableSelectForm"></df-dynamic>
|
|
76
|
+
</ng-container>
|
|
77
|
+
</form>
|
|
78
|
+
</ng-container>
|
|
79
|
+
</ng-template>
|
|
80
|
+
<ng-template #abpFooter>
|
|
81
|
+
<button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
|
|
82
|
+
<abp-button iconClass="fa fa-check"
|
|
83
|
+
(click)="tableSelectModalSubmit.nativeElement.click()">{{'AbpUi::Save' | abpLocalization}}</abp-button>
|
|
84
|
+
</ng-template>
|
|
85
|
+
</abp-modal>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { TableConfigComponent } from './table-config.component';
|
|
4
|
+
|
|
5
|
+
describe('TableConfigComponent', () => {
|
|
6
|
+
let component: TableConfigComponent;
|
|
7
|
+
let fixture: ComponentFixture<TableConfigComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [TableConfigComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(TableConfigComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/* eslint-disable @angular-eslint/component-selector */
|
|
2
|
+
import { ChangeDetectorRef, Component, ElementRef, inject, Input, ViewChild } from '@angular/core';
|
|
3
|
+
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
|
|
4
|
+
import { TableConfig, TableFormControl } from './table-config';
|
|
5
|
+
import { CmsApiService, FieldAbstractsService } from '../../../services';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'df-table-config',
|
|
9
|
+
templateUrl: './table-config.component.html',
|
|
10
|
+
styleUrls: ['./table-config.component.scss']
|
|
11
|
+
})
|
|
12
|
+
export class TableConfigComponent {
|
|
13
|
+
constructor(
|
|
14
|
+
private fb: FormBuilder,
|
|
15
|
+
private _CmsApiService: CmsApiService,
|
|
16
|
+
private _FieldAbstractsService: FieldAbstractsService,
|
|
17
|
+
) { }
|
|
18
|
+
/**表单实体 */
|
|
19
|
+
_Entity: FormGroup | undefined
|
|
20
|
+
@Input()
|
|
21
|
+
public set Entity(v: FormGroup) {
|
|
22
|
+
this._Entity = v;
|
|
23
|
+
this.dataLoaded()
|
|
24
|
+
}
|
|
25
|
+
/**选择的表单信息 */
|
|
26
|
+
_selected: any
|
|
27
|
+
@Input()
|
|
28
|
+
public set selected(v: any) {
|
|
29
|
+
if (v) {
|
|
30
|
+
for (const key in v.formConfiguration) {
|
|
31
|
+
if(Array.isArray(v.formConfiguration[key])){
|
|
32
|
+
v.formConfiguration[key]=this._CmsApiService.convertKeysToCamelCase(v.formConfiguration[key])
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
this._selected = v
|
|
36
|
+
this.dataLoaded()
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**表单控件组 */
|
|
40
|
+
_fieldControlGroup: any[]
|
|
41
|
+
|
|
42
|
+
/**表单控件类型 */
|
|
43
|
+
_type: any
|
|
44
|
+
@Input()
|
|
45
|
+
public set type(v: any) {
|
|
46
|
+
this._type = v
|
|
47
|
+
this.dataLoaded()
|
|
48
|
+
}
|
|
49
|
+
get formConfiguration() {
|
|
50
|
+
return this._Entity.get('formConfiguration') as FormGroup
|
|
51
|
+
}
|
|
52
|
+
get TableColumns() {
|
|
53
|
+
return this.formConfiguration.controls['TableColumns'] as FormArray
|
|
54
|
+
}
|
|
55
|
+
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
56
|
+
|
|
57
|
+
private cdr = inject(ChangeDetectorRef);
|
|
58
|
+
async dataLoaded() {
|
|
59
|
+
if (this._Entity && this._type) {
|
|
60
|
+
await this.AfterInit();
|
|
61
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
62
|
+
this.submitclick?.nativeElement?.click();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**增加选项 */
|
|
66
|
+
addTableColumns() {
|
|
67
|
+
this.TableColumns.push(this.fb.group({
|
|
68
|
+
...new TableFormControl(),
|
|
69
|
+
formConfiguration: [{}]
|
|
70
|
+
}))
|
|
71
|
+
}
|
|
72
|
+
/**删除某个选项 */
|
|
73
|
+
deleteTableColumns(index) {
|
|
74
|
+
this.TableColumns.removeAt(index)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
AfterInit() {
|
|
78
|
+
return new Promise((resolve, rejects) => {
|
|
79
|
+
this._Entity.setControl('formConfiguration', this.fb.group(new TableConfig()))
|
|
80
|
+
this._fieldControlGroup = this._FieldAbstractsService.getExcludeAssignControl(this._type)
|
|
81
|
+
if (this._selected && this._selected.formControlName == this._type) {
|
|
82
|
+
this._selected.formConfiguration['TableColumns'].forEach(el => {
|
|
83
|
+
this.addTableColumns()
|
|
84
|
+
});
|
|
85
|
+
this.formConfiguration.patchValue(this._selected.formConfiguration)
|
|
86
|
+
} else {
|
|
87
|
+
this.addTableColumns()
|
|
88
|
+
}
|
|
89
|
+
resolve(true)
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
itemForm: any
|
|
93
|
+
/**选择表格的表单控件 */
|
|
94
|
+
selectTableControl(event, i, item) {
|
|
95
|
+
this.CurrentSelectionTableControlName = event.target.value
|
|
96
|
+
this.tableSelectOpen = true
|
|
97
|
+
this.tableSelectForm = this.fb.group(new TableFormControl())
|
|
98
|
+
this.TableColumnsIndex = i
|
|
99
|
+
this.itemForm = item
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
CurrentSelectionTableControlName: any
|
|
103
|
+
|
|
104
|
+
/**正在创建或编辑的表格项下标 */
|
|
105
|
+
TableColumnsIndex: any
|
|
106
|
+
/**创建站点模态框状态 */
|
|
107
|
+
tableSelectOpen: boolean = false
|
|
108
|
+
|
|
109
|
+
/**用于确定模态的繁忙状态是否为真 */
|
|
110
|
+
modalBusy: boolean = false
|
|
111
|
+
/**创建站点表单 */
|
|
112
|
+
tableSelectForm: FormGroup | undefined;
|
|
113
|
+
|
|
114
|
+
/**表格已选择数据 */
|
|
115
|
+
_tableSelected: any
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**表单控件模板-动态赋值表单控件 */
|
|
119
|
+
@ViewChild('tableSelectModalSubmit', { static: false }) tableSelectModalSubmit: ElementRef;
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
/**创建站点模态框状态改变 */
|
|
123
|
+
tableSelectVisibleChange(event) {
|
|
124
|
+
if (!event) {
|
|
125
|
+
this._tableSelected = undefined
|
|
126
|
+
this.tableSelectForm = undefined
|
|
127
|
+
this.CurrentSelectionTableControlName = undefined
|
|
128
|
+
this.TableColumnsIndex = undefined
|
|
129
|
+
return
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**表单保存提交 */
|
|
133
|
+
createOrEditSave() {
|
|
134
|
+
const formGroup = this.TableColumns.at(this.TableColumnsIndex) as FormGroup;
|
|
135
|
+
let formConfigurationgroup = formGroup.get('formConfiguration') as FormGroup
|
|
136
|
+
|
|
137
|
+
formConfigurationgroup.setValue({
|
|
138
|
+
...this.tableSelectForm.value['formConfiguration'],
|
|
139
|
+
});
|
|
140
|
+
this.tableSelectOpen = false
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**编辑站点按钮 */
|
|
144
|
+
EditSitesBtn(rows, i) {
|
|
145
|
+
|
|
146
|
+
this.CurrentSelectionTableControlName = rows.get('formControlName').value
|
|
147
|
+
this.tableSelectForm = this.fb.group(new TableFormControl())
|
|
148
|
+
this.tableSelectForm.patchValue({
|
|
149
|
+
...rows.value
|
|
150
|
+
})
|
|
151
|
+
this.tableSelectForm.get('formConfiguration').patchValue({
|
|
152
|
+
...rows.value['formConfiguration']
|
|
153
|
+
})
|
|
154
|
+
this._tableSelected = rows.value
|
|
155
|
+
this.TableColumnsIndex = i
|
|
156
|
+
this.tableSelectOpen = true
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
/**调整表格位置 */
|
|
161
|
+
TableArrowUpOrDown(type, index) {
|
|
162
|
+
let controlAt = this.TableColumns.at(index)
|
|
163
|
+
this.TableColumns.removeAt(index)
|
|
164
|
+
let lastindex = type == 'up' ? index - 1 : index + 1
|
|
165
|
+
this.TableColumns.insert(lastindex, controlAt)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
/**字段标签input失去标点生成字段名字 */
|
|
170
|
+
disPlayNameInputBlur(event, item) {
|
|
171
|
+
let value = event.target.value
|
|
172
|
+
let pinyin = this._CmsApiService.chineseToPinyin(value)
|
|
173
|
+
let nameInput = item.get('name')
|
|
174
|
+
if (nameInput.value) return
|
|
175
|
+
nameInput.patchValue(pinyin)
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FormArray, FormControl, FormGroup, Validators } from "@angular/forms";
|
|
2
|
+
|
|
3
|
+
export class TableConfig {
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
// 选项
|
|
8
|
+
TableColumns: any = new FormArray([])
|
|
9
|
+
|
|
10
|
+
constructor(data?: TableConfig) {
|
|
11
|
+
if (data) {
|
|
12
|
+
for (const key in data) {
|
|
13
|
+
if (data.hasOwnProperty(key)) {
|
|
14
|
+
this[key] = data[key];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export class TableFormControl {
|
|
21
|
+
/**列标题 */
|
|
22
|
+
displayName: any = ['', [Validators.required]];
|
|
23
|
+
/**空间配置 */
|
|
24
|
+
formConfiguration: any = new FormGroup({})
|
|
25
|
+
/**列名 */
|
|
26
|
+
name: any = ['', [Validators.required]];
|
|
27
|
+
//控件标识
|
|
28
|
+
formControlName: any = ['', [Validators.required]];
|
|
29
|
+
|
|
30
|
+
/**是否必填 */
|
|
31
|
+
required: any = [false];
|
|
32
|
+
/**描述 */
|
|
33
|
+
description: any = [''];
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
constructor(data?: TableConfig) {
|
|
37
|
+
if (data) {
|
|
38
|
+
for (const key in data) {
|
|
39
|
+
if (data.hasOwnProperty(key)) {
|
|
40
|
+
this[key] = data[key];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<form [formGroup]="_entity">
|
|
2
|
+
<div formGroupName="extraProperties">
|
|
3
|
+
<div class="mb-3">
|
|
4
|
+
<label class="form-label" *ngIf="_fields.displayName">{{ _fields.displayName }}</label>
|
|
5
|
+
<table class="table">
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<ng-container *ngFor="let item of formConfiguration.TableColumns">
|
|
9
|
+
<th scope="col">{{ item.displayName }}</th>
|
|
10
|
+
</ng-container>
|
|
11
|
+
<th scope="col" class="flex-end">
|
|
12
|
+
<button class="btn btn-light btn-sm" (click.stop)="addTableControlItem()">
|
|
13
|
+
<i class="fas fa-plus-circle"></i>
|
|
14
|
+
</button>
|
|
15
|
+
</th>
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
<tbody [formArrayName]="_fields.field.name">
|
|
19
|
+
<ng-container *ngFor="let item of fieldNameControl.controls; let i = index">
|
|
20
|
+
<tr>
|
|
21
|
+
<ng-container *ngFor="let el of formConfiguration.TableColumns">
|
|
22
|
+
<td>
|
|
23
|
+
<ng-container *ngIf="item&&el">
|
|
24
|
+
<df-dynamic [fields]="{ field: el }"
|
|
25
|
+
[selected]="_selected?_selected[i]?.extraProperties[''+el.name+'']:''"
|
|
26
|
+
[parentFiledName]="'extraProperties'" [culture]="_culture" [entity]="item"></df-dynamic>
|
|
27
|
+
</ng-container>
|
|
28
|
+
</td>
|
|
29
|
+
</ng-container>
|
|
30
|
+
<td scope="row" class="">
|
|
31
|
+
<div class="flex-end mb-3">
|
|
32
|
+
<button class="btn btn-light btn-sm ms-1" (click.stop)="minusTableControlItem(i)">
|
|
33
|
+
<i class="fas fa-minus"></i>
|
|
34
|
+
</button>
|
|
35
|
+
<button class="btn btn-light btn-sm ms-1" (click.stop)="TableArrowUpOrDown('up',i)"
|
|
36
|
+
*ngIf="i!==0">
|
|
37
|
+
<i class="fas fa-arrow-up"></i>
|
|
38
|
+
</button>
|
|
39
|
+
<button class="btn btn-light btn-sm ms-1"
|
|
40
|
+
(click.stop)="TableArrowUpOrDown('down',i)"
|
|
41
|
+
*ngIf="i!==fieldNameControl.controls.length-1">
|
|
42
|
+
<i class="fas fa-arrow-down"></i>
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
</td>
|
|
46
|
+
</tr>
|
|
47
|
+
</ng-container>
|
|
48
|
+
</tbody>
|
|
49
|
+
</table>
|
|
50
|
+
<small class="form-text text-muted d-block" *ngIf="_fields.field.description">{{_fields.field.description}}</small>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<button type="submit" style="display: none" #submitclick></button>
|
|
54
|
+
</form>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { TableControlComponent } from './table-control.component';
|
|
4
|
+
|
|
5
|
+
describe('TableControlComponent', () => {
|
|
6
|
+
let component: TableControlComponent;
|
|
7
|
+
let fixture: ComponentFixture<TableControlComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [TableControlComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(TableControlComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|