@dignite-ng/expand.cms 2.0.0-rc.10 → 2.0.0-rc.12
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/cms-config.module.d.ts +8 -0
- package/config/{src/enums/index.ts → enums/index.d.ts} +1 -1
- package/config/enums/route-names.d.ts +7 -0
- package/config/index.d.ts +5 -0
- package/config/{src/providers/index.ts → providers/index.d.ts} +1 -1
- package/config/providers/route.provider.d.ts +9 -0
- package/config/{src/public-api.ts → public-api.d.ts} +3 -3
- package/esm2022/config/cms-config.module.mjs +19 -0
- package/esm2022/config/dignite-ng-expand.cms-config.mjs +5 -0
- package/esm2022/config/enums/index.mjs +2 -0
- package/esm2022/config/enums/route-names.mjs +9 -0
- package/esm2022/config/providers/index.mjs +2 -0
- package/esm2022/config/providers/route.provider.mjs +60 -0
- package/esm2022/config/public-api.mjs +4 -0
- package/esm2022/dignite-ng-expand.cms.mjs +5 -0
- package/esm2022/lib/cms-routing.module.mjs +94 -0
- package/esm2022/lib/cms.module.mjs +146 -0
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +226 -0
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +25 -0
- package/esm2022/lib/components/admin/entries/create.component.mjs +136 -0
- package/esm2022/lib/components/admin/entries/edit.component.mjs +138 -0
- package/esm2022/lib/components/admin/entries/entries.component.mjs +367 -0
- package/esm2022/lib/components/admin/entries/index.mjs +5 -0
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +87 -0
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +116 -0
- package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +25 -0
- package/esm2022/lib/components/admin/fields/edit-field.component.mjs +109 -0
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +131 -0
- package/esm2022/lib/components/admin/fields/fields.component.mjs +107 -0
- package/esm2022/lib/components/admin/fields/index.mjs +7 -0
- package/esm2022/lib/components/admin/index.mjs +4 -0
- package/esm2022/lib/components/admin/sections/create-or-edit-sections-modal.component.mjs +210 -0
- package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +22 -0
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +47 -0
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +423 -0
- package/esm2022/lib/components/admin/sections/entry-types/index.mjs +3 -0
- package/esm2022/lib/components/admin/sections/index.mjs +4 -0
- package/esm2022/lib/components/admin/sections/sections.component.mjs +138 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +117 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +18 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +105 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-view.component.mjs +60 -0
- package/esm2022/lib/components/dynamic-form/entry/index.mjs +4 -0
- package/esm2022/lib/components/dynamic-form/form-control-group.mjs +34 -0
- package/esm2022/lib/components/dynamic-form/index.mjs +5 -0
- package/esm2022/lib/components/dynamic-form/matrix/index.mjs +4 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +219 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +50 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +108 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-view.component.mjs +40 -0
- package/esm2022/lib/components/dynamic-form/table/index.mjs +4 -0
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +158 -0
- package/esm2022/lib/components/dynamic-form/table/table-config.mjs +38 -0
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +118 -0
- package/esm2022/lib/components/dynamic-form/table/table-view.component.mjs +40 -0
- package/esm2022/lib/components/index.mjs +3 -0
- package/esm2022/lib/constants/styles.mjs +19 -0
- package/esm2022/lib/enums/ecms-component.mjs +13 -0
- package/esm2022/lib/enums/index.mjs +2 -0
- package/esm2022/lib/proxy/dignite/abp/data/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/abp/regionalization-management/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/abp/regionalization-management/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/abp/regionalization-management/regionalization.service.mjs +27 -0
- package/esm2022/lib/proxy/dignite/cms/admin/dynamic-forms/form-admin.service.mjs +22 -0
- package/esm2022/lib/proxy/dignite/cms/admin/dynamic-forms/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/cms/admin/dynamic-forms/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/cms/admin/entries/entry-admin.service.mjs +70 -0
- package/esm2022/lib/proxy/dignite/cms/admin/entries/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/cms/admin/entries/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/cms/admin/fields/field-admin.service.mjs +45 -0
- package/esm2022/lib/proxy/dignite/cms/admin/fields/field-group-admin.service.mjs +41 -0
- package/esm2022/lib/proxy/dignite/cms/admin/fields/index.mjs +4 -0
- package/esm2022/lib/proxy/dignite/cms/admin/fields/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/cms/admin/sections/entry-type-admin.service.mjs +41 -0
- package/esm2022/lib/proxy/dignite/cms/admin/sections/index.mjs +4 -0
- package/esm2022/lib/proxy/dignite/cms/admin/sections/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/cms/admin/sections/section-admin.service.mjs +51 -0
- package/esm2022/lib/proxy/dignite/cms/entries/entry-status.enum.mjs +8 -0
- package/esm2022/lib/proxy/dignite/cms/entries/index.mjs +2 -0
- package/esm2022/lib/proxy/dignite/cms/fields/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/cms/sections/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/cms/sections/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/cms/sections/section-type.enum.mjs +9 -0
- package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +2 -0
- package/esm2022/lib/resolvers/extensions-props-action-token.resolver.mjs +136 -0
- package/esm2022/lib/resolvers/page-default-toolbar-actions.mjs +160 -0
- package/esm2022/lib/resolvers/table-default-entity-actions.mjs +28 -0
- package/esm2022/lib/resolvers/table-default-entity-props.mjs +53 -0
- package/esm2022/lib/services/appent-content.mjs +15 -0
- package/esm2022/lib/services/cms-api.service.mjs +93 -0
- package/esm2022/lib/services/cms.service.mjs +21 -0
- package/esm2022/lib/services/field-abstracts.service.mjs +42 -0
- package/esm2022/lib/services/form-controls.service.mjs +40 -0
- package/esm2022/lib/services/index.mjs +4 -0
- package/esm2022/public-api.mjs +7 -0
- package/fesm2022/dignite-ng-expand.cms-config.mjs +92 -0
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -0
- package/fesm2022/dignite-ng-expand.cms.mjs +4250 -0
- package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/cms-routing.module.d.ts +7 -0
- package/lib/cms.module.d.ts +40 -0
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +63 -0
- package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +23 -0
- package/lib/components/admin/entries/create.component.d.ts +50 -0
- package/lib/components/admin/entries/edit.component.d.ts +53 -0
- package/lib/components/admin/entries/entries.component.d.ts +101 -0
- package/lib/components/admin/entries/index.d.ts +4 -0
- package/lib/components/admin/fields/create-field.component.d.ts +37 -0
- package/lib/components/admin/fields/create-or-edit-field.component.d.ts +37 -0
- package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +16 -0
- package/lib/components/admin/fields/edit-field.component.d.ts +46 -0
- package/lib/components/admin/fields/field-group.component.d.ts +58 -0
- package/lib/components/admin/fields/fields.component.d.ts +35 -0
- package/lib/components/admin/fields/index.d.ts +6 -0
- package/lib/components/admin/index.d.ts +3 -0
- package/lib/components/admin/sections/create-or-edit-sections-modal.component.d.ts +49 -0
- package/lib/components/admin/sections/create-or-update-sections-input-base.d.ts +20 -0
- package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +28 -0
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +147 -0
- package/lib/components/admin/sections/entry-types/index.d.ts +2 -0
- package/lib/components/admin/sections/index.d.ts +3 -0
- package/lib/components/admin/sections/sections.component.d.ts +46 -0
- package/lib/components/dynamic-form/entry/entry-config.component.d.ts +40 -0
- package/lib/components/dynamic-form/entry/entry-config.d.ts +9 -0
- package/lib/components/dynamic-form/entry/entry-control.component.d.ts +36 -0
- package/lib/components/dynamic-form/entry/entry-view.component.d.ts +22 -0
- package/lib/components/dynamic-form/entry/index.d.ts +3 -0
- package/lib/components/dynamic-form/form-control-group.d.ts +4 -0
- package/lib/components/dynamic-form/index.d.ts +4 -0
- package/lib/components/dynamic-form/matrix/index.d.ts +3 -0
- package/lib/components/dynamic-form/matrix/matrix-config.component.d.ts +74 -0
- package/lib/components/dynamic-form/matrix/matrix-config.d.ts +24 -0
- package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +42 -0
- package/lib/components/dynamic-form/matrix/matrix-view.component.d.ts +17 -0
- package/lib/components/dynamic-form/table/index.d.ts +3 -0
- package/lib/components/dynamic-form/table/table-config.component.d.ts +59 -0
- package/lib/components/dynamic-form/table/table-config.d.ts +18 -0
- package/lib/components/dynamic-form/table/table-control.component.d.ts +42 -0
- package/lib/components/dynamic-form/table/table-view.component.d.ts +17 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/constants/styles.d.ts +2 -0
- package/lib/enums/ecms-component.d.ts +11 -0
- package/lib/enums/index.d.ts +1 -0
- package/lib/proxy/dignite/abp/data/models.d.ts +3 -0
- package/lib/proxy/dignite/abp/regionalization-management/models.d.ts +8 -0
- package/lib/proxy/dignite/abp/regionalization-management/regionalization.service.d.ts +12 -0
- package/lib/proxy/dignite/cms/admin/dynamic-forms/form-admin.service.d.ts +12 -0
- package/lib/proxy/dignite/cms/admin/dynamic-forms/models.d.ts +5 -0
- package/lib/proxy/dignite/cms/admin/entries/entry-admin.service.d.ts +22 -0
- package/lib/proxy/dignite/cms/admin/entries/models.d.ts +61 -0
- package/lib/proxy/dignite/cms/admin/fields/field-admin.service.d.ts +17 -0
- package/lib/proxy/dignite/cms/admin/fields/field-group-admin.service.d.ts +16 -0
- package/{src/lib/proxy/dignite/cms/admin/fields/models.ts → lib/proxy/dignite/cms/admin/fields/models.d.ts} +34 -42
- package/lib/proxy/dignite/cms/admin/sections/entry-type-admin.service.d.ts +15 -0
- package/{src/lib/proxy/dignite/cms/admin/sections/models.ts → lib/proxy/dignite/cms/admin/sections/models.d.ts} +68 -82
- package/lib/proxy/dignite/cms/admin/sections/section-admin.service.d.ts +18 -0
- package/lib/proxy/dignite/cms/entries/entry-status.enum.d.ts +5 -0
- package/lib/proxy/dignite/cms/fields/models.d.ts +8 -0
- package/lib/proxy/dignite/cms/sections/models.d.ts +13 -0
- package/lib/proxy/dignite/cms/sections/section-type.enum.d.ts +6 -0
- package/{src/lib/proxy/volo/cms-kit/users/models.ts → lib/proxy/volo/cms-kit/users/models.d.ts} +7 -8
- package/lib/resolvers/extensions-props-action-token.resolver.d.ts +75 -0
- package/lib/resolvers/page-default-toolbar-actions.d.ts +18 -0
- package/lib/resolvers/table-default-entity-actions.d.ts +5 -0
- package/lib/resolvers/table-default-entity-props.d.ts +5 -0
- package/lib/services/appent-content.d.ts +1 -0
- package/lib/services/cms-api.service.d.ts +23 -0
- package/lib/services/cms.service.d.ts +10 -0
- package/lib/services/field-abstracts.service.d.ts +19 -0
- package/lib/services/form-controls.service.d.ts +16 -0
- package/lib/services/index.d.ts +3 -0
- package/package.json +22 -7
- package/{src/public-api.ts → public-api.d.ts} +3 -7
- package/config/ng-package.json +0 -6
- package/config/src/cms-config.module.ts +0 -13
- package/config/src/enums/route-names.ts +0 -7
- package/config/src/providers/route.provider.ts +0 -68
- package/ng-package.json +0 -10
- package/src/lib/cms-routing.module.ts +0 -102
- package/src/lib/cms.module.ts +0 -113
- package/src/lib/components/admin/entries/create-or-edit-entries.component.html +0 -137
- 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 +0 -21
- package/src/lib/components/admin/entries/create-or-edit-entries.component.ts +0 -216
- package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +0 -26
- package/src/lib/components/admin/entries/create.component.html +0 -16
- package/src/lib/components/admin/entries/create.component.scss +0 -0
- package/src/lib/components/admin/entries/create.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/create.component.ts +0 -130
- package/src/lib/components/admin/entries/edit.component.html +0 -9
- package/src/lib/components/admin/entries/edit.component.scss +0 -0
- package/src/lib/components/admin/entries/edit.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/edit.component.ts +0 -134
- package/src/lib/components/admin/entries/entries.component.html +0 -225
- package/src/lib/components/admin/entries/entries.component.scss +0 -109
- package/src/lib/components/admin/entries/entries.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/entries.component.ts +0 -394
- package/src/lib/components/admin/entries/index.ts +0 -4
- package/src/lib/components/admin/fields/create-field.component.html +0 -12
- package/src/lib/components/admin/fields/create-field.component.scss +0 -1
- package/src/lib/components/admin/fields/create-field.component.spec.ts +0 -21
- package/src/lib/components/admin/fields/create-field.component.ts +0 -85
- package/src/lib/components/admin/fields/create-or-edit-field.component.html +0 -39
- 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 +0 -21
- package/src/lib/components/admin/fields/create-or-edit-field.component.ts +0 -140
- package/src/lib/components/admin/fields/create-or-update-field-input-base.ts +0 -33
- package/src/lib/components/admin/fields/edit-field.component.html +0 -14
- package/src/lib/components/admin/fields/edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/edit-field.component.spec.ts +0 -21
- package/src/lib/components/admin/fields/edit-field.component.ts +0 -112
- package/src/lib/components/admin/fields/field-group.component.html +0 -69
- package/src/lib/components/admin/fields/field-group.component.scss +0 -0
- package/src/lib/components/admin/fields/field-group.component.spec.ts +0 -21
- package/src/lib/components/admin/fields/field-group.component.ts +0 -151
- package/src/lib/components/admin/fields/fields.component.html +0 -25
- package/src/lib/components/admin/fields/fields.component.scss +0 -1
- package/src/lib/components/admin/fields/fields.component.spec.ts +0 -21
- package/src/lib/components/admin/fields/fields.component.ts +0 -109
- package/src/lib/components/admin/fields/index.ts +0 -6
- package/src/lib/components/admin/index.ts +0 -3
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.html +0 -81
- 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 +0 -23
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.ts +0 -239
- package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +0 -23
- package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +0 -52
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +0 -195
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +0 -1
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.spec.ts +0 -21
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.ts +0 -442
- package/src/lib/components/admin/sections/entry-types/index.ts +0 -2
- package/src/lib/components/admin/sections/index.ts +0 -3
- package/src/lib/components/admin/sections/sections.component.html +0 -189
- package/src/lib/components/admin/sections/sections.component.scss +0 -1
- package/src/lib/components/admin/sections/sections.component.spec.ts +0 -21
- package/src/lib/components/admin/sections/sections.component.ts +0 -136
- package/src/lib/components/dynamic-form/entry/entry-config.component.html +0 -26
- package/src/lib/components/dynamic-form/entry/entry-config.component.scss +0 -27
- package/src/lib/components/dynamic-form/entry/entry-config.component.spec.ts +0 -21
- package/src/lib/components/dynamic-form/entry/entry-config.component.ts +0 -119
- package/src/lib/components/dynamic-form/entry/entry-config.ts +0 -22
- package/src/lib/components/dynamic-form/entry/entry-control.component.html +0 -25
- package/src/lib/components/dynamic-form/entry/entry-control.component.scss +0 -35
- package/src/lib/components/dynamic-form/entry/entry-control.component.spec.ts +0 -21
- package/src/lib/components/dynamic-form/entry/entry-control.component.ts +0 -111
- package/src/lib/components/dynamic-form/entry/index.ts +0 -3
- package/src/lib/components/dynamic-form/form-control-group.ts +0 -27
- package/src/lib/components/dynamic-form/index.ts +0 -4
- package/src/lib/components/dynamic-form/matrix/index.ts +0 -3
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.html +0 -148
- 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 +0 -21
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.ts +0 -244
- package/src/lib/components/dynamic-form/matrix/matrix-config.ts +0 -63
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.html +0 -42
- 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 +0 -21
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.ts +0 -118
- package/src/lib/components/dynamic-form/table/index.ts +0 -3
- package/src/lib/components/dynamic-form/table/table-config.component.html +0 -85
- package/src/lib/components/dynamic-form/table/table-config.component.scss +0 -10
- package/src/lib/components/dynamic-form/table/table-config.component.spec.ts +0 -21
- package/src/lib/components/dynamic-form/table/table-config.component.ts +0 -177
- package/src/lib/components/dynamic-form/table/table-config.ts +0 -45
- package/src/lib/components/dynamic-form/table/table-control.component.html +0 -54
- package/src/lib/components/dynamic-form/table/table-control.component.scss +0 -1
- package/src/lib/components/dynamic-form/table/table-control.component.spec.ts +0 -21
- package/src/lib/components/dynamic-form/table/table-control.component.ts +0 -127
- package/src/lib/components/index.ts +0 -2
- package/src/lib/constants/index.ts +0 -1
- package/src/lib/constants/styles.ts +0 -18
- package/src/lib/enums/ecms-component.ts +0 -11
- package/src/lib/enums/index.ts +0 -1
- package/src/lib/proxy/README.md +0 -17
- package/src/lib/proxy/dignite/abp/data/index.ts +0 -1
- package/src/lib/proxy/dignite/abp/data/models.ts +0 -4
- package/src/lib/proxy/dignite/abp/index.ts +0 -3
- package/src/lib/proxy/dignite/abp/regionalization-management/models.ts +0 -10
- package/src/lib/proxy/dignite/abp/regionalization-management/regionalization.service.ts +0 -29
- package/src/lib/proxy/dignite/cms/admin/dynamic-forms/form-admin.service.ts +0 -20
- package/src/lib/proxy/dignite/cms/admin/dynamic-forms/models.ts +0 -6
- package/src/lib/proxy/dignite/cms/admin/entries/entry-admin.service.ts +0 -109
- package/src/lib/proxy/dignite/cms/admin/entries/models.ts +0 -69
- package/src/lib/proxy/dignite/cms/admin/fields/field-admin.service.ts +0 -64
- package/src/lib/proxy/dignite/cms/admin/fields/field-group-admin.service.ts +0 -56
- package/src/lib/proxy/dignite/cms/admin/index.ts +0 -5
- package/src/lib/proxy/dignite/cms/admin/sections/entry-type-admin.service.ts +0 -55
- package/src/lib/proxy/dignite/cms/admin/sections/section-admin.service.ts +0 -74
- package/src/lib/proxy/dignite/cms/entries/entry-status.enum.ts +0 -8
- package/src/lib/proxy/dignite/cms/fields/index.ts +0 -1
- package/src/lib/proxy/dignite/cms/fields/models.ts +0 -9
- package/src/lib/proxy/dignite/cms/index.ts +0 -5
- package/src/lib/proxy/dignite/cms/sections/models.ts +0 -15
- package/src/lib/proxy/dignite/cms/sections/section-type.enum.ts +0 -9
- package/src/lib/proxy/dignite/index.ts +0 -3
- package/src/lib/proxy/generate-proxy.json +0 -54593
- package/src/lib/proxy/index.ts +0 -3
- package/src/lib/proxy/volo/cms-kit/index.ts +0 -2
- package/src/lib/proxy/volo/cms-kit/users/index.ts +0 -1
- package/src/lib/proxy/volo/index.ts +0 -2
- package/src/lib/resolvers/extensions-props-action-token.resolver.ts +0 -182
- package/src/lib/resolvers/page-default-toolbar-actions.ts +0 -173
- package/src/lib/resolvers/table-default-entity-actions.ts +0 -29
- package/src/lib/resolvers/table-default-entity-props.ts +0 -62
- package/src/lib/services/appent-content.ts +0 -13
- package/src/lib/services/cms-api.service.ts +0 -90
- package/src/lib/services/cms.service.ts +0 -18
- package/src/lib/services/field-abstracts.service.ts +0 -39
- package/src/lib/services/index.ts +0 -3
- package/src/lib/services/validator.ts +0 -10
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -16
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- /package/{src/lib/proxy/dignite/abp/regionalization-management/index.ts → lib/proxy/dignite/abp/regionalization-management/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/cms/admin/dynamic-forms/index.ts → lib/proxy/dignite/cms/admin/dynamic-forms/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/cms/admin/entries/index.ts → lib/proxy/dignite/cms/admin/entries/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/cms/admin/fields/index.ts → lib/proxy/dignite/cms/admin/fields/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/cms/admin/sections/index.ts → lib/proxy/dignite/cms/admin/sections/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/cms/entries/index.ts → lib/proxy/dignite/cms/entries/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/cms/sections/index.ts → lib/proxy/dignite/cms/sections/index.d.ts} +0 -0
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @angular-eslint/component-selector */
|
|
2
|
-
import { ChangeDetectorRef, Component, ElementRef, Input, ViewChild, inject } from '@angular/core';
|
|
3
|
-
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
4
|
-
import { EntryAdminService } from '../../../proxy/dignite/cms/admin/entries/entry-admin.service';
|
|
5
|
-
import { EntryStatus } from '../../../proxy/dignite/cms/entries';
|
|
6
|
-
// import { EntryAdminService } from '../../../proxy/admin/entries';
|
|
7
|
-
// import { EntryStatus } from '../../../proxy/entries/entry-status.enum';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'cms-entry-control',
|
|
11
|
-
templateUrl: './entry-control.component.html',
|
|
12
|
-
styleUrls: ['./entry-control.component.scss'],
|
|
13
|
-
})
|
|
14
|
-
export class EntryControlComponent {
|
|
15
|
-
constructor() {}
|
|
16
|
-
private fb = inject(FormBuilder);
|
|
17
|
-
private _EntryAdminService = inject(EntryAdminService);
|
|
18
|
-
|
|
19
|
-
/**表单实体 */
|
|
20
|
-
_entity: FormGroup | undefined;
|
|
21
|
-
@Input()
|
|
22
|
-
public set entity(v: any) {
|
|
23
|
-
this._entity = v;
|
|
24
|
-
|
|
25
|
-
if (v) this.dataLoaded();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**字段配置列表 */
|
|
29
|
-
_fields: any = '';
|
|
30
|
-
@Input()
|
|
31
|
-
public set fields(v: any) {
|
|
32
|
-
this._fields = v;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
36
|
-
_parentFiledName: any;
|
|
37
|
-
@Input()
|
|
38
|
-
public set parentFiledName(v: any) {
|
|
39
|
-
this._parentFiledName = v;
|
|
40
|
-
}
|
|
41
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
42
|
-
_selected: any;
|
|
43
|
-
@Input()
|
|
44
|
-
public set selected(v: any) {
|
|
45
|
-
this._selected = v || [];
|
|
46
|
-
}
|
|
47
|
-
/**语言 */
|
|
48
|
-
_culture: any;
|
|
49
|
-
@Input()
|
|
50
|
-
public set culture(v: any) {
|
|
51
|
-
if (v) {
|
|
52
|
-
this._culture = v;
|
|
53
|
-
// this.dataLoaded()
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
57
|
-
|
|
58
|
-
extraProperties: FormGroup | undefined;
|
|
59
|
-
|
|
60
|
-
/** */
|
|
61
|
-
listOfOption: any[] = [];
|
|
62
|
-
private cdr = inject(ChangeDetectorRef);
|
|
63
|
-
async dataLoaded() {
|
|
64
|
-
if (this._fields && this._entity && this._parentFiledName && this._culture) {
|
|
65
|
-
await this.AfterInit();
|
|
66
|
-
await this.getEntryAssignList();
|
|
67
|
-
this.cdr.detectChanges(); // 手动触发变更检测
|
|
68
|
-
this.submitclick?.nativeElement?.click();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
AfterInit() {
|
|
75
|
-
return new Promise((resolve, rejects) => {
|
|
76
|
-
let ValidatorsArray:any[] = [];
|
|
77
|
-
if (this._fields.required) {
|
|
78
|
-
ValidatorsArray.push(Validators.required);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
let newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
82
|
-
let extraProperties = this._entity?.get(this._parentFiledName) as FormGroup;
|
|
83
|
-
extraProperties.setControl(this._fields.field.name, newControl);
|
|
84
|
-
resolve(true);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**获取对应的条目 */
|
|
89
|
-
getEntryAssignList(filter = '') {
|
|
90
|
-
return new Promise((resolve, rejects) => {
|
|
91
|
-
this._EntryAdminService
|
|
92
|
-
.getList({
|
|
93
|
-
culture: this._culture,
|
|
94
|
-
sectionId: this._fields.field.formConfiguration['Entry.SectionId'],
|
|
95
|
-
skipCount: 0,
|
|
96
|
-
maxResultCount: 30,
|
|
97
|
-
status: EntryStatus.Published,
|
|
98
|
-
filter: filter,
|
|
99
|
-
})
|
|
100
|
-
.subscribe((res:any) => {
|
|
101
|
-
this.listOfOption = res.items;
|
|
102
|
-
resolve(true);
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** */
|
|
108
|
-
async SelectChange(event) {
|
|
109
|
-
await this.getEntryAssignList(event);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EntryConfigComponent, EntryControlComponent } from "./entry";
|
|
2
|
-
import { MatrixConfigComponent } from "./matrix/matrix-config.component";
|
|
3
|
-
import { MatrixControlComponent } from "./matrix/matrix-control.component";
|
|
4
|
-
import { TableConfigComponent, TableControlComponent } from "./table";
|
|
5
|
-
/**
|
|
6
|
-
* 表单控件分组-包含配置,控件,显示的数组
|
|
7
|
-
*/
|
|
8
|
-
export const cmsFieldControlGroup: any[] = [
|
|
9
|
-
{
|
|
10
|
-
displayName: '表格',
|
|
11
|
-
name: 'Table',
|
|
12
|
-
fieldConfigComponent: TableConfigComponent,
|
|
13
|
-
fieldComponent: TableControlComponent,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
displayName: '矩阵',
|
|
17
|
-
name: 'Matrix',
|
|
18
|
-
fieldConfigComponent: MatrixConfigComponent,
|
|
19
|
-
fieldComponent: MatrixControlComponent,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
displayName: '条目',
|
|
23
|
-
name: 'Entry',
|
|
24
|
-
fieldConfigComponent: EntryConfigComponent,
|
|
25
|
-
fieldComponent: EntryControlComponent,
|
|
26
|
-
},
|
|
27
|
-
];
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<form [formGroup]="_Entity">
|
|
2
|
-
<div formGroupName="formConfiguration">
|
|
3
|
-
<div class="mb-3">
|
|
4
|
-
<label class="form-label">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>
|
|
5
|
-
<div class="row">
|
|
6
|
-
<div class="col-md-3">
|
|
7
|
-
<div class="list-group">
|
|
8
|
-
<li class="list-group-item d-flex align-items-center justify-content-between"
|
|
9
|
-
aria-current="true">
|
|
10
|
-
{{'Cms::MatrixBlockType' | abpLocalization}}
|
|
11
|
-
<button class="btn btn-light btn-sm p-0" (click.stop)="addMatrixBlockType()">
|
|
12
|
-
<i class="fas fa-plus-circle p-1"></i>
|
|
13
|
-
</button>
|
|
14
|
-
</li>
|
|
15
|
-
<ng-container *ngFor="let item of MatrixBlockTypes.controls;let i =index">
|
|
16
|
-
<button type="button" (click.stop)="selectMatrixBlockChange(i)"
|
|
17
|
-
class="list-group-item d-flex align-items-center justify-content-between list-group-item-action "
|
|
18
|
-
[class.active]="i===selectMatrixBlockIndex">
|
|
19
|
-
<div>
|
|
20
|
-
<div>{{item.value.displayName}}</div>
|
|
21
|
-
<div>{{item.value.name}}</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div ngbDropdown class="d-inline-block">
|
|
24
|
-
<button type="button" class="btn btn-light btn-sm" id="dropdownBasic1"
|
|
25
|
-
style="z-index: 8;" ngbDropdownToggle></button>
|
|
26
|
-
<div ngbDropdownMenu aria-labelledby="dropdownBasic1" style="z-index: 9;">
|
|
27
|
-
<button ngbDropdownItem
|
|
28
|
-
(click.stop)="EditMatrixBlock(item.value)">{{'AbpUi::Edit' | abpLocalization}}</button>
|
|
29
|
-
<button ngbDropdownItem
|
|
30
|
-
(click.stop)="DeleteMatrixBlock(i)">{{'AbpUi::Delete' | abpLocalization}}</button>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</button>
|
|
34
|
-
</ng-container>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="col-md-3">
|
|
38
|
-
<div class="list-group" *ngIf="MatrixBlockTypes?.controls.length>0">
|
|
39
|
-
<li class="list-group-item d-flex align-items-center justify-content-between"
|
|
40
|
-
aria-current="true">
|
|
41
|
-
{{'Cms::Fields' | abpLocalization}}
|
|
42
|
-
<button class="btn btn-light btn-sm p-0" (click.stop)="addMatrixField()">
|
|
43
|
-
<i class="fas fa-plus-circle p-1"></i>
|
|
44
|
-
</button>
|
|
45
|
-
</li>
|
|
46
|
-
<ng-container *ngFor="let item of MatrixBlockTypes.controls;let i =index">
|
|
47
|
-
<ng-container *ngIf="i === selectMatrixBlockIndex">
|
|
48
|
-
<ng-container *ngFor="let el of item.controls['fields'].controls;let fi =index">
|
|
49
|
-
<button type="button" (click.stop)="selectMatrixFieldChange(i,fi)"
|
|
50
|
-
class="list-group-item d-flex align-items-center justify-content-between list-group-item-action "
|
|
51
|
-
[class.active]="fi===selectMatrixFieldIndex">
|
|
52
|
-
<div>
|
|
53
|
-
<div>{{el.value.displayName}}</div>
|
|
54
|
-
<div>{{el.value.name}}</div>
|
|
55
|
-
</div>
|
|
56
|
-
<button type="button"
|
|
57
|
-
(click.stop)="deleteMatrixField(item.controls['fields'],fi)"
|
|
58
|
-
class="btn btn-sm btn-li">{{'AbpUi::Delete' | abpLocalization}}</button>
|
|
59
|
-
</button>
|
|
60
|
-
</ng-container>
|
|
61
|
-
</ng-container>
|
|
62
|
-
</ng-container>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="col-md-6" formArrayName="MatrixBlockTypes">
|
|
66
|
-
<ng-container *ngFor="let item of MatrixBlockTypes.controls;let i =index">
|
|
67
|
-
<div [formGroupName]="i" [hidden]="i !== selectMatrixBlockIndex">
|
|
68
|
-
<div formArrayName="fields">
|
|
69
|
-
<ng-container *ngFor="let itemf of item.controls['fields'].controls;let fi =index">
|
|
70
|
-
<div [formGroupName]="fi" [hidden]="fi !== selectMatrixFieldIndex">
|
|
71
|
-
<div class="mb-3">
|
|
72
|
-
<label class="form-label"
|
|
73
|
-
for="displayName">{{'Cms::DisplayName' | abpLocalization}}</label>
|
|
74
|
-
<input type="text" class="form-control" formControlName="displayName"
|
|
75
|
-
(blur)="MatrixFieldDisplayNameInputBlur($event)">
|
|
76
|
-
</div>
|
|
77
|
-
<div class="mb-3">
|
|
78
|
-
<label class="form-label"
|
|
79
|
-
for="name">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>
|
|
80
|
-
<input type="text" class="form-control" formControlName="name">
|
|
81
|
-
<small class="form-text text-muted d-block">
|
|
82
|
-
{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</small>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="mb-3">
|
|
85
|
-
<label class="form-label"
|
|
86
|
-
for="description">{{'Cms::Description' | abpLocalization}}</label>
|
|
87
|
-
<input type="text" class="form-control" formControlName="description">
|
|
88
|
-
</div>
|
|
89
|
-
<div class="mb-3">
|
|
90
|
-
<label class="form-label"
|
|
91
|
-
for="formControlName">{{'Cms::FieldType' | abpLocalization}}</label>
|
|
92
|
-
<select class="form-select" formControlName="formControlName" (change)="setConfigComponent()">
|
|
93
|
-
<ng-container *ngFor="let itemC of _FieldControlGroup;let i =index">
|
|
94
|
-
<option [value]="itemC.name">{{itemC.displayName}}</option>
|
|
95
|
-
</ng-container>
|
|
96
|
-
</select>
|
|
97
|
-
</div>
|
|
98
|
-
<ng-container *ngIf="itemf.value.formControlName&&itemf">
|
|
99
|
-
<df-dynamic [type]="itemf.value.formControlName"
|
|
100
|
-
[selected]="_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''" [entity]="itemf"></df-dynamic>
|
|
101
|
-
|
|
102
|
-
</ng-container>
|
|
103
|
-
</div>
|
|
104
|
-
</ng-container>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</ng-container>
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<button type="submit" (abpInit)="submitclick?.nativeElement?.click()" style="display: none;"
|
|
113
|
-
#submitclick></button>
|
|
114
|
-
</div>
|
|
115
|
-
</form>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<abp-modal [(visible)]="matrixModalOpen" [busy]="modalBusy" (visibleChange)="matrixModalVisibleChange($event)" >
|
|
120
|
-
<ng-template #abpHeader>
|
|
121
|
-
<h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>
|
|
122
|
-
</ng-template>
|
|
123
|
-
<ng-template #abpBody>
|
|
124
|
-
<ng-template #loaderRef>
|
|
125
|
-
<div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
|
|
126
|
-
</ng-template>
|
|
127
|
-
<ng-container *ngIf="matrixModalForm; else loaderRef">
|
|
128
|
-
<form class="sites-modal-form" #myForm="ngForm" [formGroup]="matrixModalForm"
|
|
129
|
-
(keydown.enter)="$event.preventDefault()" (submit)="createOrEditSave()">
|
|
130
|
-
<button type="submit" #matrixModalModalSubmit style="display: none"></button>
|
|
131
|
-
<div class="mb-3">
|
|
132
|
-
<label class="form-label" for="displayName">{{'Cms::DisplayName' | abpLocalization}}</label>
|
|
133
|
-
<input type="text" class="form-control" formControlName="displayName"
|
|
134
|
-
(blur)="displayNameInputBlur($event)">
|
|
135
|
-
</div>
|
|
136
|
-
<div class="mb-3">
|
|
137
|
-
<label class="form-label" for="name">{{'Cms::Name' | abpLocalization}}</label>
|
|
138
|
-
<input type="text" class="form-control" formControlName="name">
|
|
139
|
-
</div>
|
|
140
|
-
</form>
|
|
141
|
-
</ng-container>
|
|
142
|
-
</ng-template>
|
|
143
|
-
<ng-template #abpFooter>
|
|
144
|
-
<button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
|
|
145
|
-
<abp-button iconClass="fa fa-check"
|
|
146
|
-
(click)="matrixModalModalSubmit.nativeElement.click()">{{'AbpUi::Save' | abpLocalization}}</abp-button>
|
|
147
|
-
</ng-template>
|
|
148
|
-
</abp-modal>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { MatrixConfigComponent } from './matrix-config.component';
|
|
4
|
-
|
|
5
|
-
describe('MatrixConfigComponent', () => {
|
|
6
|
-
let component: MatrixConfigComponent;
|
|
7
|
-
let fixture: ComponentFixture<MatrixConfigComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [MatrixConfigComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(MatrixConfigComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @angular-eslint/component-selector */
|
|
2
|
-
import { ChangeDetectorRef, Component, ElementRef, inject, Input, ViewChild } from '@angular/core';
|
|
3
|
-
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
|
4
|
-
import { MatrixConfig, MatrixItemConfig } from './matrix-config';
|
|
5
|
-
import { CmsApiService, FieldAbstractsService } from '../../../services';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'df-matrix-config',
|
|
9
|
-
templateUrl: './matrix-config.component.html',
|
|
10
|
-
styleUrls: ['./matrix-config.component.scss'],
|
|
11
|
-
})
|
|
12
|
-
export class MatrixConfigComponent {
|
|
13
|
-
constructor(
|
|
14
|
-
private fb: FormBuilder,
|
|
15
|
-
private _CmsApiService: CmsApiService,
|
|
16
|
-
private _FieldAbstractsService: FieldAbstractsService
|
|
17
|
-
) {}
|
|
18
|
-
|
|
19
|
-
/**表单控件组 */
|
|
20
|
-
_FieldControlGroup: any[];
|
|
21
|
-
/**表单控件类型 */
|
|
22
|
-
_type: any;
|
|
23
|
-
@Input()
|
|
24
|
-
public set type(v: any) {
|
|
25
|
-
this._type = v;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**选择的表单信息 */
|
|
29
|
-
_selected: any;
|
|
30
|
-
@Input()
|
|
31
|
-
public set selected(v: any) {
|
|
32
|
-
if (v) {
|
|
33
|
-
for (const key in v.formConfiguration) {
|
|
34
|
-
if(Array.isArray(v.formConfiguration[key])){
|
|
35
|
-
v.formConfiguration[key]=this._CmsApiService.convertKeysToCamelCase(v.formConfiguration[key])
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
this._selected = v;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**表单实体 */
|
|
42
|
-
_Entity: FormGroup | undefined;
|
|
43
|
-
@Input()
|
|
44
|
-
public set Entity(v: FormGroup) {
|
|
45
|
-
this._Entity = v;
|
|
46
|
-
this.dataLoaded();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
50
|
-
|
|
51
|
-
private cdr = inject(ChangeDetectorRef);
|
|
52
|
-
async dataLoaded() {
|
|
53
|
-
if (this._Entity && this._type) {
|
|
54
|
-
await this.AfterInit();
|
|
55
|
-
this.cdr.detectChanges(); // 手动触发变更检测
|
|
56
|
-
this.submitclick?.nativeElement?.click();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
AfterInit() {
|
|
61
|
-
return new Promise(async (resolve, rejects) => {
|
|
62
|
-
this._FieldControlGroup = this._FieldAbstractsService.getExcludeAssignControl(this._type);
|
|
63
|
-
this._Entity.setControl('formConfiguration', this.fb.group(new MatrixConfig()));
|
|
64
|
-
await this.setSelectValue();
|
|
65
|
-
this.formConfiguration.patchValue(this._selected.formConfiguration);
|
|
66
|
-
resolve(true);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
setSelectValue() {
|
|
73
|
-
return new Promise((resolve, rejects) => {
|
|
74
|
-
if (this._selected && this._selected.formControlName == this._type) {
|
|
75
|
-
this._selected.formConfiguration['MatrixBlockTypes'].forEach((el, index) => {
|
|
76
|
-
this.addMatrixBlockTypeItem(el);
|
|
77
|
-
el.fields.forEach((elf, indexf) => {
|
|
78
|
-
this.addMatrixFieldItem(elf, index);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
resolve(true);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**获取表单配置 */
|
|
87
|
-
get formConfiguration() {
|
|
88
|
-
return this._Entity.get('formConfiguration') as FormGroup;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**获取表单配置下的矩阵块表单数组 */
|
|
92
|
-
get MatrixBlockTypes() {
|
|
93
|
-
return this.formConfiguration.controls['MatrixBlockTypes'] as FormArray;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**模态框-状态 */
|
|
97
|
-
matrixModalOpen: boolean = false;
|
|
98
|
-
/**模态框-是否正在编辑 */
|
|
99
|
-
isMatrixModalEdit: any = false;
|
|
100
|
-
|
|
101
|
-
/**模态框-用于确定模态的繁忙状态是否为真 */
|
|
102
|
-
modalBusy: boolean = false;
|
|
103
|
-
|
|
104
|
-
/**模态框-表单 */
|
|
105
|
-
matrixModalForm: FormGroup | undefined;
|
|
106
|
-
|
|
107
|
-
/**表单控件模板-用于在form外提交submit */
|
|
108
|
-
@ViewChild('matrixModalModalSubmit', { static: false }) matrixModalModalSubmit: ElementRef;
|
|
109
|
-
|
|
110
|
-
/**矩阵块-选择的下标 */
|
|
111
|
-
selectMatrixBlockIndex: any = 0;
|
|
112
|
-
|
|
113
|
-
/**矩阵块-选择的矩阵下字段的下标 */
|
|
114
|
-
selectMatrixFieldIndex: any = 0;
|
|
115
|
-
|
|
116
|
-
/**模态框-状态改变 */
|
|
117
|
-
matrixModalVisibleChange(event) {
|
|
118
|
-
if (!event) {
|
|
119
|
-
this.isMatrixModalEdit = false;
|
|
120
|
-
this.matrixModalForm = undefined;
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**矩阵块--新增-打开模态框 */
|
|
126
|
-
addMatrixBlockType() {
|
|
127
|
-
this.matrixModalForm = this.fb.group(new MatrixItemConfig());
|
|
128
|
-
this.matrixModalOpen = true;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**模态框--矩阵表单保存提交 */
|
|
132
|
-
createOrEditSave() {
|
|
133
|
-
let input = this.matrixModalForm.value;
|
|
134
|
-
if (!this.matrixModalForm.valid) return;
|
|
135
|
-
if (this.isMatrixModalEdit) {
|
|
136
|
-
let MatrixBlockTypesItem = this.MatrixBlockTypes.at(this.selectMatrixBlockIndex) as FormGroup;
|
|
137
|
-
MatrixBlockTypesItem.patchValue({
|
|
138
|
-
...input,
|
|
139
|
-
});
|
|
140
|
-
} else {
|
|
141
|
-
this.addMatrixBlockTypeItem(input);
|
|
142
|
-
}
|
|
143
|
-
this.matrixModalOpen = false;
|
|
144
|
-
}
|
|
145
|
-
/**新增矩阵块-向数组表单中增加项 */
|
|
146
|
-
addMatrixBlockTypeItem(input) {
|
|
147
|
-
this.MatrixBlockTypes.push(
|
|
148
|
-
new FormGroup({
|
|
149
|
-
displayName: new FormControl(input.displayName, Validators.required),
|
|
150
|
-
name: new FormControl(input.name, Validators.required),
|
|
151
|
-
fields: new FormArray([]),
|
|
152
|
-
})
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
/**编辑矩阵块 */
|
|
156
|
-
EditMatrixBlock(input) {
|
|
157
|
-
this.matrixModalForm = this.fb.group(new MatrixItemConfig());
|
|
158
|
-
this.matrixModalForm.patchValue({
|
|
159
|
-
...input,
|
|
160
|
-
});
|
|
161
|
-
this.matrixModalOpen = true;
|
|
162
|
-
this.isMatrixModalEdit = true;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**删除矩阵块 */
|
|
166
|
-
DeleteMatrixBlock(index) {
|
|
167
|
-
this.MatrixBlockTypes.removeAt(index);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**矩阵块-选择 */
|
|
171
|
-
selectMatrixBlockChange(index) {
|
|
172
|
-
this.selectMatrixBlockIndex = index;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**矩阵字段-新增 */
|
|
176
|
-
addMatrixField() {
|
|
177
|
-
this.addMatrixFieldItem('', this.selectMatrixBlockIndex);
|
|
178
|
-
let MatrixBlockTypesItemForm = this.MatrixBlockTypes.at(
|
|
179
|
-
this.selectMatrixBlockIndex
|
|
180
|
-
) as FormGroup;
|
|
181
|
-
let MatrixFieldItemForm = MatrixBlockTypesItemForm.get('fields') as FormArray;
|
|
182
|
-
this.selectMatrixFieldChange(0, MatrixFieldItemForm.length - 1);
|
|
183
|
-
}
|
|
184
|
-
/**矩阵字段-新增矩阵字段项 */
|
|
185
|
-
addMatrixFieldItem(input: any = '', selectMatrixBlockIndex) {
|
|
186
|
-
/**矩阵下标的矩阵项Form */
|
|
187
|
-
let MatrixBlockTypesItemForm = this.MatrixBlockTypes.at(selectMatrixBlockIndex) as FormGroup;
|
|
188
|
-
let MatrixFieldItemForm = MatrixBlockTypesItemForm.get('fields') as FormArray;
|
|
189
|
-
MatrixFieldItemForm.push(
|
|
190
|
-
this.fb.group({
|
|
191
|
-
/**字段名称 Display name of this field */
|
|
192
|
-
displayName: [input.displayName, [Validators.required]],
|
|
193
|
-
/**字段唯一名称 Unique Name*/
|
|
194
|
-
name: [input.name, [Validators.required]],
|
|
195
|
-
/**描述 说明 */
|
|
196
|
-
description: [input.description, []],
|
|
197
|
-
/**FieldType字段类型 表单控件名称 */
|
|
198
|
-
formControlName: [input.formControlName || 'TextEdit', [Validators.required]],
|
|
199
|
-
//动态表单配置
|
|
200
|
-
formConfiguration: new FormGroup({}),
|
|
201
|
-
})
|
|
202
|
-
);
|
|
203
|
-
//
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**删除矩阵字段项 */
|
|
207
|
-
deleteMatrixField(MatrixFieldForm, index) {
|
|
208
|
-
MatrixFieldForm.removeAt(index);
|
|
209
|
-
this.selectMatrixFieldIndex = 0;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**矩阵字段-选择 */
|
|
213
|
-
selectMatrixFieldChange(MatrixBlockIndex, MatrixFieldIndex) {
|
|
214
|
-
this.selectMatrixFieldIndex = MatrixFieldIndex;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
get nameInput() {
|
|
218
|
-
return this.matrixModalForm?.get('name');
|
|
219
|
-
}
|
|
220
|
-
get FieldnameInput() {
|
|
221
|
-
let MatrixBlockTypesItemForm = this.MatrixBlockTypes.at(
|
|
222
|
-
this.selectMatrixBlockIndex
|
|
223
|
-
) as FormGroup;
|
|
224
|
-
let MatrixFieldItemForm = MatrixBlockTypesItemForm.get('fields') as FormArray;
|
|
225
|
-
return MatrixFieldItemForm.at(this.selectMatrixFieldIndex).get('name');
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**矩阵displayNameInput字段失去焦点 */
|
|
229
|
-
displayNameInputBlur(event) {
|
|
230
|
-
let value = event.target.value;
|
|
231
|
-
let pinyin = this._CmsApiService.chineseToPinyin(value);
|
|
232
|
-
let nameInput = this.nameInput;
|
|
233
|
-
if (nameInput.value) return;
|
|
234
|
-
nameInput.patchValue(pinyin);
|
|
235
|
-
}
|
|
236
|
-
/**矩阵displayNameInput字段失去焦点 */
|
|
237
|
-
MatrixFieldDisplayNameInputBlur(event) {
|
|
238
|
-
let value = event.target.value;
|
|
239
|
-
let pinyin = this._CmsApiService.chineseToPinyin(value);
|
|
240
|
-
let FieldnameInput = this.FieldnameInput;
|
|
241
|
-
if (FieldnameInput.value) return;
|
|
242
|
-
FieldnameInput.patchValue(pinyin);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { FormArray, FormControl, FormGroup, Validators } from "@angular/forms";
|
|
2
|
-
|
|
3
|
-
export class MatrixConfig {
|
|
4
|
-
// 矩阵类型
|
|
5
|
-
'MatrixBlockTypes': any = new FormArray([])
|
|
6
|
-
|
|
7
|
-
constructor(data?: MatrixConfig) {
|
|
8
|
-
if (data) {
|
|
9
|
-
for (const key in data) {
|
|
10
|
-
if (data.hasOwnProperty(key)) {
|
|
11
|
-
this[key] = data[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export class MatrixItemConfig {
|
|
18
|
-
|
|
19
|
-
displayName: any = ['', [Validators.required]];
|
|
20
|
-
/**字段名字 */
|
|
21
|
-
name: any = ['', [Validators.required]];
|
|
22
|
-
|
|
23
|
-
constructor(data?: MatrixConfig) {
|
|
24
|
-
if (data) {
|
|
25
|
-
for (const key in data) {
|
|
26
|
-
if (data.hasOwnProperty(key)) {
|
|
27
|
-
this[key] = data[key];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export class matrixFieldInputBase {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/**字段名称 Display name of this field */
|
|
42
|
-
displayName: any = ['', [Validators.required]];
|
|
43
|
-
/**字段唯一名称 Unique Name*/
|
|
44
|
-
name: any = ['', [Validators.required]];
|
|
45
|
-
/**描述 说明 */
|
|
46
|
-
description: any = ['', []];
|
|
47
|
-
/**FieldType字段类型 表单控件名称 */
|
|
48
|
-
formControlName: any = ['TextEdit', [Validators.required]];
|
|
49
|
-
/**动态表单配置 */
|
|
50
|
-
formConfiguration: FormGroup | undefined = new FormGroup({})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
constructor(data?: matrixFieldInputBase) {
|
|
54
|
-
if (data) {
|
|
55
|
-
for (const key in data) {
|
|
56
|
-
if (data.hasOwnProperty(key)) {
|
|
57
|
-
this[key] = data[key];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}
|