@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,109 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
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
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,239 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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
|
-
|