@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,140 +0,0 @@
|
|
|
1
|
-
import { Component, ElementRef, Input, ViewChild, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { FieldAbstractsService } from '../../../services/field-abstracts.service';
|
|
3
|
-
import {
|
|
4
|
-
AbstractControl,
|
|
5
|
-
FormControl,
|
|
6
|
-
FormGroup,
|
|
7
|
-
ValidationErrors,
|
|
8
|
-
Validators,
|
|
9
|
-
} from '@angular/forms';
|
|
10
|
-
import { CmsApiService } from '../../../services/cms-api.service';
|
|
11
|
-
import { Observable } from 'rxjs';
|
|
12
|
-
import { LocalizationService } from '@abp/ng.core';
|
|
13
|
-
import { FieldAdminService } from '../../../proxy/dignite/cms/admin/fields';
|
|
14
|
-
@Component({
|
|
15
|
-
selector: 'cms-create-or-edit-field',
|
|
16
|
-
templateUrl: './create-or-edit-field.component.html',
|
|
17
|
-
styleUrls: ['./create-or-edit-field.component.scss'],
|
|
18
|
-
})
|
|
19
|
-
export class CreateOrEditFieldComponent {
|
|
20
|
-
/**表单控件模板-动态表单配置组件 */
|
|
21
|
-
// @ViewChild('FormDynamicRef', { read: ViewContainerRef, static: true })
|
|
22
|
-
// FormDynamicRef: ViewContainerRef;
|
|
23
|
-
|
|
24
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
25
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
26
|
-
|
|
27
|
-
constructor(
|
|
28
|
-
public _FieldAbstractsService: FieldAbstractsService,
|
|
29
|
-
private _CmsApiService: CmsApiService,
|
|
30
|
-
private _FieldAdminService: FieldAdminService,
|
|
31
|
-
private _LocalizationService: LocalizationService
|
|
32
|
-
) {
|
|
33
|
-
if (this._FieldAbstractsService.fieldGroupList.length == 0) {
|
|
34
|
-
this._FieldAbstractsService.getfieldGroupList();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/**表单实体 */
|
|
38
|
-
_Entity: FormGroup | undefined;
|
|
39
|
-
@Input()
|
|
40
|
-
public set Entity(v: FormGroup | undefined) {
|
|
41
|
-
if (v) {
|
|
42
|
-
this._Entity = v;
|
|
43
|
-
this.dataLoaded();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
get formControlName() {
|
|
47
|
-
return this._Entity.get('formControlName');
|
|
48
|
-
}
|
|
49
|
-
/**选择的表单信息 */
|
|
50
|
-
_selected_copy: any;
|
|
51
|
-
_selected: any;
|
|
52
|
-
@Input()
|
|
53
|
-
public set selected(v: any) {
|
|
54
|
-
if (v) {
|
|
55
|
-
|
|
56
|
-
// let MatrixBlockTypes=v.formConfiguration?.MatrixBlockTypes
|
|
57
|
-
// if(MatrixBlockTypes){
|
|
58
|
-
// v.formConfiguration.MatrixBlockTypes=this.convertKeysToCamelCase(MatrixBlockTypes);
|
|
59
|
-
// }
|
|
60
|
-
this._selected = v || '';
|
|
61
|
-
this._selected_copy = v;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
async dataLoaded() {
|
|
69
|
-
if (this._FieldAbstractsService.fromControlList.length == 0) {
|
|
70
|
-
await this._FieldAbstractsService.getFromControlList();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (this._Entity) {
|
|
74
|
-
if (!this.formControlName.value) {
|
|
75
|
-
this._Entity.patchValue({
|
|
76
|
-
formControlName: this._FieldAbstractsService.fromControlList[0]?.name,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
this._Entity.setControl(
|
|
80
|
-
'name',
|
|
81
|
-
new FormControl(this.nameInput.value || '', {
|
|
82
|
-
validators: Validators.required,
|
|
83
|
-
asyncValidators: [this.repetitionAsyncValidator()],
|
|
84
|
-
updateOn: 'change',
|
|
85
|
-
})
|
|
86
|
-
);
|
|
87
|
-
setTimeout(() => {
|
|
88
|
-
this.submitclick.nativeElement.click();
|
|
89
|
-
}, 0);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**name表单控件 */
|
|
94
|
-
get nameInput() {
|
|
95
|
-
return this._Entity.get('name');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
nameInputBlur(event) {
|
|
99
|
-
let value = event.target.value;
|
|
100
|
-
this.nameInput.patchValue(value);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**字段标签input失去标点生成字段名字 */
|
|
104
|
-
disPlayNameInputBlur(event) {
|
|
105
|
-
let value = event.target.value;
|
|
106
|
-
let pinyin = this._CmsApiService.chineseToPinyin(value);
|
|
107
|
-
let nameInput = this.nameInput;
|
|
108
|
-
if (nameInput.value) return;
|
|
109
|
-
nameInput.patchValue(pinyin);
|
|
110
|
-
}
|
|
111
|
-
/**定义异步验证方法 */
|
|
112
|
-
repetitionAsyncValidator() {
|
|
113
|
-
return (
|
|
114
|
-
ctrl: AbstractControl
|
|
115
|
-
): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
|
|
116
|
-
return new Promise(resolve => {
|
|
117
|
-
if (ctrl.value == this._selected?.name || !ctrl.value) {
|
|
118
|
-
resolve(null);
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
this._FieldAdminService.nameExists(ctrl.value).subscribe(res => {
|
|
122
|
-
if (res) {
|
|
123
|
-
resolve({
|
|
124
|
-
repetition: this._LocalizationService.instant(
|
|
125
|
-
`Cms::FieldName{0}AlreadyExist`,
|
|
126
|
-
ctrl.value
|
|
127
|
-
),
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
resolve(null);
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
formControlNameChange(event) {
|
|
138
|
-
console.log('event',event,this._Entity.value.formControlName,this._Entity)
|
|
139
|
-
}
|
|
140
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { FormGroup, Validators } from "@angular/forms";
|
|
2
|
-
|
|
3
|
-
export class CreateOrUpdateFieldInputBase {
|
|
4
|
-
/**分组id */
|
|
5
|
-
groupId: any = ['', []];
|
|
6
|
-
|
|
7
|
-
/**字段名称 Display name of this field */
|
|
8
|
-
displayName: any = ['', [Validators.required]];
|
|
9
|
-
|
|
10
|
-
/**字段唯一名称 Unique Name*/
|
|
11
|
-
name: any = ['', [Validators.required]];
|
|
12
|
-
|
|
13
|
-
/**描述 说明 */
|
|
14
|
-
description: any = ['', []];
|
|
15
|
-
|
|
16
|
-
/**FieldType字段类型 表单控件名称 */
|
|
17
|
-
formControlName: any = [undefined, [Validators.required]];
|
|
18
|
-
|
|
19
|
-
/**动态表单配置 */
|
|
20
|
-
formConfiguration: FormGroup | undefined = new FormGroup({})
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
constructor(data?: CreateOrUpdateFieldInputBase) {
|
|
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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<form class="row g-3 needs-validation" [formGroup]="newEntity" (keydown.enter)="$event.preventDefault()" [class]="{'was-validated':formValidation}" (submit)="save()">
|
|
2
|
-
<abp-page [title]="'Cms::EditField' | abpLocalization" [toolbar]="true">
|
|
3
|
-
<div class="create-field-page">
|
|
4
|
-
<button type="submit" style="display: none;" #submitclick></button>
|
|
5
|
-
<div class="card">
|
|
6
|
-
<div class="card-body">
|
|
7
|
-
<ng-container *ngIf="newEntity&&fieldDetails">
|
|
8
|
-
<cms-create-or-edit-field [selected]="fieldDetails" [Entity]="newEntity"></cms-create-or-edit-field>
|
|
9
|
-
</ng-container>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</abp-page>
|
|
14
|
-
</form>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { EditFieldComponent } from './edit-field.component';
|
|
4
|
-
|
|
5
|
-
describe('EditFieldComponent', () => {
|
|
6
|
-
let component: EditFieldComponent;
|
|
7
|
-
let fixture: ComponentFixture<EditFieldComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [EditFieldComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(EditFieldComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { EXTENSIONS_IDENTIFIER } from '@abp/ng.components/extensible';
|
|
2
|
-
import { LocalizationService } from '@abp/ng.core';
|
|
3
|
-
import { ToasterService } from '@abp/ng.theme.shared';
|
|
4
|
-
import { Location } from '@angular/common';
|
|
5
|
-
import { Component, OnInit, ViewChild, ElementRef, inject } from '@angular/core';
|
|
6
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
7
|
-
import { ActivatedRoute } from '@angular/router';
|
|
8
|
-
import { FieldAbstractsService, CmsApiService } from '../../../services';
|
|
9
|
-
import { ECmsComponent } from '../../../enums';
|
|
10
|
-
import { UpdateListService } from '@dignite-ng/expand.core';
|
|
11
|
-
import { CreateOrUpdateFieldInputBase } from './create-or-update-field-input-base';
|
|
12
|
-
import { ValidatorsService } from '@dignite-ng/expand.core';
|
|
13
|
-
import { finalize } from 'rxjs';
|
|
14
|
-
import { FieldAdminService } from '../../../proxy/dignite/cms/admin/fields';
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'cms-edit-field',
|
|
18
|
-
templateUrl: './edit-field.component.html',
|
|
19
|
-
styleUrls: ['./edit-field.component.scss'],
|
|
20
|
-
providers: [
|
|
21
|
-
{
|
|
22
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
23
|
-
useValue: ECmsComponent.FieldsEdit,
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
})
|
|
27
|
-
export class EditFieldComponent implements OnInit {
|
|
28
|
-
constructor(
|
|
29
|
-
private fb: FormBuilder,
|
|
30
|
-
public _FieldAbstractsService: FieldAbstractsService,
|
|
31
|
-
public _FieldAdminService: FieldAdminService,
|
|
32
|
-
private route: ActivatedRoute,
|
|
33
|
-
private toaster: ToasterService,
|
|
34
|
-
public _location: Location,
|
|
35
|
-
public _LocalizationService: LocalizationService,
|
|
36
|
-
public _CmsApiService: CmsApiService
|
|
37
|
-
) {}
|
|
38
|
-
private _UpdateListService = inject(UpdateListService);
|
|
39
|
-
private _ValidatorsService = inject(ValidatorsService);
|
|
40
|
-
/**表单实体 */
|
|
41
|
-
newEntity: FormGroup | undefined;
|
|
42
|
-
|
|
43
|
-
/**字段id */
|
|
44
|
-
fieldId: string = '';
|
|
45
|
-
|
|
46
|
-
/**字段详情 */
|
|
47
|
-
fieldDetails: any;
|
|
48
|
-
|
|
49
|
-
isSubmit: boolean = false;
|
|
50
|
-
/**表单验证状态
|
|
51
|
-
* {
|
|
52
|
-
* title:true,
|
|
53
|
-
* }
|
|
54
|
-
*/
|
|
55
|
-
formValidation: any = '';
|
|
56
|
-
|
|
57
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
58
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
59
|
-
|
|
60
|
-
async ngOnInit(): Promise<void> {
|
|
61
|
-
const _fieldId = this.route.snapshot.params.id;
|
|
62
|
-
if (_fieldId) {
|
|
63
|
-
this.fieldId = _fieldId;
|
|
64
|
-
this.newEntity = this.fb.group(new CreateOrUpdateFieldInputBase());
|
|
65
|
-
await Promise.all([this._FieldAbstractsService.getFromControlList(), this.getFieldEdit()]);
|
|
66
|
-
this.newEntity.patchValue({
|
|
67
|
-
...this.fieldDetails,
|
|
68
|
-
formConfiguration: this.fieldDetails.formConfiguration,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**获取字段详情 */
|
|
74
|
-
getFieldEdit() {
|
|
75
|
-
return new Promise((resolve, reject) => {
|
|
76
|
-
this._FieldAdminService.get(this.fieldId).subscribe(res => {
|
|
77
|
-
res.groupId = res.groupId ? res.groupId : '';
|
|
78
|
-
this.fieldDetails = res;
|
|
79
|
-
resolve(res);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/**触发提交按钮 */
|
|
86
|
-
submitclickBtn() {
|
|
87
|
-
this.submitclick.nativeElement.click();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**保存表单 */
|
|
91
|
-
save() {
|
|
92
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.newEntity);
|
|
93
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms')) return;
|
|
94
|
-
if (this.isSubmit) return;
|
|
95
|
-
this.isSubmit = true;
|
|
96
|
-
let input = this.newEntity.value;
|
|
97
|
-
|
|
98
|
-
if (!this.newEntity.valid) return;
|
|
99
|
-
this._FieldAdminService
|
|
100
|
-
.update(this.fieldId, input)
|
|
101
|
-
.pipe(
|
|
102
|
-
finalize(() => {
|
|
103
|
-
this.isSubmit = false;
|
|
104
|
-
})
|
|
105
|
-
)
|
|
106
|
-
.subscribe(res => {
|
|
107
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
108
|
-
this._location.back();
|
|
109
|
-
this._UpdateListService.updateList();
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<div class="card-header px-2 py-sm-2 d-flex justify-content-between align-items-center">
|
|
2
|
-
<h6 class="h6 mb-0">{{'Cms::FieldGroup' | abpLocalization}}</h6>
|
|
3
|
-
<button type="button" class="btn btn-link btn-sm ms-2"><i class="fas fa-plus-circle" aria-hidden="true"
|
|
4
|
-
(click)="createGroupBtn()"></i></button>
|
|
5
|
-
</div>
|
|
6
|
-
<div class="card-body p-0">
|
|
7
|
-
<div class="container-height overflow-auto">
|
|
8
|
-
<ul class="list-group list-group-flush">
|
|
9
|
-
<li class="list-group-item list-group-item-action active" [class.active]="fieldGroupId===''"
|
|
10
|
-
(click)="fieldGroupChange('')">{{'Cms::AllFields' | abpLocalization}}</li>
|
|
11
|
-
<ng-container *ngFor="let item of _FieldAbstractsService.fieldGroupList">
|
|
12
|
-
<li class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
|
|
13
|
-
[class.active]="fieldGroupId===item.id" (click)="fieldGroupChange(item.id)">
|
|
14
|
-
<div>{{item.name}}</div>
|
|
15
|
-
<div *ngIf="fieldGroupId===item.id">
|
|
16
|
-
<i class="fas fa-trash px-1" role="button" (click.stop)="deleteGroupbtn(item)"></i>
|
|
17
|
-
<i class="fas fa-edit px-1" role="button" (click.stop)="editGroupBtn(item.name)"></i>
|
|
18
|
-
</div>
|
|
19
|
-
</li>
|
|
20
|
-
</ng-container>
|
|
21
|
-
</ul>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<abp-modal [(visible)]="createGroupOpen" [busy]="modalBusy" (visibleChange)="createGroupVisibleChange($event)">
|
|
26
|
-
<ng-template #abpHeader>
|
|
27
|
-
<h3>{{'Cms::New' | abpLocalization}}</h3>
|
|
28
|
-
</ng-template>
|
|
29
|
-
<ng-template #abpBody>
|
|
30
|
-
<ng-template #loaderRef>
|
|
31
|
-
<div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
|
|
32
|
-
</ng-template>
|
|
33
|
-
<form *ngIf="createForm; else loaderRef" [formGroup]="createForm" (keydown.enter)="$event.preventDefault()" [class]="{'was-validated':formValidation}" (submit)="createSave()">
|
|
34
|
-
<div class="mb-3">
|
|
35
|
-
<label for="exampleFormControlInput1" class="form-label">{{'Cms::Name' | abpLocalization}}</label>
|
|
36
|
-
<input type="text" class="form-control" id="exampleFormControlInput1" formControlName="name"
|
|
37
|
-
placeholder="">
|
|
38
|
-
</div>
|
|
39
|
-
</form>
|
|
40
|
-
</ng-template>
|
|
41
|
-
|
|
42
|
-
<ng-template #abpFooter>
|
|
43
|
-
<button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
|
|
44
|
-
<abp-button iconClass="fa fa-check" [disabled]="createForm?.invalid" (click)="createSave()">{{'AbpUi::Save' | abpLocalization}}</abp-button>
|
|
45
|
-
</ng-template>
|
|
46
|
-
</abp-modal>
|
|
47
|
-
|
|
48
|
-
<abp-modal [(visible)]="editGroupOpen" [busy]="modalBusy" (visibleChange)="editGroupVisibleChange($event)">
|
|
49
|
-
<ng-template #abpHeader>
|
|
50
|
-
<h3>{{'AbpUi::Edit' | abpLocalization}}</h3>
|
|
51
|
-
</ng-template>
|
|
52
|
-
<ng-template #abpBody>
|
|
53
|
-
<ng-template #loaderRef>
|
|
54
|
-
<div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
|
|
55
|
-
</ng-template>
|
|
56
|
-
<form *ngIf="editGroupForm; else loaderRef" [formGroup]="editGroupForm" (keydown.enter)="$event.preventDefault()" [class]="{'was-validated':formValidation}" (submit)="editSave()">
|
|
57
|
-
<div class="mb-3">
|
|
58
|
-
<label for="exampleFormControlInput1" class="form-label">{{'Cms::Name' | abpLocalization}}</label>
|
|
59
|
-
<input type="text" class="form-control" id="exampleFormControlInput1" formControlName="name"
|
|
60
|
-
placeholder="">
|
|
61
|
-
</div>
|
|
62
|
-
</form>
|
|
63
|
-
</ng-template>
|
|
64
|
-
|
|
65
|
-
<ng-template #abpFooter>
|
|
66
|
-
<button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
|
|
67
|
-
<abp-button iconClass="fa fa-check" [disabled]="editGroupForm?.invalid" (click)="editSave()">{{'AbpUi::Save' | abpLocalization}}</abp-button>
|
|
68
|
-
</ng-template>
|
|
69
|
-
</abp-modal>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { FieldGroupComponent } from './field-group.component';
|
|
4
|
-
|
|
5
|
-
describe('FieldGroupComponent', () => {
|
|
6
|
-
let component: FieldGroupComponent;
|
|
7
|
-
let fixture: ComponentFixture<FieldGroupComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [FieldGroupComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(FieldGroupComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, inject, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
3
|
-
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
|
4
|
-
import { finalize} from 'rxjs/operators';
|
|
5
|
-
import { FieldAbstractsService } from '../../../services/field-abstracts.service';
|
|
6
|
-
import { LocalizationService } from '@abp/ng.core';
|
|
7
|
-
import { ValidatorsService } from '@dignite-ng/expand.core';
|
|
8
|
-
import { FieldGroupAdminService } from '../../../proxy/dignite/cms/admin/fields';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'cms-field-group',
|
|
12
|
-
templateUrl: './field-group.component.html',
|
|
13
|
-
styleUrls: ['./field-group.component.scss']
|
|
14
|
-
})
|
|
15
|
-
export class FieldGroupComponent implements OnInit {
|
|
16
|
-
constructor(
|
|
17
|
-
private fb: FormBuilder,
|
|
18
|
-
private _FieldGroupAdminService: FieldGroupAdminService,
|
|
19
|
-
private toaster: ToasterService,
|
|
20
|
-
private confirmation: ConfirmationService,
|
|
21
|
-
public _FieldAbstractsService: FieldAbstractsService,
|
|
22
|
-
public _LocalizationService: LocalizationService,
|
|
23
|
-
) { }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**创建分组表单 */
|
|
27
|
-
createForm: FormGroup | undefined;
|
|
28
|
-
|
|
29
|
-
/** 编辑分组表单*/
|
|
30
|
-
editGroupForm: FormGroup | undefined;
|
|
31
|
-
|
|
32
|
-
/**表单已存在的值 */
|
|
33
|
-
selected = {} as any;
|
|
34
|
-
|
|
35
|
-
/**选择的字段分组id */
|
|
36
|
-
fieldGroupId: string | undefined = ''
|
|
37
|
-
|
|
38
|
-
/**创建分组模态框状态 */
|
|
39
|
-
createGroupOpen = false
|
|
40
|
-
|
|
41
|
-
/**用于确定模态的繁忙状态是否为真 */
|
|
42
|
-
modalBusy: boolean = false
|
|
43
|
-
|
|
44
|
-
/**编辑分组模态框状态 */
|
|
45
|
-
editGroupOpen: boolean = false
|
|
46
|
-
|
|
47
|
-
/**点击分组回调 */
|
|
48
|
-
@Output() OnGroupClickBack = new EventEmitter();
|
|
49
|
-
|
|
50
|
-
ngOnInit(): void {
|
|
51
|
-
this._FieldAbstractsService.getfieldGroupList()
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**创建字段分组 */
|
|
55
|
-
createGroupBtn() {
|
|
56
|
-
this.createGroupOpen = true;
|
|
57
|
-
this.formValidation='';
|
|
58
|
-
this.createForm = this.fb.group({
|
|
59
|
-
name: ['', [Validators.required]],
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**创建分组模态框状态改变 */
|
|
64
|
-
createGroupVisibleChange(event) {
|
|
65
|
-
if (!event) {
|
|
66
|
-
return
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**编辑字段分组 */
|
|
71
|
-
editGroupBtn(itemName: string) {
|
|
72
|
-
this.editGroupOpen = true;
|
|
73
|
-
this.formValidation='';
|
|
74
|
-
this.editGroupForm = this.fb.group({
|
|
75
|
-
name: [itemName, [Validators.required]],
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**编辑分组模态框状态改变 */
|
|
80
|
-
editGroupVisibleChange(event) {
|
|
81
|
-
if (!event) {
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
private _ValidatorsService = inject(ValidatorsService);
|
|
86
|
-
/**表单验证状态
|
|
87
|
-
* {
|
|
88
|
-
* title:true,
|
|
89
|
-
* }
|
|
90
|
-
*/
|
|
91
|
-
formValidation: any = '';
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/**创建字段分组保存 */
|
|
95
|
-
createSave() {
|
|
96
|
-
let input = this.createForm.value;
|
|
97
|
-
this.modalBusy = true;
|
|
98
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createForm);
|
|
99
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation,'Cms')) return;
|
|
100
|
-
this._FieldGroupAdminService.create(input).pipe(finalize(() => {
|
|
101
|
-
this.modalBusy = false;
|
|
102
|
-
this.createGroupOpen = false;
|
|
103
|
-
this.formValidation='';
|
|
104
|
-
})).subscribe(res => {
|
|
105
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
106
|
-
this._FieldAbstractsService.getfieldGroupList()
|
|
107
|
-
})
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**编辑字段分组保存 */
|
|
111
|
-
editSave() {
|
|
112
|
-
let input = this.editGroupForm.value;
|
|
113
|
-
this.modalBusy = true;
|
|
114
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createForm);
|
|
115
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation,'Cms')) return;
|
|
116
|
-
this._FieldGroupAdminService.update(this.fieldGroupId, input).pipe(finalize(() => {
|
|
117
|
-
this.modalBusy = false;
|
|
118
|
-
this.editGroupOpen = false;
|
|
119
|
-
this.formValidation='';
|
|
120
|
-
})).subscribe(res => {
|
|
121
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
122
|
-
this._FieldAbstractsService.getfieldGroupList()
|
|
123
|
-
})
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**删除字段分组1 */
|
|
127
|
-
deleteGroupbtn(fieldGroupitem: any) {
|
|
128
|
-
this.confirmation.warn(
|
|
129
|
-
fieldGroupitem.name,
|
|
130
|
-
this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`),
|
|
131
|
-
).subscribe((status: Confirmation.Status) => {
|
|
132
|
-
if (status == 'confirm') {
|
|
133
|
-
this._FieldGroupAdminService.delete(this.fieldGroupId).pipe(finalize(() => {
|
|
134
|
-
})).subscribe(res => {
|
|
135
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::DeletedSuccessfully`));
|
|
136
|
-
this.fieldGroupId = ''
|
|
137
|
-
this._FieldAbstractsService.getfieldGroupList()
|
|
138
|
-
})
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**字段分组改变 */
|
|
144
|
-
fieldGroupChange(event) {
|
|
145
|
-
this.fieldGroupId = event
|
|
146
|
-
this.OnGroupClickBack.emit(event)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<abp-page [title]="'Cms::Fields' | abpLocalization" [toolbar]="true">
|
|
2
|
-
<div class="fields-page">
|
|
3
|
-
<div class="row ">
|
|
4
|
-
<div class="col-3">
|
|
5
|
-
<div class="card mb-0" style="height: 100%;">
|
|
6
|
-
<cms-field-group (OnGroupClickBack)="fieldGroupChange($event)"></cms-field-group>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<div class="col-9">
|
|
10
|
-
<div class="card mb-0">
|
|
11
|
-
<div class="card-header px-2 py-sm-2 border-bottom">
|
|
12
|
-
<div class="input-group">
|
|
13
|
-
<input type="text" class="form-control" [(ngModel)]="filters.filter"
|
|
14
|
-
[placeholder]="'AbpUi::Search' | abpLocalization">
|
|
15
|
-
<button class="btn btn-primary px-3" type="button" id="button-addon2"
|
|
16
|
-
(click)="list.get()"><i class="fa fa-search"></i></button>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
<abp-extensible-table [data]="data?.items" [recordsTotal]="data?.totalCount" [list]="list"></abp-extensible-table>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
</abp-page>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
::ng-deep.fields-page{.dignite_page{background:transparent}.list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}.container-height{height:calc(100vh - 200px)}}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { FieldsComponent } from './fields.component';
|
|
4
|
-
|
|
5
|
-
describe('FieldsComponent', () => {
|
|
6
|
-
let component: FieldsComponent;
|
|
7
|
-
let fixture: ComponentFixture<FieldsComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [FieldsComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(FieldsComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|