@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,394 +0,0 @@
|
|
|
1
|
-
import { EXTENSIONS_IDENTIFIER } from '@abp/ng.components/extensible';
|
|
2
|
-
import {
|
|
3
|
-
ListService,
|
|
4
|
-
LIST_QUERY_DEBOUNCE_TIME,
|
|
5
|
-
ConfigStateService,
|
|
6
|
-
LocalizationService,
|
|
7
|
-
PagedResultDto,
|
|
8
|
-
ABP,
|
|
9
|
-
} from '@abp/ng.core';
|
|
10
|
-
import { ToasterService, ConfirmationService, Confirmation } from '@abp/ng.theme.shared';
|
|
11
|
-
import { ChangeDetectorRef, Component, OnInit, inject } from '@angular/core';
|
|
12
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
13
|
-
import { Router } from '@angular/router';
|
|
14
|
-
import { ColumnMode } from '@swimlane/ngx-datatable';
|
|
15
|
-
import { finalize } from 'rxjs';
|
|
16
|
-
import { ECmsComponent } from '../../../enums';
|
|
17
|
-
import { UpdateListService } from '@dignite-ng/expand.core';
|
|
18
|
-
import {
|
|
19
|
-
EntryAdminService,
|
|
20
|
-
EntryDto,
|
|
21
|
-
GetEntriesInput,
|
|
22
|
-
} from '../../../proxy/dignite/cms/admin/entries';
|
|
23
|
-
import { SectionAdminService } from '../../../proxy/dignite/cms/admin/sections';
|
|
24
|
-
import { entryStatusOptions } from '../../../proxy/dignite/cms/entries';
|
|
25
|
-
import { RegionalizationService } from '../../../proxy/dignite/abp/regionalization-management';
|
|
26
|
-
import { SectionType } from '../../../proxy/dignite/cms/sections';
|
|
27
|
-
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
28
|
-
import { FormAdminService } from '../../../proxy/dignite/cms/admin/dynamic-forms';
|
|
29
|
-
import { FieldAdminService } from '../../../proxy/dignite/cms/admin/fields';
|
|
30
|
-
declare var $: any;
|
|
31
|
-
|
|
32
|
-
@Component({
|
|
33
|
-
selector: 'cms-entries',
|
|
34
|
-
templateUrl: './entries.component.html',
|
|
35
|
-
styleUrls: ['./entries.component.scss'],
|
|
36
|
-
providers: [
|
|
37
|
-
ListService,
|
|
38
|
-
// Provide this token if you want a different debounce time.
|
|
39
|
-
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
40
|
-
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
|
|
41
|
-
{
|
|
42
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
43
|
-
useValue: ECmsComponent.Entries,
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
})
|
|
47
|
-
export class EntriesComponent implements OnInit {
|
|
48
|
-
constructor(
|
|
49
|
-
private _EntryAdminService: EntryAdminService,
|
|
50
|
-
private _SectionAdminService: SectionAdminService,
|
|
51
|
-
private toaster: ToasterService,
|
|
52
|
-
private confirmation: ConfirmationService,
|
|
53
|
-
private configState: ConfigStateService,
|
|
54
|
-
private router: Router,
|
|
55
|
-
private _LocalizationService: LocalizationService,
|
|
56
|
-
private _FormAdminService: FormAdminService,
|
|
57
|
-
private _FieldAdminService: FieldAdminService,
|
|
58
|
-
private cdRef: ChangeDetectorRef
|
|
59
|
-
) {}
|
|
60
|
-
|
|
61
|
-
private fb = inject(FormBuilder);
|
|
62
|
-
private _UpdateListService = inject(UpdateListService);
|
|
63
|
-
public readonly list = inject(ListService<GetEntriesInput>);
|
|
64
|
-
|
|
65
|
-
/**板块类型 */
|
|
66
|
-
SectionType = SectionType;
|
|
67
|
-
|
|
68
|
-
ngOnInit(): void {
|
|
69
|
-
this.getPageDate();
|
|
70
|
-
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
71
|
-
this.list.get();
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**站点下的版块 */
|
|
76
|
-
SiteOfSectionList: any[any] = [];
|
|
77
|
-
|
|
78
|
-
/**版块下的语言列表 */
|
|
79
|
-
sectionLanguagesList: any[any] = [];
|
|
80
|
-
/**版块下的条目类型列表 */
|
|
81
|
-
entryTypeList: any[any] = [];
|
|
82
|
-
/**状态编码 */
|
|
83
|
-
_entryStatusOptions = entryStatusOptions;
|
|
84
|
-
|
|
85
|
-
/**获取页面数据 */
|
|
86
|
-
async getPageDate() {
|
|
87
|
-
await this.getDynamicFormType();
|
|
88
|
-
await this.getSiteOfSectionList();
|
|
89
|
-
await this.getSectionLanguagesList();
|
|
90
|
-
this.hookToQuery();
|
|
91
|
-
}
|
|
92
|
-
/**需要查询的动态表单类型 */
|
|
93
|
-
enableSearchTypeList: any[] = [];
|
|
94
|
-
/**需要查询的动态表单字段 */
|
|
95
|
-
enableSearchFieldList: any[] = [];
|
|
96
|
-
/**不需要展示的动态表单类型 */
|
|
97
|
-
disableshowinTypeList: any[] = ['Table', 'FileExplorer', 'Matrix'];
|
|
98
|
-
/**需要展示的动态列表字段 */
|
|
99
|
-
showinFieldList: any[] = [];
|
|
100
|
-
/**获取动态表单类型 */
|
|
101
|
-
getDynamicFormType() {
|
|
102
|
-
return new Promise((resolve, rejects) => {
|
|
103
|
-
this._FormAdminService.getFormControls().subscribe((res:any) => {
|
|
104
|
-
// this.dynamicFormTypeList = res.items;
|
|
105
|
-
this.enableSearchTypeList = res.items.filter(el => el.enableSearch).map(el => el.name);
|
|
106
|
-
console.log(this.enableSearchTypeList, 'enableSearchList');
|
|
107
|
-
resolve(res.items);
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**切换板块 */
|
|
113
|
-
async sectionIdChange() {
|
|
114
|
-
this.getSectionOfEntryType();
|
|
115
|
-
await this.getSectionLanguagesList();
|
|
116
|
-
this.resetData();
|
|
117
|
-
}
|
|
118
|
-
/**切换语言 */
|
|
119
|
-
async cultureChange() {
|
|
120
|
-
this.resetData();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**获取站点下的版块 */
|
|
124
|
-
getSiteOfSectionList() {
|
|
125
|
-
return new Promise((resolve, rejects) => {
|
|
126
|
-
this._SectionAdminService
|
|
127
|
-
.getList({
|
|
128
|
-
maxResultCount: 1000,
|
|
129
|
-
})
|
|
130
|
-
.subscribe(async (res:any) => {
|
|
131
|
-
this.SiteOfSectionList = res.items;
|
|
132
|
-
this.filters.sectionId = res.items[0]?.id || '';
|
|
133
|
-
await this.getSectionOfEntryType();
|
|
134
|
-
resolve(res.items);
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
/**表单 */
|
|
139
|
-
enablegearchFormEntity: FormGroup | undefined = this.fb.group({
|
|
140
|
-
extraProperties: this.fb.group({}),
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
get extraPropertiesInput() {
|
|
144
|
-
return this.enablegearchFormEntity?.get('extraProperties') as FormGroup;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**设置筛选条件 */
|
|
148
|
-
setfiltersValue() {
|
|
149
|
-
return new Promise((resolve, rejects) => {
|
|
150
|
-
let extraProperties = this.extraPropertiesInput.value;
|
|
151
|
-
let inputs:any[] = [];
|
|
152
|
-
for (const key in extraProperties) {
|
|
153
|
-
const element = extraProperties[key];
|
|
154
|
-
if ( Array.isArray(element)?element.length>0?element:null:element) {
|
|
155
|
-
inputs.push({
|
|
156
|
-
name:key,
|
|
157
|
-
value: Array.isArray(element)?element.join(','):element
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
this.filters.queryingByFieldsJson =inputs.length>0? JSON.stringify(inputs):'';
|
|
162
|
-
resolve(true);
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
async listget() {
|
|
167
|
-
await this.setfiltersValue();
|
|
168
|
-
this.list.get();
|
|
169
|
-
// this.filters.
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**站点下板块的类型 */
|
|
173
|
-
SiteOfSectionType: any = SectionType.Single;
|
|
174
|
-
|
|
175
|
-
/**获取版块下的条目类型 */
|
|
176
|
-
async getSectionOfEntryType() {
|
|
177
|
-
// let sectionId = this.filtersForm.get('sectionId').value;
|
|
178
|
-
let sectionId = this.filters.sectionId;
|
|
179
|
-
let SectionInfo:any= await this.getSectionInfo(sectionId);
|
|
180
|
-
let _entryTypeList = SectionInfo?.entryTypes || [];
|
|
181
|
-
console.log(_entryTypeList,'_entryTypeList');
|
|
182
|
-
|
|
183
|
-
// let _entryTypeList = this.SiteOfSectionList.find(el => el.id == sectionId)?.entryTypes || [];
|
|
184
|
-
this.entryTypeList = _entryTypeList;
|
|
185
|
-
//选择板块的类型SectionType
|
|
186
|
-
this.SiteOfSectionType = this.SiteOfSectionList.find(el => el.id == sectionId)?.type;
|
|
187
|
-
if (this.SiteOfSectionType == SectionType.Structure) {
|
|
188
|
-
this.maxResultCount = 1000;
|
|
189
|
-
} else {
|
|
190
|
-
this.maxResultCount = 10;
|
|
191
|
-
}
|
|
192
|
-
console.log(_entryTypeList, 'entryTypeList');
|
|
193
|
-
|
|
194
|
-
if (_entryTypeList.length === 1) {
|
|
195
|
-
this.filters.entryTypeId = this.entryTypeList[0].id;
|
|
196
|
-
// 初始化数组
|
|
197
|
-
this.enableSearchFieldList = [];
|
|
198
|
-
this.showinFieldList = [];
|
|
199
|
-
// 使用for...of替代forEach来处理异步
|
|
200
|
-
for (const el of _entryTypeList) {
|
|
201
|
-
for (const el1 of el.fieldTabs) {
|
|
202
|
-
for (const el2 of el1.fields) {
|
|
203
|
-
// el2.field = await this.getDynamicFormEntity(el2.fieldId);
|
|
204
|
-
if (el2.enableSearch && this.enableSearchTypeList.includes(el2.field.formControlName)) {
|
|
205
|
-
this.enableSearchFieldList.push({
|
|
206
|
-
...el2,
|
|
207
|
-
field: {
|
|
208
|
-
formControlName: el2.field.formControlName,
|
|
209
|
-
formConfiguration: el2.field.formConfiguration,
|
|
210
|
-
name: el2.field.name,
|
|
211
|
-
},
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
if (el2.showInList && !this.disableshowinTypeList.includes(el2.field.formControlName)) {
|
|
215
|
-
this.showinFieldList.push(el2);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
async abpInitss(){
|
|
224
|
-
await this.setfiltersValue();
|
|
225
|
-
}
|
|
226
|
-
/**获取板块详情 */
|
|
227
|
-
getSectionInfo(ids) {
|
|
228
|
-
return new Promise((resolve, rejects) => {
|
|
229
|
-
this._SectionAdminService.get(ids).subscribe(res => {
|
|
230
|
-
resolve(res);
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
/**获取字段详情 */
|
|
235
|
-
getDynamicFormEntity(fieldId: string) {
|
|
236
|
-
return new Promise((resolve, rejects) => {
|
|
237
|
-
this._FieldAdminService.get(fieldId).subscribe(res => {
|
|
238
|
-
resolve(res);
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
private config = inject(ConfigStateService);
|
|
244
|
-
private _RegionalizationService = inject(RegionalizationService);
|
|
245
|
-
/**获取版块下的语言列表 */
|
|
246
|
-
getSectionLanguagesList() {
|
|
247
|
-
return new Promise(async (resolve, rejects) => {
|
|
248
|
-
//获取所有语言 */
|
|
249
|
-
let languagesSystem = this.configState.getDeep('localization.languages');
|
|
250
|
-
//获取系统默认语言 */
|
|
251
|
-
let DefaultLanguage = this.config.getSetting('Abp.Regionalization.DefaultCultureName');
|
|
252
|
-
|
|
253
|
-
const configCmsSiteLanguages = this.config.getSetting('Cms.Site.Languages');
|
|
254
|
-
if (!configCmsSiteLanguages) {
|
|
255
|
-
await this.getSiteSettingsLanguages();
|
|
256
|
-
}
|
|
257
|
-
const LanguagesSite =
|
|
258
|
-
(configCmsSiteLanguages ? configCmsSiteLanguages.split(',') : '') ||
|
|
259
|
-
this.SiteSettingsAdminLanguages;
|
|
260
|
-
let LanguagesArray = languagesSystem.filter(el => LanguagesSite.includes(el.cultureName));
|
|
261
|
-
//获取当前选择的语言
|
|
262
|
-
let nowculture = this.filters.culture;
|
|
263
|
-
// let nowculture = this.filtersForm.get('culture').value;
|
|
264
|
-
//当前选择的语言,是否在版块的的语言列表中
|
|
265
|
-
let isexist = LanguagesArray.find(el => el.cultureName == nowculture);
|
|
266
|
-
this.filters.culture = nowculture
|
|
267
|
-
? isexist
|
|
268
|
-
? nowculture
|
|
269
|
-
: DefaultLanguage
|
|
270
|
-
: DefaultLanguage;
|
|
271
|
-
this.sectionLanguagesList = LanguagesArray;
|
|
272
|
-
resolve(LanguagesArray);
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**站点设置语言 */
|
|
277
|
-
SiteSettingsAdminLanguages: any[] = [];
|
|
278
|
-
/**
|
|
279
|
-
* 获取站点设置语言
|
|
280
|
-
*/
|
|
281
|
-
getSiteSettingsLanguages() {
|
|
282
|
-
return new Promise((resolve, rejects) => {
|
|
283
|
-
this._RegionalizationService.get().subscribe(res => {
|
|
284
|
-
this.SiteSettingsAdminLanguages = res.availableCultureNames;
|
|
285
|
-
resolve(res);
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
resetData() {
|
|
291
|
-
this.filters = {
|
|
292
|
-
sectionId: this.filters.sectionId,
|
|
293
|
-
culture: this.filters.culture,
|
|
294
|
-
} as GetEntriesInput;
|
|
295
|
-
this.list.filter = '';
|
|
296
|
-
this.list.maxResultCount = this.maxResultCount;
|
|
297
|
-
this.list.page = 0;
|
|
298
|
-
this.data.items = [];
|
|
299
|
-
this.list.get();
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**新增-单个 */
|
|
303
|
-
createEntriesBtn() {
|
|
304
|
-
this.router.navigate(['/cms/admin/entries/create'], {
|
|
305
|
-
queryParams: {
|
|
306
|
-
cultureName: this.filters.culture,
|
|
307
|
-
sectionId: this.filters.sectionId,
|
|
308
|
-
entryTypeId: this.entryTypeList[0].id,
|
|
309
|
-
},
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
createCopyEntriesBtn() {
|
|
313
|
-
this.router.navigate(['/cms/admin/entries/create-copy'], {
|
|
314
|
-
queryParams: {
|
|
315
|
-
cultureName: this.filters.culture,
|
|
316
|
-
sectionId: this.filters.sectionId,
|
|
317
|
-
entryTypeId: this.entryTypeList[0].id,
|
|
318
|
-
},
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/**列表相关 */
|
|
323
|
-
ColumnMode = ColumnMode;
|
|
324
|
-
data: PagedResultDto<EntryDto>|any = {
|
|
325
|
-
items: [],
|
|
326
|
-
totalCount: 0,
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
filters = {} as GetEntriesInput;
|
|
330
|
-
|
|
331
|
-
maxResultCount = 10;
|
|
332
|
-
|
|
333
|
-
hookToQuery() {
|
|
334
|
-
const getData = (query: ABP.PageQueryParams) =>
|
|
335
|
-
this._EntryAdminService.getList({
|
|
336
|
-
...query,
|
|
337
|
-
...this.filters,
|
|
338
|
-
maxResultCount: this.maxResultCount,
|
|
339
|
-
});
|
|
340
|
-
const setData = (list: PagedResultDto<EntryDto>|any) => {
|
|
341
|
-
if (this.SiteOfSectionType == SectionType.Structure) {
|
|
342
|
-
list.items = list.items.sort((a, b) => {
|
|
343
|
-
return a.order - b.order;
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
this.data = list;
|
|
347
|
-
};
|
|
348
|
-
this.list.hookToQuery(getData).subscribe(setData);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/**删除条目 */
|
|
352
|
-
deletefield(row: any) {
|
|
353
|
-
this.confirmation
|
|
354
|
-
.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`))
|
|
355
|
-
.subscribe((status: Confirmation.Status) => {
|
|
356
|
-
if (status == 'confirm') {
|
|
357
|
-
this._EntryAdminService
|
|
358
|
-
.delete(row.id)
|
|
359
|
-
.pipe(finalize(() => {}))
|
|
360
|
-
.subscribe(res => {
|
|
361
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::DeletedSuccessfully`));
|
|
362
|
-
this.list.get();
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
drop(event: any) {
|
|
369
|
-
let previousId:any = this.data.items[event.previousIndex].id;
|
|
370
|
-
moveItemInArray(this.data.items, event.previousIndex, event.currentIndex);
|
|
371
|
-
this._EntryAdminService
|
|
372
|
-
.move(previousId, {
|
|
373
|
-
order: event.currentIndex,
|
|
374
|
-
})
|
|
375
|
-
.pipe(
|
|
376
|
-
finalize(() => {
|
|
377
|
-
this.list.get();
|
|
378
|
-
})
|
|
379
|
-
)
|
|
380
|
-
.subscribe(
|
|
381
|
-
res => {},
|
|
382
|
-
err => {}
|
|
383
|
-
);
|
|
384
|
-
// moveItemInArray(this.rows, event.previousIndex, event.currentIndex);
|
|
385
|
-
// this.rows = [...this.rows];
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
isexpanded: boolean = false;
|
|
389
|
-
/**高级筛选切换 */
|
|
390
|
-
expandedChange(event) {
|
|
391
|
-
console.log(event, 'event');
|
|
392
|
-
this.isexpanded = event;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<form [formGroup]="newEntity" (keydown.enter)="$event.preventDefault()" [class]="{'was-validated':formValidation}" (submit)="save()">
|
|
2
|
-
<abp-page [title]="'Cms::CreateField' | abpLocalization" [toolbar]="true">
|
|
3
|
-
<div class="create-field-page">
|
|
4
|
-
<button form-type="submit" style="display: none;" #submitclick></button>
|
|
5
|
-
<div class="card">
|
|
6
|
-
<div class="card-body">
|
|
7
|
-
<cms-create-or-edit-field [Entity]="newEntity"></cms-create-or-edit-field>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</abp-page>
|
|
12
|
-
</form>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
::ng-deep .create-field-page{.dignite_page{height:calc(100vh - 32px - 53px - 40px);overflow:auto}.form-control,.form-select{padding:.475rem 1.25rem}}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { CreateFieldComponent } from './create-field.component';
|
|
4
|
-
|
|
5
|
-
describe('CreateFieldComponent', () => {
|
|
6
|
-
let component: CreateFieldComponent;
|
|
7
|
-
let fixture: ComponentFixture<CreateFieldComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [CreateFieldComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(CreateFieldComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,85 +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, inject, ViewChild, ElementRef } from '@angular/core';
|
|
6
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
7
|
-
import { CmsApiService } from '../../../services';
|
|
8
|
-
import { ECmsComponent } from '../../../enums';
|
|
9
|
-
import { UpdateListService } from '@dignite-ng/expand.core';
|
|
10
|
-
import { CreateOrUpdateFieldInputBase } from './create-or-update-field-input-base';
|
|
11
|
-
import { ValidatorsService } from '@dignite-ng/expand.core';
|
|
12
|
-
import { finalize } from 'rxjs';
|
|
13
|
-
import { FieldAdminService } from '../../../proxy/dignite/cms/admin/fields';
|
|
14
|
-
|
|
15
|
-
@Component({
|
|
16
|
-
selector: 'cms-create-field',
|
|
17
|
-
templateUrl: './create-field.component.html',
|
|
18
|
-
styleUrls: ['./create-field.component.scss'],
|
|
19
|
-
providers: [
|
|
20
|
-
{
|
|
21
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
22
|
-
useValue: ECmsComponent.FieldsCreate,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
})
|
|
26
|
-
export class CreateFieldComponent {
|
|
27
|
-
constructor(
|
|
28
|
-
private fb: FormBuilder,
|
|
29
|
-
public _FieldAdminService: FieldAdminService,
|
|
30
|
-
private toaster: ToasterService,
|
|
31
|
-
public _location: Location,
|
|
32
|
-
public _LocalizationService: LocalizationService,
|
|
33
|
-
public _CmsApiService: CmsApiService
|
|
34
|
-
) {}
|
|
35
|
-
private _UpdateListService = inject(UpdateListService);
|
|
36
|
-
|
|
37
|
-
/**表单实体 */
|
|
38
|
-
newEntity: FormGroup | undefined;
|
|
39
|
-
|
|
40
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
41
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
42
|
-
|
|
43
|
-
ngOnInit(): void {
|
|
44
|
-
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
45
|
-
//Add 'implements OnInit' to the class.
|
|
46
|
-
this.newEntity = this.fb.group(new CreateOrUpdateFieldInputBase());
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**触发提交按钮 */
|
|
50
|
-
submitclickBtn() {
|
|
51
|
-
this.submitclick.nativeElement.click();
|
|
52
|
-
}
|
|
53
|
-
isSubmit: boolean = false;
|
|
54
|
-
|
|
55
|
-
private _ValidatorsService = inject(ValidatorsService);
|
|
56
|
-
/**表单验证状态
|
|
57
|
-
* {
|
|
58
|
-
* title:true,
|
|
59
|
-
* }
|
|
60
|
-
*/
|
|
61
|
-
formValidation: any = '';
|
|
62
|
-
|
|
63
|
-
/**保存表单 */
|
|
64
|
-
save() {
|
|
65
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.newEntity);
|
|
66
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms')) return;
|
|
67
|
-
let input = this.newEntity.value;
|
|
68
|
-
if (this.isSubmit) return;
|
|
69
|
-
this.isSubmit = true;
|
|
70
|
-
if (!this.newEntity.valid) return;
|
|
71
|
-
this._FieldAdminService
|
|
72
|
-
.create(input)
|
|
73
|
-
.pipe(
|
|
74
|
-
finalize(() => {
|
|
75
|
-
this.isSubmit = false;
|
|
76
|
-
})
|
|
77
|
-
)
|
|
78
|
-
.subscribe(res => {
|
|
79
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
80
|
-
this._location.back();
|
|
81
|
-
this._UpdateListService.updateList();
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<form [formGroup]="_Entity">
|
|
2
|
-
<button type="submit" style="display: none;" #submitclick></button>
|
|
3
|
-
<div class="mb-3">
|
|
4
|
-
<label class="form-label" for="groupId">{{'Cms::FieldGroup' | abpLocalization}}</label>
|
|
5
|
-
<select class="form-select" formControlName="groupId">
|
|
6
|
-
<option value="">{{'Cms::OptionalGrouping' | abpLocalization}}</option>
|
|
7
|
-
<ng-container *ngFor="let item of _FieldAbstractsService.fieldGroupList">
|
|
8
|
-
<option [value]="item.id">{{item.name}}</option>
|
|
9
|
-
</ng-container>
|
|
10
|
-
</select>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="mb-3">
|
|
13
|
-
<label class="form-label" for="displayName">{{'DigniteAbpForms::FieldDisplayName' | abpLocalization}}</label>
|
|
14
|
-
<input type="text" class="form-control" formControlName="displayName" required (blur)="disPlayNameInputBlur($event)">
|
|
15
|
-
</div>
|
|
16
|
-
<div class="mb-3">
|
|
17
|
-
<label class="form-label" for="name">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>
|
|
18
|
-
<input type="text" class="form-control" formControlName="name" (input)="nameInputBlur($event)">
|
|
19
|
-
<div class="text-danger invalid-feedback" *ngIf="nameInput.errors?.repetition">
|
|
20
|
-
{{nameInput.errors?.repetition}}
|
|
21
|
-
</div>
|
|
22
|
-
<small class="form-text text-muted d-block ">{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</small>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="mb-3">
|
|
25
|
-
<label class="form-label" for="description">{{'Cms::Description' | abpLocalization}}</label>
|
|
26
|
-
<input type="text" class="form-control" formControlName="description">
|
|
27
|
-
</div>
|
|
28
|
-
<div class="mb-3">
|
|
29
|
-
<label class="form-label" for="formControlName">{{'Cms::FieldType' | abpLocalization}}</label>
|
|
30
|
-
<select class="form-select" formControlName="formControlName" (change)="formControlNameChange($event)">
|
|
31
|
-
<ng-container *ngFor="let item of _FieldAbstractsService.fromControlList;let i =index">
|
|
32
|
-
<option [value]="item.name">{{item.displayName|abpLocalization}}</option>
|
|
33
|
-
</ng-container>
|
|
34
|
-
</select>
|
|
35
|
-
</div>
|
|
36
|
-
<ng-container *ngIf="_Entity.value.formControlName&&_Entity">
|
|
37
|
-
<df-dynamic [type]="_Entity.value.formControlName" [selected]="_selected" [entity]="_Entity" ></df-dynamic>
|
|
38
|
-
</ng-container>
|
|
39
|
-
</form>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { CreateOrEditFieldComponent } from './create-or-edit-field.component';
|
|
4
|
-
|
|
5
|
-
describe('CreateOrEditFieldComponent', () => {
|
|
6
|
-
let component: CreateOrEditFieldComponent;
|
|
7
|
-
let fixture: ComponentFixture<CreateOrEditFieldComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [CreateOrEditFieldComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(CreateOrEditFieldComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|