@dignite-ng/expand.cms 2.0.0-rc.1 → 2.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/ng-package.json +6 -0
- package/config/src/cms-config.module.ts +13 -0
- package/config/{enums/index.d.ts → src/enums/index.ts} +1 -1
- package/config/src/enums/route-names.ts +7 -0
- package/config/{providers/index.d.ts → src/providers/index.ts} +1 -1
- package/config/src/providers/route.provider.ts +68 -0
- package/config/{public-api.d.ts → src/public-api.ts} +3 -3
- package/ng-package.json +10 -0
- package/package.json +7 -22
- package/src/lib/cms-routing.module.ts +102 -0
- package/src/lib/cms.module.ts +113 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.html +137 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.scss +0 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.ts +216 -0
- package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +26 -0
- package/src/lib/components/admin/entries/create.component.html +16 -0
- package/src/lib/components/admin/entries/create.component.scss +0 -0
- package/src/lib/components/admin/entries/create.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/create.component.ts +130 -0
- package/src/lib/components/admin/entries/edit.component.html +9 -0
- package/src/lib/components/admin/entries/edit.component.scss +0 -0
- package/src/lib/components/admin/entries/edit.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/edit.component.ts +134 -0
- package/src/lib/components/admin/entries/entries.component.html +225 -0
- package/src/lib/components/admin/entries/entries.component.scss +109 -0
- package/src/lib/components/admin/entries/entries.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/entries.component.ts +394 -0
- package/src/lib/components/admin/entries/index.ts +4 -0
- package/src/lib/components/admin/fields/create-field.component.html +12 -0
- package/src/lib/components/admin/fields/create-field.component.scss +1 -0
- package/src/lib/components/admin/fields/create-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/create-field.component.ts +85 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.html +39 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.ts +140 -0
- package/src/lib/components/admin/fields/create-or-update-field-input-base.ts +33 -0
- package/src/lib/components/admin/fields/edit-field.component.html +14 -0
- package/src/lib/components/admin/fields/edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/edit-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/edit-field.component.ts +112 -0
- package/src/lib/components/admin/fields/field-group.component.html +69 -0
- package/src/lib/components/admin/fields/field-group.component.scss +0 -0
- package/src/lib/components/admin/fields/field-group.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/field-group.component.ts +151 -0
- package/src/lib/components/admin/fields/fields.component.html +25 -0
- package/src/lib/components/admin/fields/fields.component.scss +1 -0
- package/src/lib/components/admin/fields/fields.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/fields.component.ts +109 -0
- package/src/lib/components/admin/fields/index.ts +6 -0
- package/src/lib/components/admin/index.ts +3 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.html +81 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.scss +0 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.spec.ts +23 -0
- package/src/lib/components/admin/sections/create-or-edit-sections-modal.component.ts +239 -0
- package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +23 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +52 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +195 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +1 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.spec.ts +21 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.ts +442 -0
- package/src/lib/components/admin/sections/entry-types/index.ts +2 -0
- package/src/lib/components/admin/sections/index.ts +3 -0
- package/src/lib/components/admin/sections/sections.component.html +189 -0
- package/src/lib/components/admin/sections/sections.component.scss +1 -0
- package/src/lib/components/admin/sections/sections.component.spec.ts +21 -0
- package/src/lib/components/admin/sections/sections.component.ts +136 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.html +26 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.scss +27 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.ts +119 -0
- package/src/lib/components/dynamic-form/entry/entry-config.ts +22 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.html +25 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.scss +35 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.ts +111 -0
- package/src/lib/components/dynamic-form/entry/index.ts +3 -0
- package/src/lib/components/dynamic-form/form-control-group.ts +27 -0
- package/src/lib/components/dynamic-form/index.ts +4 -0
- package/src/lib/components/dynamic-form/matrix/index.ts +3 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.html +148 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.scss +0 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.ts +244 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.ts +63 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.html +42 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.scss +0 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.ts +118 -0
- package/src/lib/components/dynamic-form/table/index.ts +3 -0
- package/src/lib/components/dynamic-form/table/table-config.component.html +85 -0
- package/src/lib/components/dynamic-form/table/table-config.component.scss +10 -0
- package/src/lib/components/dynamic-form/table/table-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/table/table-config.component.ts +177 -0
- package/src/lib/components/dynamic-form/table/table-config.ts +45 -0
- package/src/lib/components/dynamic-form/table/table-control.component.html +54 -0
- package/src/lib/components/dynamic-form/table/table-control.component.scss +1 -0
- package/src/lib/components/dynamic-form/table/table-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/table/table-control.component.ts +127 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/constants/index.ts +1 -0
- package/src/lib/constants/styles.ts +18 -0
- package/src/lib/enums/ecms-component.ts +11 -0
- package/src/lib/enums/index.ts +1 -0
- package/src/lib/proxy/README.md +17 -0
- package/src/lib/proxy/dignite/abp/data/index.ts +1 -0
- package/src/lib/proxy/dignite/abp/data/models.ts +4 -0
- package/src/lib/proxy/dignite/abp/index.ts +3 -0
- package/src/lib/proxy/dignite/abp/regionalization-management/index.ts +2 -0
- package/src/lib/proxy/dignite/abp/regionalization-management/models.ts +10 -0
- package/src/lib/proxy/dignite/abp/regionalization-management/regionalization.service.ts +29 -0
- package/src/lib/proxy/dignite/cms/admin/dynamic-forms/form-admin.service.ts +20 -0
- package/src/lib/proxy/dignite/cms/admin/dynamic-forms/models.ts +6 -0
- package/src/lib/proxy/dignite/cms/admin/entries/entry-admin.service.ts +109 -0
- package/src/lib/proxy/dignite/cms/admin/entries/models.ts +69 -0
- package/src/lib/proxy/dignite/cms/admin/fields/field-admin.service.ts +64 -0
- package/src/lib/proxy/dignite/cms/admin/fields/field-group-admin.service.ts +56 -0
- package/src/lib/proxy/dignite/cms/admin/fields/models.ts +42 -0
- package/src/lib/proxy/dignite/cms/admin/index.ts +5 -0
- package/src/lib/proxy/dignite/cms/admin/sections/entry-type-admin.service.ts +55 -0
- package/{lib/proxy/admin/sections/models.d.ts → src/lib/proxy/dignite/cms/admin/sections/models.ts} +82 -67
- package/src/lib/proxy/dignite/cms/admin/sections/section-admin.service.ts +74 -0
- package/src/lib/proxy/dignite/cms/entries/entry-status.enum.ts +8 -0
- package/src/lib/proxy/dignite/cms/fields/index.ts +1 -0
- package/src/lib/proxy/dignite/cms/fields/models.ts +9 -0
- package/src/lib/proxy/dignite/cms/index.ts +5 -0
- package/src/lib/proxy/dignite/cms/sections/models.ts +15 -0
- package/src/lib/proxy/dignite/cms/sections/section-type.enum.ts +9 -0
- package/src/lib/proxy/dignite/index.ts +3 -0
- package/src/lib/proxy/generate-proxy.json +54593 -0
- package/src/lib/proxy/index.ts +3 -0
- package/src/lib/proxy/volo/cms-kit/index.ts +2 -0
- package/src/lib/proxy/volo/cms-kit/users/index.ts +1 -0
- package/{lib/proxy/volo/cms-kit/users/models.d.ts → src/lib/proxy/volo/cms-kit/users/models.ts} +8 -7
- package/src/lib/proxy/volo/index.ts +2 -0
- package/src/lib/resolvers/extensions-props-action-token.resolver.ts +182 -0
- package/src/lib/resolvers/page-default-toolbar-actions.ts +173 -0
- package/src/lib/resolvers/table-default-entity-actions.ts +29 -0
- package/src/lib/resolvers/table-default-entity-props.ts +62 -0
- package/src/lib/services/appent-content.ts +13 -0
- package/src/lib/services/cms-api.service.ts +90 -0
- package/src/lib/services/cms.service.ts +18 -0
- package/src/lib/services/field-abstracts.service.ts +39 -0
- package/src/lib/services/index.ts +3 -0
- package/src/lib/services/validator.ts +10 -0
- package/src/public-api.ts +7 -0
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +16 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/config/cms-config.module.d.ts +0 -8
- package/config/components/domains/domains.component.d.ts +0 -31
- package/config/components/site-language/site-language.component.d.ts +0 -30
- package/config/enums/route-names.d.ts +0 -8
- package/config/index.d.ts +0 -5
- package/config/providers/route.provider.d.ts +0 -9
- package/config/proxy/admin/domains/domain-admin.service.d.ts +0 -13
- package/config/proxy/admin/domains/index.d.ts +0 -2
- package/config/proxy/admin/domains/models.d.ts +0 -7
- package/config/proxy/dignite/cms/admin/sites/index.d.ts +0 -2
- package/config/proxy/dignite/cms/admin/sites/models.d.ts +0 -4
- package/config/proxy/dignite/cms/admin/sites/site-admin.service.d.ts +0 -13
- package/config/proxy/dignite/cms/sites/models.d.ts +0 -4
- package/esm2022/config/cms-config.module.mjs +0 -18
- package/esm2022/config/components/domains/domains.component.mjs +0 -118
- package/esm2022/config/components/site-language/site-language.component.mjs +0 -113
- package/esm2022/config/dignite-ng-expand.cms-config.mjs +0 -5
- package/esm2022/config/enums/index.mjs +0 -2
- package/esm2022/config/enums/route-names.mjs +0 -10
- package/esm2022/config/providers/index.mjs +0 -2
- package/esm2022/config/providers/route.provider.mjs +0 -74
- package/esm2022/config/proxy/admin/domains/domain-admin.service.mjs +0 -32
- package/esm2022/config/proxy/admin/domains/index.mjs +0 -3
- package/esm2022/config/proxy/admin/domains/models.mjs +0 -2
- package/esm2022/config/proxy/dignite/cms/admin/sites/index.mjs +0 -3
- package/esm2022/config/proxy/dignite/cms/admin/sites/models.mjs +0 -2
- package/esm2022/config/proxy/dignite/cms/admin/sites/site-admin.service.mjs +0 -27
- package/esm2022/config/proxy/dignite/cms/sites/models.mjs +0 -2
- package/esm2022/config/public-api.mjs +0 -4
- package/esm2022/dignite-ng-expand.cms.mjs +0 -5
- package/esm2022/lib/cms-routing.module.mjs +0 -94
- package/esm2022/lib/cms.module.mjs +0 -139
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +0 -226
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +0 -25
- package/esm2022/lib/components/admin/entries/create.component.mjs +0 -136
- package/esm2022/lib/components/admin/entries/edit.component.mjs +0 -138
- package/esm2022/lib/components/admin/entries/entries.component.mjs +0 -203
- package/esm2022/lib/components/admin/entries/index.mjs +0 -5
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +0 -87
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +0 -120
- package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +0 -25
- package/esm2022/lib/components/admin/fields/edit-field.component.mjs +0 -109
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +0 -131
- package/esm2022/lib/components/admin/fields/fields.component.mjs +0 -108
- package/esm2022/lib/components/admin/fields/index.mjs +0 -7
- package/esm2022/lib/components/admin/index.mjs +0 -4
- package/esm2022/lib/components/admin/sections/create-or-edit-sections-modal.component.mjs +0 -210
- package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +0 -22
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +0 -71
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +0 -404
- package/esm2022/lib/components/admin/sections/entry-types/index.mjs +0 -3
- package/esm2022/lib/components/admin/sections/index.mjs +0 -4
- package/esm2022/lib/components/admin/sections/sections.component.mjs +0 -138
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +0 -114
- package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +0 -18
- package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +0 -101
- package/esm2022/lib/components/dynamic-form/entry/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/form-control-group.mjs +0 -28
- package/esm2022/lib/components/dynamic-form/index.mjs +0 -5
- package/esm2022/lib/components/dynamic-form/matrix/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +0 -212
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +0 -50
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +0 -94
- package/esm2022/lib/components/dynamic-form/table/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +0 -151
- package/esm2022/lib/components/dynamic-form/table/table-config.mjs +0 -38
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +0 -105
- package/esm2022/lib/components/index.mjs +0 -3
- package/esm2022/lib/constants/styles.mjs +0 -19
- package/esm2022/lib/enums/ecms-component.mjs +0 -13
- package/esm2022/lib/enums/index.mjs +0 -2
- package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +0 -22
- package/esm2022/lib/proxy/admin/dynamic-forms/index.mjs +0 -3
- package/esm2022/lib/proxy/admin/dynamic-forms/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +0 -70
- package/esm2022/lib/proxy/admin/entries/index.mjs +0 -3
- package/esm2022/lib/proxy/admin/entries/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +0 -45
- package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +0 -41
- package/esm2022/lib/proxy/admin/fields/index.mjs +0 -4
- package/esm2022/lib/proxy/admin/fields/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +0 -41
- package/esm2022/lib/proxy/admin/sections/index.mjs +0 -4
- package/esm2022/lib/proxy/admin/sections/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +0 -51
- package/esm2022/lib/proxy/admin/settings/index.mjs +0 -2
- package/esm2022/lib/proxy/admin/settings/site-settings-admin.service.mjs +0 -31
- package/esm2022/lib/proxy/dignite/abp/data/models.mjs +0 -2
- package/esm2022/lib/proxy/entries/entry-status.enum.mjs +0 -8
- package/esm2022/lib/proxy/entries/index.mjs +0 -2
- package/esm2022/lib/proxy/fields/models.mjs +0 -2
- package/esm2022/lib/proxy/sections/index.mjs +0 -3
- package/esm2022/lib/proxy/sections/models.mjs +0 -2
- package/esm2022/lib/proxy/sections/section-type.enum.mjs +0 -9
- package/esm2022/lib/proxy/settings/models.mjs +0 -2
- package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +0 -2
- package/esm2022/lib/resolvers/extensions-props-action-token.resolver.mjs +0 -136
- package/esm2022/lib/resolvers/page-default-toolbar-actions.mjs +0 -160
- package/esm2022/lib/resolvers/table-default-entity-actions.mjs +0 -49
- package/esm2022/lib/resolvers/table-default-entity-props.mjs +0 -53
- package/esm2022/lib/services/appent-content.mjs +0 -15
- package/esm2022/lib/services/cms-api.service.mjs +0 -70
- package/esm2022/lib/services/cms.service.mjs +0 -21
- package/esm2022/lib/services/field-abstracts.service.mjs +0 -42
- package/esm2022/lib/services/index.mjs +0 -4
- package/esm2022/public-api.mjs +0 -6
- package/fesm2022/dignite-ng-expand.cms-config.mjs +0 -371
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +0 -1
- package/fesm2022/dignite-ng-expand.cms.mjs +0 -3886
- package/fesm2022/dignite-ng-expand.cms.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/cms-routing.module.d.ts +0 -7
- package/lib/cms.module.d.ts +0 -37
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +0 -63
- package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +0 -23
- package/lib/components/admin/entries/create.component.d.ts +0 -50
- package/lib/components/admin/entries/edit.component.d.ts +0 -53
- package/lib/components/admin/entries/entries.component.d.ts +0 -67
- package/lib/components/admin/entries/index.d.ts +0 -4
- package/lib/components/admin/fields/create-field.component.d.ts +0 -37
- package/lib/components/admin/fields/create-or-edit-field.component.d.ts +0 -38
- package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +0 -16
- package/lib/components/admin/fields/edit-field.component.d.ts +0 -46
- package/lib/components/admin/fields/field-group.component.d.ts +0 -58
- package/lib/components/admin/fields/fields.component.d.ts +0 -35
- package/lib/components/admin/fields/index.d.ts +0 -6
- package/lib/components/admin/index.d.ts +0 -3
- package/lib/components/admin/sections/create-or-edit-sections-modal.component.d.ts +0 -49
- package/lib/components/admin/sections/create-or-update-sections-input-base.d.ts +0 -20
- package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +0 -38
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +0 -139
- package/lib/components/admin/sections/entry-types/index.d.ts +0 -2
- package/lib/components/admin/sections/index.d.ts +0 -3
- package/lib/components/admin/sections/sections.component.d.ts +0 -46
- package/lib/components/dynamic-form/entry/entry-config.component.d.ts +0 -39
- package/lib/components/dynamic-form/entry/entry-config.d.ts +0 -9
- package/lib/components/dynamic-form/entry/entry-control.component.d.ts +0 -35
- package/lib/components/dynamic-form/entry/index.d.ts +0 -3
- package/lib/components/dynamic-form/form-control-group.d.ts +0 -4
- package/lib/components/dynamic-form/index.d.ts +0 -4
- package/lib/components/dynamic-form/matrix/index.d.ts +0 -3
- package/lib/components/dynamic-form/matrix/matrix-config.component.d.ts +0 -73
- package/lib/components/dynamic-form/matrix/matrix-config.d.ts +0 -24
- package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +0 -39
- package/lib/components/dynamic-form/table/index.d.ts +0 -3
- package/lib/components/dynamic-form/table/table-config.component.d.ts +0 -58
- package/lib/components/dynamic-form/table/table-config.d.ts +0 -18
- package/lib/components/dynamic-form/table/table-control.component.d.ts +0 -39
- package/lib/components/index.d.ts +0 -2
- package/lib/constants/styles.d.ts +0 -2
- package/lib/enums/ecms-component.d.ts +0 -11
- package/lib/enums/index.d.ts +0 -1
- package/lib/proxy/admin/dynamic-forms/form-admin.service.d.ts +0 -12
- package/lib/proxy/admin/dynamic-forms/models.d.ts +0 -4
- package/lib/proxy/admin/entries/entry-admin.service.d.ts +0 -22
- package/lib/proxy/admin/entries/models.d.ts +0 -60
- package/lib/proxy/admin/fields/field-admin.service.d.ts +0 -17
- package/lib/proxy/admin/fields/field-group-admin.service.d.ts +0 -16
- package/lib/proxy/admin/fields/models.d.ts +0 -34
- package/lib/proxy/admin/sections/entry-type-admin.service.d.ts +0 -15
- package/lib/proxy/admin/sections/section-admin.service.d.ts +0 -18
- package/lib/proxy/admin/settings/index.d.ts +0 -1
- package/lib/proxy/admin/settings/site-settings-admin.service.d.ts +0 -13
- package/lib/proxy/dignite/abp/data/models.d.ts +0 -3
- package/lib/proxy/entries/entry-status.enum.d.ts +0 -5
- package/lib/proxy/fields/models.d.ts +0 -8
- package/lib/proxy/sections/models.d.ts +0 -12
- package/lib/proxy/sections/section-type.enum.d.ts +0 -6
- package/lib/proxy/settings/models.d.ts +0 -5
- package/lib/resolvers/extensions-props-action-token.resolver.d.ts +0 -75
- package/lib/resolvers/page-default-toolbar-actions.d.ts +0 -18
- package/lib/resolvers/table-default-entity-actions.d.ts +0 -5
- package/lib/resolvers/table-default-entity-props.d.ts +0 -5
- package/lib/services/appent-content.d.ts +0 -1
- package/lib/services/cms-api.service.d.ts +0 -16
- package/lib/services/cms.service.d.ts +0 -10
- package/lib/services/field-abstracts.service.d.ts +0 -20
- package/lib/services/index.d.ts +0 -3
- package/public-api.d.ts +0 -2
- /package/{lib/proxy/admin/dynamic-forms/index.d.ts → src/lib/proxy/dignite/cms/admin/dynamic-forms/index.ts} +0 -0
- /package/{lib/proxy/admin/entries/index.d.ts → src/lib/proxy/dignite/cms/admin/entries/index.ts} +0 -0
- /package/{lib/proxy/admin/fields/index.d.ts → src/lib/proxy/dignite/cms/admin/fields/index.ts} +0 -0
- /package/{lib/proxy/admin/sections/index.d.ts → src/lib/proxy/dignite/cms/admin/sections/index.ts} +0 -0
- /package/{lib/proxy/entries/index.d.ts → src/lib/proxy/dignite/cms/entries/index.ts} +0 -0
- /package/{lib/proxy/sections/index.d.ts → src/lib/proxy/dignite/cms/sections/index.ts} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
|
|
2
|
+
import { EXTENSIONS_IDENTIFIER } from "@abp/ng.components/extensible";
|
|
3
|
+
import { ListService, LIST_QUERY_DEBOUNCE_TIME, LocalizationService, PagedResultDto, ABP } from "@abp/ng.core";
|
|
4
|
+
import { ToasterService, ConfirmationService, Confirmation } from "@abp/ng.theme.shared";
|
|
5
|
+
import { Component, OnInit, inject } from "@angular/core";
|
|
6
|
+
import { Router } from "@angular/router";
|
|
7
|
+
import { ColumnMode } from "@swimlane/ngx-datatable";
|
|
8
|
+
import { finalize } from "rxjs";
|
|
9
|
+
import { ECmsComponent } from "../../../enums";
|
|
10
|
+
import { UpdateListService } from "@dignite-ng/expand.core";
|
|
11
|
+
import { FieldAdminService, FieldDto, GetFieldsInput } from "../../../proxy/dignite/cms/admin/fields";
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'cms-fields',
|
|
15
|
+
templateUrl: './fields.component.html',
|
|
16
|
+
styleUrls: ['./fields.component.scss'],
|
|
17
|
+
providers: [
|
|
18
|
+
// [Required]
|
|
19
|
+
ListService,
|
|
20
|
+
// [Optional]
|
|
21
|
+
// Provide this token if you want a different debounce time.
|
|
22
|
+
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
23
|
+
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
|
|
24
|
+
{
|
|
25
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
26
|
+
useValue: ECmsComponent.Fields,
|
|
27
|
+
},
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
export class FieldsComponent implements OnInit {
|
|
31
|
+
|
|
32
|
+
constructor(
|
|
33
|
+
public readonly list: ListService,
|
|
34
|
+
private _FieldAdminService: FieldAdminService,
|
|
35
|
+
private toaster: ToasterService,
|
|
36
|
+
private confirmation: ConfirmationService,
|
|
37
|
+
private _LocalizationService: LocalizationService,
|
|
38
|
+
private router: Router,
|
|
39
|
+
) {
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
private _UpdateListService=inject(UpdateListService)
|
|
43
|
+
/**表格单元格布局类型 */
|
|
44
|
+
ColumnMode = ColumnMode;
|
|
45
|
+
|
|
46
|
+
/**表格数据 */
|
|
47
|
+
data: PagedResultDto<FieldDto> = {
|
|
48
|
+
items: [],
|
|
49
|
+
totalCount: 0,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**过滤器 */
|
|
53
|
+
filters = {} as GetFieldsInput;
|
|
54
|
+
|
|
55
|
+
ngOnInit(): void {
|
|
56
|
+
this.hookToQuery()
|
|
57
|
+
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
58
|
+
this.list.get()
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
getData(){
|
|
62
|
+
this.list.get()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**字段分组选择回调 */
|
|
67
|
+
fieldGroupChange(event) {
|
|
68
|
+
this.filters.groupId = event
|
|
69
|
+
this.list.page=0
|
|
70
|
+
this.list.get()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**使用abp的list获取表格的字段数据列表 */
|
|
76
|
+
hookToQuery() {
|
|
77
|
+
const getData = (query: ABP.PageQueryParams) => this._FieldAdminService.getList({
|
|
78
|
+
...query,
|
|
79
|
+
...this.filters,
|
|
80
|
+
});
|
|
81
|
+
const setData = (list: PagedResultDto<FieldDto>) => (this.data = list);
|
|
82
|
+
this.list.hookToQuery(getData).subscribe(setData);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**新建字段按钮 */
|
|
86
|
+
toFieldsCreateBtn() {
|
|
87
|
+
this.router.navigate(['/cms/admin/fields/create'],
|
|
88
|
+
{
|
|
89
|
+
queryParams: {}
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**删除字段 */
|
|
95
|
+
deletefield(row: any) {
|
|
96
|
+
this.confirmation.warn(
|
|
97
|
+
row.displayName,
|
|
98
|
+
this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`),
|
|
99
|
+
).subscribe((status: Confirmation.Status) => {
|
|
100
|
+
if (status == 'confirm') {
|
|
101
|
+
this._FieldAdminService.delete(row.id).pipe(finalize(() => {
|
|
102
|
+
})).subscribe(res => {
|
|
103
|
+
this.toaster.success(this._LocalizationService.instant(`AbpUi::DeletedSuccessfully`));
|
|
104
|
+
this.list.get()
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<abp-modal [(visible)]="ModalOpen" [busy]="ModalBusy" (visibleChange)="ModalVisibleChange($event)">
|
|
2
|
+
<ng-template #abpHeader>
|
|
3
|
+
<h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>
|
|
4
|
+
</ng-template>
|
|
5
|
+
<ng-template #abpBody>
|
|
6
|
+
<ng-template #loaderRef>
|
|
7
|
+
<div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
|
|
8
|
+
</ng-template>
|
|
9
|
+
<ng-container *ngIf="ModalForm; else loaderRef">
|
|
10
|
+
<form class="sites-modal-form" [formGroup]="ModalForm" (keydown.enter)="$event.preventDefault()"
|
|
11
|
+
[class]="{'was-validated':formValidation}" (submit)="save()">
|
|
12
|
+
<button type="submit" #ModalFormSubmit style="display: none"></button>
|
|
13
|
+
<div class="mb-3">
|
|
14
|
+
<label class="form-label">{{'Cms::EntryType' | abpLocalization}}</label>
|
|
15
|
+
<div>
|
|
16
|
+
<ng-container *ngFor="let item of _sectionTypeOptions;let i =index">
|
|
17
|
+
<div class="form-check form-check-inline">
|
|
18
|
+
<input class="form-check-input" type="radio" [value]="item.value"
|
|
19
|
+
(change)="radiochange()" formControlName="type" id="flexRadioDefault{{i}}">
|
|
20
|
+
<label class="form-check-label" for="flexRadioDefault{{i}}">
|
|
21
|
+
{{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}
|
|
22
|
+
</label>
|
|
23
|
+
</div>
|
|
24
|
+
</ng-container>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="mb-3">
|
|
28
|
+
<label class="form-label">{{'Cms::DisplayName' | abpLocalization}}</label>
|
|
29
|
+
<input type="text" class="form-control" formControlName="displayName"
|
|
30
|
+
(blur)="disPlayNameInputBlur($event)" placeholder="" />
|
|
31
|
+
</div>
|
|
32
|
+
<div class="mb-3">
|
|
33
|
+
<label class="form-label">{{'Cms::Name' | abpLocalization}}</label>
|
|
34
|
+
<input type="text" class="form-control" formControlName="name" placeholder="" />
|
|
35
|
+
<div class="text-danger invalid-feedback" *ngIf="nameInput.errors?.repetition">
|
|
36
|
+
{{nameInput.errors?.repetition}}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="mb-3">
|
|
40
|
+
<label class="form-label">{{'Cms::Route' | abpLocalization}} </label>
|
|
41
|
+
<input type="text" class="form-control" formControlName="route" placeholder="" />
|
|
42
|
+
<div class="text-danger invalid-feedback" *ngIf="routeInput.errors?.repetition">
|
|
43
|
+
{{routeInput.errors?.repetition}}
|
|
44
|
+
</div>
|
|
45
|
+
<small class="form-text text-muted d-block">
|
|
46
|
+
{{'Cms::RouteTips' | abpLocalization}}<br>
|
|
47
|
+
blog<br>
|
|
48
|
+
{{'blog/{slug}'}}<br>
|
|
49
|
+
{{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}
|
|
50
|
+
</small>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="mb-3">
|
|
53
|
+
<label class="form-label">{{'Cms::Template' | abpLocalization}} </label>
|
|
54
|
+
<input type="text" class="form-control" formControlName="template" placeholder="" />
|
|
55
|
+
<small class="form-text text-muted d-block">
|
|
56
|
+
{{"Cms::TemplateTips" | abpLocalization}}
|
|
57
|
+
</small>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="mb-3">
|
|
60
|
+
<div class="form-check form-check-inline">
|
|
61
|
+
<input class="form-check-input" type="checkbox" value="true" formControlName="isDefault"
|
|
62
|
+
id="isDefault" />
|
|
63
|
+
<label class="form-check-label" for="isDefault"> {{'Cms::Default' | abpLocalization}} </label>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="mb-3">
|
|
67
|
+
<div class="form-check form-check-inline">
|
|
68
|
+
<input class="form-check-input" type="checkbox" value="true" formControlName="isActive"
|
|
69
|
+
id="isActive" />
|
|
70
|
+
<label class="form-check-label" for="isActive"> {{'Cms::IsActive' | abpLocalization}}</label>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</form>
|
|
74
|
+
</ng-container>
|
|
75
|
+
</ng-template>
|
|
76
|
+
<ng-template #abpFooter>
|
|
77
|
+
<button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
|
|
78
|
+
<abp-button iconClass="fa fa-check" type="button" [loading]="ModalBusy" [disabled]="ModalBusy"
|
|
79
|
+
(click)="ModalFormSubmit?.nativeElement?.click()">{{'AbpUi::Save'|abpLocalization}}</abp-button>
|
|
80
|
+
</ng-template>
|
|
81
|
+
</abp-modal>
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CreateOrEditSectionsModalComponent } from './create-or-edit-sections-modal.component';
|
|
4
|
+
|
|
5
|
+
describe('CreateOrEditSectionsModalComponent', () => {
|
|
6
|
+
let component: CreateOrEditSectionsModalComponent;
|
|
7
|
+
let fixture: ComponentFixture<CreateOrEditSectionsModalComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [CreateOrEditSectionsModalComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CreateOrEditSectionsModalComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { LocalizationService } from '@abp/ng.core';
|
|
2
|
+
import {
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
inject,
|
|
7
|
+
Input,
|
|
8
|
+
Output,
|
|
9
|
+
ViewChild,
|
|
10
|
+
} from '@angular/core';
|
|
11
|
+
import {
|
|
12
|
+
AbstractControl,
|
|
13
|
+
FormControl,
|
|
14
|
+
FormGroup,
|
|
15
|
+
ValidationErrors,
|
|
16
|
+
ValidatorFn,
|
|
17
|
+
Validators,
|
|
18
|
+
} from '@angular/forms';
|
|
19
|
+
import { ValidatorsService, UpdateListService } from '@dignite-ng/expand.core';
|
|
20
|
+
import { finalize, Observable } from 'rxjs';
|
|
21
|
+
import { ToasterService } from '@abp/ng.theme.shared';
|
|
22
|
+
import { CmsApiService } from '../../../services';
|
|
23
|
+
import { SectionAdminService } from '../../../proxy/dignite/cms/admin/sections';
|
|
24
|
+
import { SectionType, sectionTypeOptions } from '../../../proxy/dignite/cms/sections';
|
|
25
|
+
|
|
26
|
+
@Component({
|
|
27
|
+
selector: 'cms-create-or-edit-sections-modal',
|
|
28
|
+
templateUrl: './create-or-edit-sections-modal.component.html',
|
|
29
|
+
styleUrl: './create-or-edit-sections-modal.component.scss',
|
|
30
|
+
})
|
|
31
|
+
export class CreateOrEditSectionsModalComponent {
|
|
32
|
+
private _LocalizationService = inject(LocalizationService);
|
|
33
|
+
private toaster = inject(ToasterService);
|
|
34
|
+
private _ValidatorsService = inject(ValidatorsService);
|
|
35
|
+
private _UpdateListService = inject(UpdateListService);
|
|
36
|
+
private _SectionAdminService = inject(SectionAdminService);
|
|
37
|
+
private _CmsApiService = inject(CmsApiService);
|
|
38
|
+
_SectionType = SectionType;
|
|
39
|
+
_sectionTypeOptions = sectionTypeOptions;
|
|
40
|
+
/**表单验证状态 */
|
|
41
|
+
formValidation: any = '';
|
|
42
|
+
|
|
43
|
+
/**模态框-状态-是否打开 */
|
|
44
|
+
ModalOpen: boolean = false;
|
|
45
|
+
@Input()
|
|
46
|
+
public set visible(v: boolean) {
|
|
47
|
+
this.ModalOpen = v;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**模态框-繁忙状态-用于确定模态的繁忙状态是否为真 */
|
|
51
|
+
ModalBusy: boolean = false;
|
|
52
|
+
/**初始值 */
|
|
53
|
+
selected: any = '';
|
|
54
|
+
/**模态框-表单 */
|
|
55
|
+
ModalForm: FormGroup | undefined;
|
|
56
|
+
@Input()
|
|
57
|
+
public set formEntity(v: FormGroup | undefined) {
|
|
58
|
+
this.ModalForm = v;
|
|
59
|
+
if (v) {
|
|
60
|
+
this.selected = v?.value;
|
|
61
|
+
this.setAsyncValidatorsFn();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
get idInput() {
|
|
65
|
+
return this.ModalForm?.get('id') as FormControl;
|
|
66
|
+
}
|
|
67
|
+
get displayNameInput() {
|
|
68
|
+
return this.ModalForm.get('displayName') as FormControl;
|
|
69
|
+
}
|
|
70
|
+
get nameInput() {
|
|
71
|
+
return this.ModalForm.get('name') as FormControl;
|
|
72
|
+
}
|
|
73
|
+
get routeInput() {
|
|
74
|
+
return this.ModalForm.get('route') as FormControl;
|
|
75
|
+
}
|
|
76
|
+
get templateInput() {
|
|
77
|
+
return this.ModalForm.get('template') as FormControl;
|
|
78
|
+
}
|
|
79
|
+
get typeInput() {
|
|
80
|
+
return this.ModalForm.get('type') as FormControl;
|
|
81
|
+
}
|
|
82
|
+
radiochange() {
|
|
83
|
+
this.routeInput.patchValue(this.routeInput.value);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**模态框-表单--控件模板-动态赋值表单控件 */
|
|
87
|
+
@ViewChild('ModalFormSubmit', { static: false }) ModalFormSubmit: ElementRef;
|
|
88
|
+
@Output() visibleChange = new EventEmitter();
|
|
89
|
+
/**模态框-状态改变回调 */
|
|
90
|
+
ModalVisibleChange(event) {
|
|
91
|
+
this.ModalOpen = event;
|
|
92
|
+
this.visibleChange.emit(event);
|
|
93
|
+
if (!event) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**保存 */
|
|
98
|
+
save() {
|
|
99
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.ModalForm);
|
|
100
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms')) return;
|
|
101
|
+
|
|
102
|
+
if (this.ModalBusy) return;
|
|
103
|
+
this.ModalBusy = true;
|
|
104
|
+
if (!this.ModalForm.valid) return;
|
|
105
|
+
let input = this.ModalForm.value;
|
|
106
|
+
if (this.idInput.value) {
|
|
107
|
+
this._SectionAdminService
|
|
108
|
+
.update(this.idInput.value, input)
|
|
109
|
+
.pipe(
|
|
110
|
+
finalize(() => {
|
|
111
|
+
this.reset();
|
|
112
|
+
})
|
|
113
|
+
)
|
|
114
|
+
.subscribe(res => {
|
|
115
|
+
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
116
|
+
this.visibleChange.emit(false);
|
|
117
|
+
this.formValidation='';
|
|
118
|
+
});
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
this._SectionAdminService
|
|
122
|
+
.create(input)
|
|
123
|
+
.pipe(
|
|
124
|
+
finalize(() => {
|
|
125
|
+
this.reset();
|
|
126
|
+
})
|
|
127
|
+
)
|
|
128
|
+
.subscribe(res => {
|
|
129
|
+
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
130
|
+
this.visibleChange.emit(false);
|
|
131
|
+
this.formValidation='';
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
reset(){
|
|
135
|
+
this.ModalBusy = false;
|
|
136
|
+
this._UpdateListService.updateList();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
disPlayNameInputBlur(event) {
|
|
140
|
+
let value = event.target.value;
|
|
141
|
+
let pinyin = this._CmsApiService.chineseToPinyin(value);
|
|
142
|
+
let nameInput = this.nameInput;
|
|
143
|
+
let routeInput = this.routeInput;
|
|
144
|
+
let templateInput = this.templateInput;
|
|
145
|
+
if (nameInput.value) return;
|
|
146
|
+
nameInput.patchValue(pinyin);
|
|
147
|
+
if (routeInput.value) return;
|
|
148
|
+
routeInput.patchValue(pinyin + (this.typeInput.value === 0 ? '' : '/{slug}'));
|
|
149
|
+
if (templateInput.value) return;
|
|
150
|
+
templateInput.patchValue(pinyin + '/index');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
setAsyncValidatorsFn() {
|
|
154
|
+
this.ModalForm?.setControl(
|
|
155
|
+
'name',
|
|
156
|
+
new FormControl(this.nameInput.value || '', {
|
|
157
|
+
validators: Validators.required,
|
|
158
|
+
asyncValidators: this.nameRepetitionAsyncValidator(),
|
|
159
|
+
})
|
|
160
|
+
);
|
|
161
|
+
this.ModalForm?.setControl(
|
|
162
|
+
'route',
|
|
163
|
+
new FormControl(this.routeInput.value || '', {
|
|
164
|
+
validators: [Validators.required, this.forbiddenNameValidator()],
|
|
165
|
+
asyncValidators: [this.routeRepetitionAsyncValidator()],
|
|
166
|
+
updateOn: 'change',
|
|
167
|
+
})
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
forbiddenNameValidator(): ValidatorFn {
|
|
171
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
172
|
+
let inputValue = control.value.toLocaleLowerCase();
|
|
173
|
+
let forbidden =
|
|
174
|
+
this.typeInput.value == 0 ? false : inputValue.includes('{slug}') ? false : true;
|
|
175
|
+
return forbidden
|
|
176
|
+
? {
|
|
177
|
+
repetition: this._LocalizationService.instant(
|
|
178
|
+
`Cms::RouteVerificationTips`,
|
|
179
|
+
this._LocalizationService.instant(
|
|
180
|
+
`Cms::Enum:SectionType:` + SectionType[this.typeInput.value]
|
|
181
|
+
),
|
|
182
|
+
'{slug}'
|
|
183
|
+
),
|
|
184
|
+
}
|
|
185
|
+
: null;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
nameRepetitionAsyncValidator() {
|
|
189
|
+
return (
|
|
190
|
+
ctrl: AbstractControl
|
|
191
|
+
): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
|
|
192
|
+
return new Promise(resolve => {
|
|
193
|
+
let subslug = this.ModalForm?.get('name');
|
|
194
|
+
|
|
195
|
+
if (subslug.value == this.selected?.name) {
|
|
196
|
+
resolve(null);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
this._SectionAdminService.nameExists({ name: subslug.value }).subscribe(res => {
|
|
200
|
+
if (res) {
|
|
201
|
+
resolve({
|
|
202
|
+
repetition: this._LocalizationService.instant(
|
|
203
|
+
`Cms::SectionName{0}AlreadyExist`,
|
|
204
|
+
ctrl.value
|
|
205
|
+
),
|
|
206
|
+
});
|
|
207
|
+
} else {
|
|
208
|
+
resolve(null);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
routeRepetitionAsyncValidator() {
|
|
215
|
+
return (
|
|
216
|
+
ctrl: AbstractControl
|
|
217
|
+
): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
|
|
218
|
+
return new Promise(resolve => {
|
|
219
|
+
let subslug = this.ModalForm?.get('route').value;
|
|
220
|
+
if (subslug == this.selected?.route) {
|
|
221
|
+
resolve(null);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
this._SectionAdminService.routeExists({ route: subslug }).subscribe(res => {
|
|
225
|
+
if (res) {
|
|
226
|
+
resolve({
|
|
227
|
+
repetition: this._LocalizationService.instant(
|
|
228
|
+
`Cms::SectionRoute{0}AlreadyExist`,
|
|
229
|
+
ctrl.value
|
|
230
|
+
),
|
|
231
|
+
});
|
|
232
|
+
} else {
|
|
233
|
+
resolve(null);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import {Validators } from "@angular/forms";
|
|
3
|
+
|
|
4
|
+
export class CreateOrUpdateSectionsInputBase {
|
|
5
|
+
id: string | Validators[] = [''];
|
|
6
|
+
/**版块类型 */
|
|
7
|
+
type: any = [0, [Validators.required]];
|
|
8
|
+
/**字段名称 Display name of this field */
|
|
9
|
+
displayName: any = ['', [Validators.required]];
|
|
10
|
+
/**字段唯一名称 Unique Name*/
|
|
11
|
+
name: any = ['', [Validators.required]];
|
|
12
|
+
/**条目路由 */
|
|
13
|
+
route: any = ['', [Validators.required]];
|
|
14
|
+
/**页面模板 */
|
|
15
|
+
template: any = ['', [Validators.required]];
|
|
16
|
+
/**是否默认 */
|
|
17
|
+
isDefault: any = [false, []];
|
|
18
|
+
/**是否激活 */
|
|
19
|
+
isActive: any = [true, []];
|
|
20
|
+
concurrencyStamp: string | Validators[] = [''];
|
|
21
|
+
|
|
22
|
+
constructor() {}
|
|
23
|
+
}
|
package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FormArray, Validators } from "@angular/forms";
|
|
2
|
+
|
|
3
|
+
export class CreateOrEditEntryTypeInputBase {
|
|
4
|
+
/**显示名称 Display name of this field */
|
|
5
|
+
displayName: any = ['', [Validators.required]];
|
|
6
|
+
|
|
7
|
+
/**名称 Unique Name*/
|
|
8
|
+
name: any = ['', [Validators.required]];
|
|
9
|
+
/**条目路由 */
|
|
10
|
+
fieldTabs: any = new FormArray([])
|
|
11
|
+
|
|
12
|
+
constructor(data?: CreateOrEditEntryTypeInputBase) {
|
|
13
|
+
if (data) {
|
|
14
|
+
for (const key in data) {
|
|
15
|
+
if (data.hasOwnProperty(key)) {
|
|
16
|
+
this[key] = data[key];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class fieldTabsBase {
|
|
23
|
+
/**名称 Unique Name*/
|
|
24
|
+
name: any = ['', [Validators.required]];
|
|
25
|
+
fields?: any = [[], []]
|
|
26
|
+
constructor(data?: fieldTabsBase) {
|
|
27
|
+
if (data) {
|
|
28
|
+
for (const key in data) {
|
|
29
|
+
if (data.hasOwnProperty(key)) {
|
|
30
|
+
this[key] = data[key];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export class fieldsBase {
|
|
37
|
+
/**字段id Unique Name*/
|
|
38
|
+
fieldId: any = ['', [Validators.required]];
|
|
39
|
+
/**显示名称 Unique Name*/
|
|
40
|
+
displayName: any = ['', [Validators.required]];
|
|
41
|
+
/**必填 Unique Name*/
|
|
42
|
+
required: any = [false, []];
|
|
43
|
+
/**是否在列表中显示 Unique Name*/
|
|
44
|
+
showInList: any = [false, []];
|
|
45
|
+
/**是否启用搜索 */
|
|
46
|
+
enableSearch: any = [false, []];
|
|
47
|
+
|
|
48
|
+
constructor() {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|