@dignite-ng/expand.cms 0.0.52 → 0.0.54
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/components/domains/domains.component.d.ts +29 -0
- package/config/components/site-language/site-language.component.d.ts +29 -0
- package/config/{src/enums/index.ts → enums/index.d.ts} +1 -1
- package/config/enums/route-names.d.ts +8 -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/proxy/admin/domains/domain-admin.service.d.ts +13 -0
- package/config/{src/proxy/dignite/cms/admin/domains/models.ts → proxy/admin/domains/models.d.ts} +7 -9
- package/config/proxy/dignite/cms/admin/sites/models.d.ts +4 -0
- package/config/proxy/dignite/cms/admin/sites/site-admin.service.d.ts +13 -0
- package/config/proxy/dignite/cms/sites/models.d.ts +4 -0
- package/config/{src/public-api.ts → public-api.d.ts} +3 -3
- package/config/services/validators.service.d.ts +16 -0
- package/esm2022/config/cms-config.module.mjs +18 -0
- package/esm2022/config/components/domains/domains.component.mjs +102 -0
- package/esm2022/config/components/site-language/site-language.component.mjs +105 -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 +10 -0
- package/esm2022/config/providers/index.mjs +2 -0
- package/esm2022/config/providers/route.provider.mjs +74 -0
- package/esm2022/config/proxy/admin/domains/domain-admin.service.mjs +32 -0
- package/esm2022/config/proxy/admin/domains/index.mjs +3 -0
- package/esm2022/config/proxy/admin/domains/models.mjs +2 -0
- package/esm2022/config/proxy/dignite/cms/admin/sites/index.mjs +3 -0
- package/esm2022/config/proxy/dignite/cms/admin/sites/models.mjs +2 -0
- package/esm2022/config/proxy/dignite/cms/admin/sites/site-admin.service.mjs +27 -0
- package/esm2022/config/proxy/dignite/cms/sites/models.mjs +2 -0
- package/esm2022/config/public-api.mjs +4 -0
- package/esm2022/config/services/validators.service.mjs +83 -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 +133 -0
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +303 -0
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +32 -0
- package/esm2022/lib/components/admin/entries/create.component.mjs +110 -0
- package/esm2022/lib/components/admin/entries/edit.component.mjs +110 -0
- package/esm2022/lib/components/admin/entries/entries.component.mjs +199 -0
- package/esm2022/lib/components/admin/entries/index.mjs +5 -0
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +80 -0
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +114 -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 +103 -0
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +131 -0
- package/esm2022/lib/components/admin/fields/fields.component.mjs +108 -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-update-sections-input-base.mjs +27 -0
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +71 -0
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +389 -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 +292 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +112 -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/index.mjs +4 -0
- package/esm2022/lib/components/dynamic-form/form-control-group.mjs +28 -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 +214 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +50 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +98 -0
- package/esm2022/lib/components/dynamic-form/table/index.mjs +4 -0
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +151 -0
- package/esm2022/lib/components/dynamic-form/table/table-config.mjs +38 -0
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +105 -0
- package/esm2022/lib/components/index.mjs +3 -0
- package/esm2022/lib/constants/styles.mjs +21 -0
- package/esm2022/lib/enums/ecms-component.mjs +13 -0
- package/esm2022/lib/enums/index.mjs +2 -0
- package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +22 -0
- package/esm2022/lib/proxy/admin/dynamic-forms/index.mjs +3 -0
- package/esm2022/lib/proxy/admin/dynamic-forms/models.mjs +2 -0
- package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +70 -0
- package/esm2022/lib/proxy/admin/entries/index.mjs +3 -0
- package/esm2022/lib/proxy/admin/entries/models.mjs +2 -0
- package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +45 -0
- package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +41 -0
- package/esm2022/lib/proxy/admin/fields/index.mjs +4 -0
- package/esm2022/lib/proxy/admin/fields/models.mjs +2 -0
- package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +41 -0
- package/esm2022/lib/proxy/admin/sections/index.mjs +4 -0
- package/esm2022/lib/proxy/admin/sections/models.mjs +2 -0
- package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +51 -0
- package/esm2022/lib/proxy/admin/settings/index.mjs +2 -0
- package/esm2022/lib/proxy/admin/settings/site-settings-admin.service.mjs +31 -0
- package/esm2022/lib/proxy/dignite/abp/data/models.mjs +2 -0
- package/esm2022/lib/proxy/entries/entry-status.enum.mjs +8 -0
- package/esm2022/lib/proxy/entries/index.mjs +2 -0
- package/esm2022/lib/proxy/fields/models.mjs +2 -0
- package/esm2022/lib/proxy/sections/index.mjs +3 -0
- package/esm2022/lib/proxy/sections/models.mjs +2 -0
- package/esm2022/lib/proxy/sections/section-type.enum.mjs +9 -0
- package/esm2022/lib/proxy/settings/models.mjs +2 -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 +49 -0
- package/esm2022/lib/resolvers/table-default-entity-props.mjs +54 -0
- package/esm2022/lib/services/appent-content.mjs +15 -0
- package/esm2022/lib/services/cms-api.service.mjs +70 -0
- package/esm2022/lib/services/cms.service.mjs +21 -0
- package/esm2022/lib/services/field-abstracts.service.mjs +42 -0
- package/esm2022/lib/services/index.mjs +4 -0
- package/esm2022/lib/services/validators.service.mjs +83 -0
- package/esm2022/public-api.mjs +6 -0
- package/fesm2022/dignite-ng-expand.cms-config.mjs +426 -0
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -0
- package/fesm2022/dignite-ng-expand.cms.mjs +3932 -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 +35 -0
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +96 -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 +47 -0
- package/lib/components/admin/entries/edit.component.d.ts +47 -0
- package/lib/components/admin/entries/entries.component.d.ts +66 -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 +38 -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-update-sections-input-base.d.ts +17 -0
- package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +38 -0
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +138 -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 +64 -0
- package/lib/components/dynamic-form/entry/entry-config.component.d.ts +39 -0
- package/lib/components/dynamic-form/entry/entry-config.d.ts +9 -0
- package/lib/components/dynamic-form/entry/entry-control.component.d.ts +35 -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 +73 -0
- package/lib/components/dynamic-form/matrix/matrix-config.d.ts +24 -0
- package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +39 -0
- package/lib/components/dynamic-form/table/index.d.ts +3 -0
- package/lib/components/dynamic-form/table/table-config.component.d.ts +58 -0
- package/lib/components/dynamic-form/table/table-config.d.ts +18 -0
- package/lib/components/dynamic-form/table/table-control.component.d.ts +39 -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/admin/dynamic-forms/form-admin.service.d.ts +12 -0
- package/lib/proxy/admin/dynamic-forms/models.d.ts +4 -0
- package/lib/proxy/admin/entries/entry-admin.service.d.ts +22 -0
- package/lib/proxy/admin/entries/models.d.ts +60 -0
- package/lib/proxy/admin/fields/field-admin.service.d.ts +17 -0
- package/lib/proxy/admin/fields/field-group-admin.service.d.ts +16 -0
- package/{src/lib/proxy/admin/fields/models.ts → lib/proxy/admin/fields/models.d.ts} +34 -42
- package/lib/proxy/admin/sections/entry-type-admin.service.d.ts +15 -0
- package/{src/lib/proxy/admin/sections/models.ts → lib/proxy/admin/sections/models.d.ts} +67 -81
- package/lib/proxy/admin/sections/section-admin.service.d.ts +18 -0
- package/lib/proxy/admin/settings/site-settings-admin.service.d.ts +13 -0
- package/lib/proxy/dignite/abp/data/models.d.ts +3 -0
- package/lib/proxy/entries/entry-status.enum.d.ts +5 -0
- package/lib/proxy/fields/models.d.ts +8 -0
- package/lib/proxy/sections/models.d.ts +12 -0
- package/lib/proxy/sections/section-type.enum.d.ts +6 -0
- package/lib/proxy/settings/models.d.ts +5 -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 +16 -0
- package/lib/services/cms.service.d.ts +10 -0
- package/lib/services/field-abstracts.service.d.ts +20 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/validators.service.d.ts +15 -0
- package/package.json +22 -7
- package/{src/public-api.ts → public-api.d.ts} +2 -6
- package/config/ng-package.json +0 -6
- package/config/src/cms-config.module.ts +0 -12
- package/config/src/components/domains/domains.component.html +0 -17
- package/config/src/components/domains/domains.component.scss +0 -0
- package/config/src/components/domains/domains.component.spec.ts +0 -21
- package/config/src/components/domains/domains.component.ts +0 -109
- package/config/src/components/site-language/site-language.component.html +0 -31
- package/config/src/components/site-language/site-language.component.scss +0 -0
- package/config/src/components/site-language/site-language.component.spec.ts +0 -21
- package/config/src/components/site-language/site-language.component.ts +0 -117
- package/config/src/enums/route-names.ts +0 -8
- package/config/src/providers/route.provider.ts +0 -82
- package/config/src/proxy/admin/domains/domain-admin.service.ts +0 -38
- package/config/src/proxy/admin/domains/models.ts +0 -9
- package/config/src/proxy/dignite/abp/data/index.ts +0 -1
- package/config/src/proxy/dignite/abp/data/models.ts +0 -4
- package/config/src/proxy/dignite/abp/index.ts +0 -2
- package/config/src/proxy/dignite/cms/admin/domains/domain-admin.service.ts +0 -47
- package/config/src/proxy/dignite/cms/admin/domains/index.ts +0 -2
- package/config/src/proxy/dignite/cms/admin/dynamic-forms/form-admin.service.ts +0 -21
- package/config/src/proxy/dignite/cms/admin/dynamic-forms/models.ts +0 -5
- package/config/src/proxy/dignite/cms/admin/entries/entry-admin.service.ts +0 -109
- package/config/src/proxy/dignite/cms/admin/entries/models.ts +0 -68
- package/config/src/proxy/dignite/cms/admin/fields/field-admin.service.ts +0 -64
- package/config/src/proxy/dignite/cms/admin/fields/field-group-admin.service.ts +0 -56
- package/config/src/proxy/dignite/cms/admin/fields/models.ts +0 -42
- package/config/src/proxy/dignite/cms/admin/index.ts +0 -7
- package/config/src/proxy/dignite/cms/admin/sections/entry-type-admin.service.ts +0 -55
- package/config/src/proxy/dignite/cms/admin/sections/models.ts +0 -81
- package/config/src/proxy/dignite/cms/admin/sections/section-admin.service.ts +0 -74
- package/config/src/proxy/dignite/cms/admin/sites/models.ts +0 -5
- package/config/src/proxy/dignite/cms/admin/sites/site-admin.service.ts +0 -30
- package/config/src/proxy/dignite/cms/entries/entry-status.enum.ts +0 -8
- package/config/src/proxy/dignite/cms/fields/index.ts +0 -1
- package/config/src/proxy/dignite/cms/fields/models.ts +0 -9
- package/config/src/proxy/dignite/cms/index.ts +0 -6
- package/config/src/proxy/dignite/cms/sections/models.ts +0 -14
- package/config/src/proxy/dignite/cms/sections/section-type.enum.ts +0 -9
- package/config/src/proxy/dignite/cms/sites/index.ts +0 -1
- package/config/src/proxy/dignite/cms/sites/models.ts +0 -5
- package/config/src/proxy/dignite/cms-kit/admin/brand/brand-admin.service.ts +0 -21
- package/config/src/proxy/dignite/cms-kit/admin/brand/index.ts +0 -2
- package/config/src/proxy/dignite/cms-kit/admin/brand/models.ts +0 -7
- package/config/src/proxy/dignite/cms-kit/admin/index.ts +0 -2
- package/config/src/proxy/dignite/cms-kit/brand/brand.service.ts +0 -20
- package/config/src/proxy/dignite/cms-kit/brand/index.ts +0 -2
- package/config/src/proxy/dignite/cms-kit/brand/models.ts +0 -7
- package/config/src/proxy/dignite/cms-kit/index.ts +0 -3
- package/config/src/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +0 -65
- package/config/src/proxy/dignite/file-explorer/directories/index.ts +0 -2
- package/config/src/proxy/dignite/file-explorer/directories/models.ts +0 -35
- package/config/src/proxy/dignite/file-explorer/files/file-descriptor.service.ts +0 -101
- package/config/src/proxy/dignite/file-explorer/files/index.ts +0 -2
- package/config/src/proxy/dignite/file-explorer/files/models.ts +0 -61
- package/config/src/proxy/dignite/file-explorer/index.ts +0 -3
- package/config/src/proxy/dignite/index.ts +0 -6
- package/config/src/proxy/dignite/travely/areas/index.ts +0 -1
- package/config/src/proxy/dignite/travely/areas/models.ts +0 -5
- package/config/src/proxy/dignite/travely/common/index.ts +0 -1
- package/config/src/proxy/dignite/travely/common/models.ts +0 -5
- package/config/src/proxy/dignite/travely/entity-snapshots/index.ts +0 -1
- package/config/src/proxy/dignite/travely/entity-snapshots/models.ts +0 -7
- package/config/src/proxy/dignite/travely/guides/index.ts +0 -1
- package/config/src/proxy/dignite/travely/guides/models.ts +0 -26
- package/config/src/proxy/dignite/travely/index.ts +0 -9
- package/config/src/proxy/dignite/travely/merchants/index.ts +0 -1
- package/config/src/proxy/dignite/travely/merchants/models.ts +0 -9
- package/config/src/proxy/dignite/travely/orders/index.ts +0 -1
- package/config/src/proxy/dignite/travely/orders/models.ts +0 -52
- package/config/src/proxy/dignite/travely/payment/index.ts +0 -1
- package/config/src/proxy/dignite/travely/payment/models.ts +0 -9
- package/config/src/proxy/dignite/travely/tours/booking-time-type.enum.ts +0 -9
- package/config/src/proxy/dignite/travely/tours/index.ts +0 -5
- package/config/src/proxy/dignite/travely/tours/models.ts +0 -77
- package/config/src/proxy/dignite/travely/tours/period-type.enum.ts +0 -9
- package/config/src/proxy/dignite/travely/tours/tour-recommendation-rank.enum.ts +0 -12
- package/config/src/proxy/dignite/travely/tours/tourist-type.enum.ts +0 -8
- package/config/src/proxy/microsoft/asp-net-core/index.ts +0 -2
- package/config/src/proxy/microsoft/asp-net-core/mvc/index.ts +0 -1
- package/config/src/proxy/microsoft/asp-net-core/mvc/models.ts +0 -12
- package/config/src/proxy/microsoft/extensions/index.ts +0 -2
- package/config/src/proxy/microsoft/extensions/primitives/index.ts +0 -1
- package/config/src/proxy/microsoft/extensions/primitives/models.ts +0 -9
- package/config/src/proxy/microsoft/index.ts +0 -4
- package/config/src/proxy/microsoft/net/http/headers/index.ts +0 -1
- package/config/src/proxy/microsoft/net/http/headers/models.ts +0 -7
- package/config/src/proxy/microsoft/net/http/index.ts +0 -2
- package/config/src/proxy/microsoft/net/index.ts +0 -2
- package/config/src/services/validators.service.ts +0 -80
- package/ng-package.json +0 -10
- package/src/lib/cms-routing.module.ts +0 -102
- package/src/lib/cms.module.ts +0 -109
- 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 -1
- 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 -318
- package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +0 -33
- package/src/lib/components/admin/entries/create.component.html +0 -13
- package/src/lib/components/admin/entries/create.component.scss +0 -1
- package/src/lib/components/admin/entries/create.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/create.component.ts +0 -110
- package/src/lib/components/admin/entries/edit.component.html +0 -9
- package/src/lib/components/admin/entries/edit.component.scss +0 -1
- package/src/lib/components/admin/entries/edit.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/edit.component.ts +0 -111
- package/src/lib/components/admin/entries/entries.component.html +0 -112
- package/src/lib/components/admin/entries/entries.component.scss +0 -1
- package/src/lib/components/admin/entries/entries.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/entries.component.ts +0 -216
- 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 -82
- package/src/lib/components/admin/fields/create-or-edit-field.component.html +0 -40
- 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 -121
- 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 -16
- 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 -101
- 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 -74
- 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-update-sections-input-base.ts +0 -32
- package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +0 -79
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +0 -187
- 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 -424
- 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 -188
- 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 -302
- package/src/lib/components/dynamic-form/entry/entry-config.component.html +0 -36
- 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 -114
- package/src/lib/components/dynamic-form/entry/entry-config.ts +0 -24
- package/src/lib/components/dynamic-form/entry/entry-control.component.html +0 -26
- package/src/lib/components/dynamic-form/entry/entry-control.component.scss +0 -1
- 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 -239
- 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 -106
- 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 -170
- 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 -114
- package/src/lib/components/index.ts +0 -2
- package/src/lib/constants/index.ts +0 -1
- package/src/lib/constants/styles.ts +0 -20
- 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/admin/domains/domain-admin.service.ts +0 -38
- package/src/lib/proxy/admin/domains/index.ts +0 -2
- package/src/lib/proxy/admin/domains/models.ts +0 -9
- package/src/lib/proxy/admin/dynamic-forms/form-admin.service.ts +0 -21
- package/src/lib/proxy/admin/dynamic-forms/index.ts +0 -2
- package/src/lib/proxy/admin/dynamic-forms/models.ts +0 -5
- package/src/lib/proxy/admin/entries/entry-admin.service.ts +0 -109
- package/src/lib/proxy/admin/entries/index.ts +0 -2
- package/src/lib/proxy/admin/entries/models.ts +0 -68
- package/src/lib/proxy/admin/fields/field-admin.service.ts +0 -64
- package/src/lib/proxy/admin/fields/field-group-admin.service.ts +0 -56
- package/src/lib/proxy/admin/fields/index.ts +0 -3
- package/src/lib/proxy/admin/index.ts +0 -7
- package/src/lib/proxy/admin/sections/entry-type-admin.service.ts +0 -55
- package/src/lib/proxy/admin/sections/index.ts +0 -3
- package/src/lib/proxy/admin/sections/section-admin.service.ts +0 -74
- package/src/lib/proxy/admin/settings/site-settings-admin.service.ts +0 -37
- 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 -2
- package/src/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +0 -65
- package/src/lib/proxy/dignite/file-explorer/directories/index.ts +0 -2
- package/src/lib/proxy/dignite/file-explorer/directories/models.ts +0 -35
- package/src/lib/proxy/dignite/file-explorer/files/file-descriptor.service.ts +0 -86
- package/src/lib/proxy/dignite/file-explorer/files/index.ts +0 -2
- package/src/lib/proxy/dignite/file-explorer/files/models.ts +0 -58
- package/src/lib/proxy/dignite/file-explorer/index.ts +0 -3
- package/src/lib/proxy/dignite/index.ts +0 -3
- package/src/lib/proxy/entries/entry-status.enum.ts +0 -8
- package/src/lib/proxy/entries/index.ts +0 -1
- package/src/lib/proxy/fields/index.ts +0 -1
- package/src/lib/proxy/fields/models.ts +0 -9
- package/src/lib/proxy/generate-proxy.json +0 -11425
- package/src/lib/proxy/index.ts +0 -9
- package/src/lib/proxy/microsoft/asp-net-core/index.ts +0 -2
- package/src/lib/proxy/microsoft/asp-net-core/mvc/index.ts +0 -1
- package/src/lib/proxy/microsoft/asp-net-core/mvc/models.ts +0 -12
- package/src/lib/proxy/microsoft/extensions/index.ts +0 -2
- package/src/lib/proxy/microsoft/extensions/primitives/index.ts +0 -1
- package/src/lib/proxy/microsoft/extensions/primitives/models.ts +0 -9
- package/src/lib/proxy/microsoft/index.ts +0 -4
- package/src/lib/proxy/microsoft/net/http/headers/index.ts +0 -1
- package/src/lib/proxy/microsoft/net/http/headers/models.ts +0 -7
- package/src/lib/proxy/microsoft/net/http/index.ts +0 -2
- package/src/lib/proxy/microsoft/net/index.ts +0 -2
- package/src/lib/proxy/sections/index.ts +0 -2
- package/src/lib/proxy/sections/models.ts +0 -14
- package/src/lib/proxy/sections/section-type.enum.ts +0 -9
- package/src/lib/proxy/settings/index.ts +0 -1
- package/src/lib/proxy/settings/models.ts +0 -6
- package/src/lib/proxy/volo/abp/content/index.ts +0 -1
- package/src/lib/proxy/volo/abp/content/models.ts +0 -6
- package/src/lib/proxy/volo/abp/index.ts +0 -2
- 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 -3
- package/src/lib/resolvers/extensions-props-action-token.resolver.ts +0 -178
- package/src/lib/resolvers/page-default-toolbar-actions.ts +0 -170
- package/src/lib/resolvers/table-default-entity-actions.ts +0 -24
- package/src/lib/resolvers/table-default-entity-props.ts +0 -36
- package/src/lib/services/appent-content.ts +0 -13
- package/src/lib/services/cms-api.service.ts +0 -71
- package/src/lib/services/cms.service.ts +0 -18
- package/src/lib/services/field-abstracts.service.ts +0 -40
- package/src/lib/services/index.ts +0 -4
- package/src/lib/services/simple-reuse-strategy.ts +0 -74
- package/src/lib/services/update-list.service.ts +0 -15
- package/src/lib/services/validators.service.ts +0 -82
- 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/config/{src/proxy/admin/domains/index.ts → proxy/admin/domains/index.d.ts} +0 -0
- /package/config/{src/proxy/dignite/cms/admin/sites/index.ts → proxy/dignite/cms/admin/sites/index.d.ts} +0 -0
- /package/{config/src/proxy/dignite/cms/admin/dynamic-forms/index.ts → lib/proxy/admin/dynamic-forms/index.d.ts} +0 -0
- /package/{config/src/proxy/dignite/cms/admin/entries/index.ts → lib/proxy/admin/entries/index.d.ts} +0 -0
- /package/{config/src/proxy/dignite/cms/admin/fields/index.ts → lib/proxy/admin/fields/index.d.ts} +0 -0
- /package/{config/src/proxy/dignite/cms/admin/sections/index.ts → lib/proxy/admin/sections/index.d.ts} +0 -0
- /package/{src/lib/proxy/admin/settings/index.ts → lib/proxy/admin/settings/index.d.ts} +0 -0
- /package/{config/src/proxy/dignite/cms/entries/index.ts → lib/proxy/entries/index.d.ts} +0 -0
- /package/{config/src/proxy/dignite/cms/sections/index.ts → lib/proxy/sections/index.d.ts} +0 -0
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import { EXTENSIONS_IDENTIFIER } from '@abp/ng.components/extensible';
|
|
2
|
-
import {
|
|
3
|
-
ABP,
|
|
4
|
-
LIST_QUERY_DEBOUNCE_TIME,
|
|
5
|
-
ListService,
|
|
6
|
-
LocalizationService,
|
|
7
|
-
PagedResultDto,
|
|
8
|
-
} from '@abp/ng.core';
|
|
9
|
-
import { Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
|
|
10
|
-
import { ECmsComponent } from '../../../enums';
|
|
11
|
-
import { ToasterService, ConfirmationService, Confirmation } from '@abp/ng.theme.shared';
|
|
12
|
-
import { AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
|
|
13
|
-
import { SectionAdminService, EntryTypeAdminService, GetSectionsInput, SectionDto } from '../../../proxy/admin/sections';
|
|
14
|
-
import { CmsApiService } from '../../../services';
|
|
15
|
-
import { UpdateListService } from '../../../services/update-list.service';
|
|
16
|
-
|
|
17
|
-
import { ColumnMode } from '@swimlane/ngx-datatable';
|
|
18
|
-
import { SectionType, sectionTypeOptions } from '../../../proxy/sections';
|
|
19
|
-
import { finalize, Observable } from 'rxjs';
|
|
20
|
-
import { CreateOrUpdateSectionsInputBase } from './create-or-update-sections-input-base';
|
|
21
|
-
import { ValidatorsService } from '../../../services/validators.service';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@Component({
|
|
25
|
-
selector: 'cms-sections',
|
|
26
|
-
templateUrl: './sections.component.html',
|
|
27
|
-
styleUrls: ['./sections.component.scss'],
|
|
28
|
-
providers: [
|
|
29
|
-
// [Required]
|
|
30
|
-
ListService,
|
|
31
|
-
// [Optional]
|
|
32
|
-
// Provide this token if you want a different debounce time.
|
|
33
|
-
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
34
|
-
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
|
|
35
|
-
{
|
|
36
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
37
|
-
useValue: ECmsComponent.Sections,
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
})
|
|
41
|
-
export class SectionsComponent implements OnInit {
|
|
42
|
-
|
|
43
|
-
constructor(
|
|
44
|
-
public readonly list: ListService,
|
|
45
|
-
private _SectionAdminService: SectionAdminService,
|
|
46
|
-
private toaster: ToasterService,
|
|
47
|
-
private confirmation: ConfirmationService,
|
|
48
|
-
private fb: FormBuilder,
|
|
49
|
-
public _EntryTypeAdminService: EntryTypeAdminService,
|
|
50
|
-
public _LocalizationService: LocalizationService,
|
|
51
|
-
public _CmsApiService: CmsApiService
|
|
52
|
-
) {}
|
|
53
|
-
private _UpdateListService = inject(UpdateListService);
|
|
54
|
-
siteList: any[] = [];
|
|
55
|
-
ColumnMode = ColumnMode;
|
|
56
|
-
data: PagedResultDto<SectionDto> = { items: [], totalCount: 0 };
|
|
57
|
-
filters = {} as GetSectionsInput;
|
|
58
|
-
hookToQuery() {
|
|
59
|
-
const getData = (query: ABP.PageQueryParams) =>
|
|
60
|
-
this._SectionAdminService.getList({ ...query, ...this.filters });
|
|
61
|
-
const setData = (list: PagedResultDto<SectionDto>) => (this.data = list);
|
|
62
|
-
this.list.hookToQuery(getData).subscribe(setData);
|
|
63
|
-
}
|
|
64
|
-
async ngOnInit(): Promise<void> {
|
|
65
|
-
this.hookToQuery();
|
|
66
|
-
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
67
|
-
this.list.get();
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
siteIdChange() {
|
|
71
|
-
this.list.page = 0;
|
|
72
|
-
this.list.get();
|
|
73
|
-
}
|
|
74
|
-
visibleOpen: boolean = false;
|
|
75
|
-
modalBusy: boolean = false;
|
|
76
|
-
createOrEditForm: FormGroup | undefined;
|
|
77
|
-
selected: any;
|
|
78
|
-
_SectionType = SectionType;
|
|
79
|
-
_sectionTypeOptions = sectionTypeOptions;
|
|
80
|
-
@ViewChild('createOrEditModalSubmitBtn', { static: false })
|
|
81
|
-
createOrEditModalSubmitBtn: ElementRef;
|
|
82
|
-
VisibleChange(event) {
|
|
83
|
-
if (!event) {
|
|
84
|
-
this.selected = '';
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
createSectionBtn() {
|
|
89
|
-
this.visibleOpen = true;
|
|
90
|
-
this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase());
|
|
91
|
-
this.setAsyncValidatorsFn();
|
|
92
|
-
}
|
|
93
|
-
editSectionBtn(row) {
|
|
94
|
-
this.visibleOpen = true;
|
|
95
|
-
this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase());
|
|
96
|
-
this.setAsyncValidatorsFn();
|
|
97
|
-
this._SectionAdminService.get(row.id).subscribe(res => {
|
|
98
|
-
this.createOrEditForm.patchValue(res);
|
|
99
|
-
this.selected = res;
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
deleteEntryType(row) {
|
|
103
|
-
this.confirmation
|
|
104
|
-
.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`))
|
|
105
|
-
.subscribe((status: Confirmation.Status) => {
|
|
106
|
-
if (status == 'confirm') {
|
|
107
|
-
this._EntryTypeAdminService
|
|
108
|
-
.delete(row.id)
|
|
109
|
-
.pipe(finalize(() => {}))
|
|
110
|
-
.subscribe(res => {
|
|
111
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
|
|
112
|
-
this.list.get();
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
createOrEditSave() {
|
|
118
|
-
if (this.selected) {
|
|
119
|
-
return this.EditSave();
|
|
120
|
-
}
|
|
121
|
-
this.createSave();
|
|
122
|
-
}
|
|
123
|
-
private _ValidatorsService = inject(ValidatorsService);
|
|
124
|
-
/**表单验证状态
|
|
125
|
-
* {
|
|
126
|
-
* title:true,
|
|
127
|
-
* }
|
|
128
|
-
*/
|
|
129
|
-
formValidation: any = '';
|
|
130
|
-
|
|
131
|
-
createSave() {
|
|
132
|
-
let input = this.createOrEditForm.value;
|
|
133
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createOrEditForm);
|
|
134
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation,'Cms')) return;
|
|
135
|
-
if (!this.createOrEditForm.valid) return;
|
|
136
|
-
this.modalBusy = true;
|
|
137
|
-
this._SectionAdminService
|
|
138
|
-
.create(input)
|
|
139
|
-
.pipe(
|
|
140
|
-
finalize(() => {
|
|
141
|
-
this.modalBusy = false;
|
|
142
|
-
this.visibleOpen = false;
|
|
143
|
-
})
|
|
144
|
-
)
|
|
145
|
-
.subscribe(res => {
|
|
146
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
|
|
147
|
-
this.list.get();
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
EditSave() {
|
|
151
|
-
setTimeout(() => {
|
|
152
|
-
let input = this.createOrEditForm.value;
|
|
153
|
-
input.concurrencyStamp = this.selected.concurrencyStamp;
|
|
154
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createOrEditForm);
|
|
155
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation,'Cms')) return;
|
|
156
|
-
if (!this.createOrEditForm.valid) return;
|
|
157
|
-
this.modalBusy = true;
|
|
158
|
-
this._SectionAdminService
|
|
159
|
-
.update(this.selected.id, input)
|
|
160
|
-
.pipe(
|
|
161
|
-
finalize(() => {
|
|
162
|
-
this.modalBusy = false;
|
|
163
|
-
this.visibleOpen = false;
|
|
164
|
-
})
|
|
165
|
-
)
|
|
166
|
-
.subscribe(res => {
|
|
167
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
|
|
168
|
-
this.list.get();
|
|
169
|
-
});
|
|
170
|
-
}, 100);
|
|
171
|
-
}
|
|
172
|
-
deletefield(row) {
|
|
173
|
-
this.confirmation
|
|
174
|
-
.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`))
|
|
175
|
-
.subscribe((status: Confirmation.Status) => {
|
|
176
|
-
if (status == 'confirm') {
|
|
177
|
-
this._SectionAdminService
|
|
178
|
-
.delete(row.id)
|
|
179
|
-
.pipe(finalize(() => {}))
|
|
180
|
-
.subscribe(res => {
|
|
181
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
|
|
182
|
-
this.list.get();
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
get displayNameInput() {
|
|
188
|
-
return this.createOrEditForm.get('displayName');
|
|
189
|
-
}
|
|
190
|
-
get nameInput() {
|
|
191
|
-
return this.createOrEditForm.get('name');
|
|
192
|
-
}
|
|
193
|
-
get routeInput() {
|
|
194
|
-
return this.createOrEditForm.get('route');
|
|
195
|
-
}
|
|
196
|
-
get templateInput() {
|
|
197
|
-
return this.createOrEditForm.get('template');
|
|
198
|
-
}
|
|
199
|
-
get typeInput() {
|
|
200
|
-
return this.createOrEditForm.get('type');
|
|
201
|
-
}
|
|
202
|
-
radiochange() {
|
|
203
|
-
this.routeInput.patchValue(this.routeInput.value);
|
|
204
|
-
}
|
|
205
|
-
disPlayNameInputBlur(event) {
|
|
206
|
-
let value = event.target.value;
|
|
207
|
-
let pinyin = this._CmsApiService.chineseToPinyin(value);
|
|
208
|
-
let nameInput = this.nameInput;
|
|
209
|
-
let routeInput = this.routeInput;
|
|
210
|
-
let templateInput = this.templateInput;
|
|
211
|
-
if (nameInput.value) return;
|
|
212
|
-
nameInput.patchValue(pinyin);
|
|
213
|
-
if (routeInput.value) return;
|
|
214
|
-
routeInput.patchValue(pinyin + (this.typeInput.value === 0 ? '' : '/{slug}'));
|
|
215
|
-
if (templateInput.value) return;
|
|
216
|
-
templateInput.patchValue(pinyin + '/index');
|
|
217
|
-
}
|
|
218
|
-
setAsyncValidatorsFn() {
|
|
219
|
-
this.createOrEditForm.setControl(
|
|
220
|
-
'name',
|
|
221
|
-
new FormControl(this.nameInput.value || '', {
|
|
222
|
-
validators: Validators.required,
|
|
223
|
-
asyncValidators: this.nameRepetitionAsyncValidator(),
|
|
224
|
-
})
|
|
225
|
-
);
|
|
226
|
-
this.createOrEditForm.setControl(
|
|
227
|
-
'route',
|
|
228
|
-
new FormControl(this.routeInput.value || '', {
|
|
229
|
-
validators: [Validators.required, this.forbiddenNameValidator()],
|
|
230
|
-
asyncValidators: [this.routeRepetitionAsyncValidator()],
|
|
231
|
-
})
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
forbiddenNameValidator(): ValidatorFn {
|
|
235
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
236
|
-
let inputValue = control.value.toLocaleLowerCase();
|
|
237
|
-
let forbidden =
|
|
238
|
-
this.typeInput.value == 0 ? false : inputValue.includes('{slug}') ? false : true;
|
|
239
|
-
return forbidden
|
|
240
|
-
? {
|
|
241
|
-
repetition: this._LocalizationService.instant(
|
|
242
|
-
`Cms::RouteVerificationTips`,
|
|
243
|
-
this._LocalizationService.instant(
|
|
244
|
-
`Cms::Enum:SectionType:` + SectionType[this.typeInput.value]
|
|
245
|
-
),
|
|
246
|
-
'{slug}'
|
|
247
|
-
),
|
|
248
|
-
}
|
|
249
|
-
: null;
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
nameRepetitionAsyncValidator() {
|
|
253
|
-
return (
|
|
254
|
-
ctrl: AbstractControl
|
|
255
|
-
): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
|
|
256
|
-
return new Promise(resolve => {
|
|
257
|
-
let subslug = this.createOrEditForm?.get('name');
|
|
258
|
-
if (subslug.value == this.selected?.name) {
|
|
259
|
-
resolve(null);
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
this._SectionAdminService.nameExists({ name: subslug.value }).subscribe(res => {
|
|
263
|
-
if (res) {
|
|
264
|
-
resolve({
|
|
265
|
-
repetition: this._LocalizationService.instant(
|
|
266
|
-
`Cms::SectionName{0}AlreadyExist`,
|
|
267
|
-
ctrl.value
|
|
268
|
-
),
|
|
269
|
-
});
|
|
270
|
-
} else {
|
|
271
|
-
resolve(null);
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
routeRepetitionAsyncValidator() {
|
|
278
|
-
return (
|
|
279
|
-
ctrl: AbstractControl
|
|
280
|
-
): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
|
|
281
|
-
return new Promise(resolve => {
|
|
282
|
-
let subslug = this.createOrEditForm?.get('route').value;
|
|
283
|
-
if (subslug == this.selected?.route) {
|
|
284
|
-
resolve(null);
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
this._SectionAdminService.routeExists({ route: subslug }).subscribe(res => {
|
|
288
|
-
if (res) {
|
|
289
|
-
resolve({
|
|
290
|
-
repetition: this._LocalizationService.instant(
|
|
291
|
-
`Cms::SectionRoute{0}AlreadyExist`,
|
|
292
|
-
ctrl.value
|
|
293
|
-
),
|
|
294
|
-
});
|
|
295
|
-
} else {
|
|
296
|
-
resolve(null);
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!-- <div class="mb-2">
|
|
2
|
-
<label class="form-label">{{'Cms::Sites' | abpLocalization}}</label>
|
|
3
|
-
<select class="form-select col-auto" [(ngModel)]="siteId" (change)="siteIdChange()">
|
|
4
|
-
<ng-container *ngFor="let item of siteList">
|
|
5
|
-
<option [value]="item.id">{{item.displayName}}</option>
|
|
6
|
-
</ng-container>
|
|
7
|
-
</select>
|
|
8
|
-
</div> -->
|
|
9
|
-
<form [formGroup]="_Entity">
|
|
10
|
-
<div formGroupName="formConfiguration">
|
|
11
|
-
|
|
12
|
-
<div class="mb-2">
|
|
13
|
-
<label class="form-label">{{'Cms::Sections' | abpLocalization}}</label>
|
|
14
|
-
<select class="form-select col-auto" formControlName="Entry.SectionId">
|
|
15
|
-
<ng-container *ngFor="let item of SiteOfSectionList">
|
|
16
|
-
<option [value]="item.id">{{item.displayName}}</option>
|
|
17
|
-
</ng-container>
|
|
18
|
-
</select>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div class="mb-2">
|
|
22
|
-
<div class="form-check form-check-inline">
|
|
23
|
-
<input class="form-check-input" type="checkbox" formControlName="Entry.Multiple" id="Multiple">
|
|
24
|
-
<label class="form-check-label" for="Multiple">
|
|
25
|
-
{{'Cms::Multiple' | abpLocalization}}
|
|
26
|
-
</label>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="mb-2">
|
|
30
|
-
<label class="form-label">{{'Cms::Placeholder' | abpLocalization}}</label>
|
|
31
|
-
<input type="text" class="form-control" formControlName="Entry.Placeholder">
|
|
32
|
-
</div>
|
|
33
|
-
<button type="submit" (abpInit)="submitclick?.nativeElement?.click()" style="display: none;"
|
|
34
|
-
#submitclick></button>
|
|
35
|
-
</div>
|
|
36
|
-
</form>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
:ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
2
|
-
background-color: transparent !important;
|
|
3
|
-
border: none !important;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
:ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
7
|
-
border-color: transparent !important;
|
|
8
|
-
box-shadow: none !important;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.selectclassliveview {
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
::ng-deep.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
|
|
16
|
-
border-color: transparent;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
::ng-deep.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
20
|
-
border-color: transparent;
|
|
21
|
-
box-shadow: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
::ng-deep.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
25
|
-
background: transparent;
|
|
26
|
-
border: 1px solid transparent;
|
|
27
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { EntryConfigComponent } from './entry-config.component';
|
|
4
|
-
|
|
5
|
-
describe('EntryConfigComponent', () => {
|
|
6
|
-
let component: EntryConfigComponent;
|
|
7
|
-
let fixture: ComponentFixture<EntryConfigComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [EntryConfigComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(EntryConfigComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { AfterContentInit, Component, ElementRef, Input, ViewChild } from '@angular/core';
|
|
2
|
-
import { FormBuilder, FormControl, FormGroup} from '@angular/forms';
|
|
3
|
-
import { EntryConfig } from './entry-config';
|
|
4
|
-
import { SectionAdminService } from '../../../proxy/admin/sections';
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'cms-entry-config',
|
|
7
|
-
templateUrl: './entry-config.component.html',
|
|
8
|
-
styleUrls: ['./entry-config.component.scss']
|
|
9
|
-
})
|
|
10
|
-
export class EntryConfigComponent implements AfterContentInit{
|
|
11
|
-
constructor(
|
|
12
|
-
private fb: FormBuilder,
|
|
13
|
-
// private _SiteAdminService: SiteAdminService,
|
|
14
|
-
private _SectionAdminService: SectionAdminService,
|
|
15
|
-
) {
|
|
16
|
-
}
|
|
17
|
-
/**表单控件类型 */
|
|
18
|
-
_type: any
|
|
19
|
-
@Input()
|
|
20
|
-
public set type(v: any) {
|
|
21
|
-
if (v == this._type) return
|
|
22
|
-
|
|
23
|
-
this._type = v
|
|
24
|
-
}
|
|
25
|
-
/**表单实体 */
|
|
26
|
-
_Entity: FormGroup | undefined
|
|
27
|
-
@Input()
|
|
28
|
-
public set Entity(v: FormGroup) {
|
|
29
|
-
this._Entity = v;
|
|
30
|
-
}
|
|
31
|
-
/**选择的表单信息 */
|
|
32
|
-
_selected: any
|
|
33
|
-
@Input()
|
|
34
|
-
public set selected(v: any) {
|
|
35
|
-
this._selected = v
|
|
36
|
-
}
|
|
37
|
-
/**语言 */
|
|
38
|
-
_culture: any
|
|
39
|
-
@Input()
|
|
40
|
-
public set culture(v: any) {
|
|
41
|
-
this._culture = v
|
|
42
|
-
}
|
|
43
|
-
get formConfiguration() {
|
|
44
|
-
return this._Entity.get('formConfiguration') as FormGroup
|
|
45
|
-
}
|
|
46
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
47
|
-
|
|
48
|
-
/**站点列表 */
|
|
49
|
-
siteList: any[any] = []
|
|
50
|
-
|
|
51
|
-
/**选择的站点id */
|
|
52
|
-
// siteId: string = ''
|
|
53
|
-
siteId: any = new FormControl('')
|
|
54
|
-
/**站点下的版块 */
|
|
55
|
-
SiteOfSectionList: any[any] = []
|
|
56
|
-
|
|
57
|
-
ngAfterContentInit(): void {
|
|
58
|
-
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
59
|
-
//Add 'implements AfterContentInit' to the class.
|
|
60
|
-
this.dataLoaded(2)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
async dataLoaded(val) {
|
|
64
|
-
if (this._Entity && this._type) {
|
|
65
|
-
await this.AfterInit()
|
|
66
|
-
this.submitclick.nativeElement.click();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
AfterInit() {
|
|
71
|
-
return new Promise(async (resolve, rejects) => {
|
|
72
|
-
this._Entity.setControl('formConfiguration', this.fb.group(new EntryConfig()))
|
|
73
|
-
// await this.getsiteList()
|
|
74
|
-
await this.getSiteOfSectionList()
|
|
75
|
-
if (this._selected) {
|
|
76
|
-
this.formConfiguration.patchValue({
|
|
77
|
-
...this._selected.formConfiguration
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
|
-
resolve(true)
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**获取站点列表 */
|
|
85
|
-
// getsiteList() {
|
|
86
|
-
// return new Promise((resolve, rejects) => {
|
|
87
|
-
// this._SiteAdminService.getList({}).subscribe(res => {
|
|
88
|
-
// this.siteList = res.items
|
|
89
|
-
// this.siteId = res.items[0]?.id || ''
|
|
90
|
-
// resolve(res.items)
|
|
91
|
-
// })
|
|
92
|
-
// })
|
|
93
|
-
// }
|
|
94
|
-
/**获取站点下的版块 */
|
|
95
|
-
getSiteOfSectionList() {
|
|
96
|
-
return new Promise((resolve, rejects) => {
|
|
97
|
-
this._SectionAdminService.getList({
|
|
98
|
-
maxResultCount: 1000,
|
|
99
|
-
// siteId: this.siteId
|
|
100
|
-
}).subscribe(res => {
|
|
101
|
-
this.SiteOfSectionList = res.items
|
|
102
|
-
this.formConfiguration.patchValue({
|
|
103
|
-
'Entry.SectionId': res.items[0]?.id || ''
|
|
104
|
-
})
|
|
105
|
-
resolve(res.items)
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**切换站点 */
|
|
111
|
-
async siteIdChange() {
|
|
112
|
-
await this.getSiteOfSectionList()
|
|
113
|
-
}
|
|
114
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FormControl, Validators } from "@angular/forms";
|
|
2
|
-
|
|
3
|
-
export class EntryConfig {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**多选 */
|
|
7
|
-
'Entry.Multiple': any = [false, []];
|
|
8
|
-
/**占位符 */
|
|
9
|
-
'Entry.Placeholder': any = ['', []];
|
|
10
|
-
/**版块id */
|
|
11
|
-
'Entry.SectionId': any = ['', []];
|
|
12
|
-
|
|
13
|
-
constructor(data?: EntryConfig) {
|
|
14
|
-
if (data) {
|
|
15
|
-
for (const key in data) {
|
|
16
|
-
if (data.hasOwnProperty(key)) {
|
|
17
|
-
this[key] = data[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<form [formGroup]="_entity">
|
|
2
|
-
<div [formGroupName]="_parentFiledName" class="entry-control-page">
|
|
3
|
-
<div class="mb-2">
|
|
4
|
-
<label class="form-label" *ngIf="_fields.displayName">{{ _fields.displayName }}</label>
|
|
5
|
-
<ng-container *ngIf="_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate">
|
|
6
|
-
<div class="form-select">
|
|
7
|
-
<nz-select [nzMaxTagCount]="5" (nzOnSearch)="SelectChange($event)" nzShowSearch nzMode="multiple" [nzPlaceHolder]="_fields.field.formConfiguration['Entry.Placeholder']"
|
|
8
|
-
formControlName="{{_fields.field.name}}">
|
|
9
|
-
<nz-option *ngFor="let item of listOfOption" [nzLabel]="item.title" [nzValue]="item.id"></nz-option>
|
|
10
|
-
</nz-select>
|
|
11
|
-
</div>
|
|
12
|
-
</ng-container>
|
|
13
|
-
<ng-template #elseTemplate>
|
|
14
|
-
<div class="form-select">
|
|
15
|
-
<nz-select nzShowSearch (nzOnSearch)="SelectChange($event)" [nzMaxMultipleCount]="1" nzMode="multiple" [nzPlaceHolder]="_fields.field.formConfiguration['Entry.Placeholder']"
|
|
16
|
-
formControlName="{{_fields.field.name}}">
|
|
17
|
-
<nz-option *ngFor="let item of listOfOption" [nzLabel]="item.title" [nzValue]="item.id"></nz-option>
|
|
18
|
-
</nz-select>
|
|
19
|
-
</div>
|
|
20
|
-
</ng-template>
|
|
21
|
-
|
|
22
|
-
<div class="form-text" *ngIf="_fields.field.description">{{_fields.field.description}}</div>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<button type="submit" style="display: none;" #submitclick></button>
|
|
26
|
-
</form>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
::ng-deep .entry-control-page{.form-select{padding:0}nz-select{width:100%;.ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}.anticon-search,.anticon-down{display:none}}}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { EntryControlComponent } from './entry-control.component';
|
|
4
|
-
|
|
5
|
-
describe('EntryControlComponent', () => {
|
|
6
|
-
let component: EntryControlComponent;
|
|
7
|
-
let fixture: ComponentFixture<EntryControlComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [EntryControlComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(EntryControlComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @angular-eslint/component-selector */
|
|
2
|
-
import { Component, ElementRef, Input, ViewChild, inject } from '@angular/core';
|
|
3
|
-
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
4
|
-
import { EntryAdminService } from '../../../proxy/admin/entries';
|
|
5
|
-
import { EntryStatus } from '../../../proxy/entries/entry-status.enum';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'cms-entry-control',
|
|
10
|
-
templateUrl: './entry-control.component.html',
|
|
11
|
-
styleUrls: ['./entry-control.component.scss']
|
|
12
|
-
})
|
|
13
|
-
export class EntryControlComponent {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
) {
|
|
18
|
-
}
|
|
19
|
-
private fb=inject(FormBuilder)
|
|
20
|
-
private _EntryAdminService=inject(EntryAdminService)
|
|
21
|
-
|
|
22
|
-
/**表单实体 */
|
|
23
|
-
_entity: FormGroup | undefined
|
|
24
|
-
@Input()
|
|
25
|
-
public set entity(v: any) {
|
|
26
|
-
this._entity = v;
|
|
27
|
-
|
|
28
|
-
if (v) this.dataLoaded()
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**字段配置列表 */
|
|
32
|
-
_fields: any = ''
|
|
33
|
-
@Input()
|
|
34
|
-
public set fields(v: any) {
|
|
35
|
-
this._fields = v;
|
|
36
|
-
if (v) this.dataLoaded()
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
40
|
-
_parentFiledName: any
|
|
41
|
-
@Input()
|
|
42
|
-
public set parentFiledName(v: any) {
|
|
43
|
-
this._parentFiledName = v;
|
|
44
|
-
if (v) this.dataLoaded()
|
|
45
|
-
}
|
|
46
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
47
|
-
_selected: any
|
|
48
|
-
@Input()
|
|
49
|
-
public set selected(v: any) {
|
|
50
|
-
this._selected = v || [];
|
|
51
|
-
if (v) this.dataLoaded()
|
|
52
|
-
}
|
|
53
|
-
/**语言 */
|
|
54
|
-
_culture: any
|
|
55
|
-
@Input()
|
|
56
|
-
public set culture(v: any) {
|
|
57
|
-
if (v) {
|
|
58
|
-
this._culture = v ;
|
|
59
|
-
this.dataLoaded()
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
63
|
-
|
|
64
|
-
extraProperties: FormGroup | undefined
|
|
65
|
-
|
|
66
|
-
/** */
|
|
67
|
-
listOfOption: any[] = [];
|
|
68
|
-
async dataLoaded() {
|
|
69
|
-
if (this._fields && this._entity && this._parentFiledName&&this._culture) {
|
|
70
|
-
|
|
71
|
-
await this.AfterInit()
|
|
72
|
-
await this.getEntryAssignList()
|
|
73
|
-
this.submitclick.nativeElement.click();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
AfterInit() {
|
|
78
|
-
return new Promise((resolve, rejects) => {
|
|
79
|
-
let ValidatorsArray = []
|
|
80
|
-
if (this._fields.required) {
|
|
81
|
-
ValidatorsArray.push(Validators.required)
|
|
82
|
-
}
|
|
83
|
-
let newControl = this.fb.control(this._selected, ValidatorsArray)
|
|
84
|
-
let extraProperties = this._entity.get(this._parentFiledName) as FormGroup
|
|
85
|
-
extraProperties.setControl(this._fields.field.name, newControl)
|
|
86
|
-
resolve(true)
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**获取对应的条目 */
|
|
91
|
-
getEntryAssignList(filter = '') {
|
|
92
|
-
return new Promise((resolve, rejects) => {
|
|
93
|
-
this._EntryAdminService.getList({
|
|
94
|
-
culture: this._culture,
|
|
95
|
-
sectionId: this._fields.field.formConfiguration['Entry.SectionId'],
|
|
96
|
-
skipCount: 0,
|
|
97
|
-
maxResultCount: 30,
|
|
98
|
-
status: EntryStatus.Published,
|
|
99
|
-
filter: filter
|
|
100
|
-
}).subscribe(res => {
|
|
101
|
-
this.listOfOption = res.items
|
|
102
|
-
resolve(true)
|
|
103
|
-
})
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** */
|
|
108
|
-
async SelectChange(event) {
|
|
109
|
-
await this.getEntryAssignList(event)
|
|
110
|
-
}
|
|
111
|
-
}
|