@dignite-ng/expand.cms 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/ng-package.json +7 -0
- package/config/src/cms-config.module.ts +12 -0
- package/config/{enums/index.d.ts → src/enums/index.ts} +1 -1
- package/config/src/enums/route-names.ts +8 -0
- package/config/{providers/index.d.ts → src/providers/index.ts} +1 -1
- package/config/src/providers/route.provider.ts +66 -0
- package/config/{public-api.d.ts → src/public-api.ts} +3 -3
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +19 -38
- package/src/lib/cms-routing.module.ts +111 -0
- package/src/lib/cms.module.ts +119 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.html +115 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.scss +25 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/create-or-edit-entries.component.ts +287 -0
- package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +36 -0
- package/src/lib/components/admin/entries/create.component.html +13 -0
- package/src/lib/components/admin/entries/create.component.scss +21 -0
- package/src/lib/components/admin/entries/create.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/create.component.ts +103 -0
- package/src/lib/components/admin/entries/edit.component.html +9 -0
- package/src/lib/components/admin/entries/edit.component.scss +26 -0
- package/src/lib/components/admin/entries/edit.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/edit.component.ts +103 -0
- package/src/lib/components/admin/entries/entries.component.html +106 -0
- package/src/lib/components/admin/entries/entries.component.scss +80 -0
- package/src/lib/components/admin/entries/entries.component.spec.ts +21 -0
- package/src/lib/components/admin/entries/entries.component.ts +216 -0
- package/src/lib/components/admin/entries/index.ts +4 -0
- package/src/lib/components/admin/fields/create-field.component.html +12 -0
- package/src/lib/components/admin/fields/create-field.component.scss +10 -0
- package/src/lib/components/admin/fields/create-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/create-field.component.ts +68 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.html +39 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.ts +119 -0
- package/src/lib/components/admin/fields/create-or-update-field-input-base.ts +33 -0
- package/src/lib/components/admin/fields/edit-field.component.html +13 -0
- package/src/lib/components/admin/fields/edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/edit-field.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/edit-field.component.ts +100 -0
- package/src/lib/components/admin/fields/field-group.component.html +69 -0
- package/src/lib/components/admin/fields/field-group.component.scss +0 -0
- package/src/lib/components/admin/fields/field-group.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/field-group.component.ts +132 -0
- package/src/lib/components/admin/fields/fields.component.html +73 -0
- package/src/lib/components/admin/fields/fields.component.scss +11 -0
- package/src/lib/components/admin/fields/fields.component.spec.ts +21 -0
- package/src/lib/components/admin/fields/fields.component.ts +111 -0
- package/src/lib/components/admin/fields/index.ts +6 -0
- package/src/lib/components/admin/index.ts +4 -0
- package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +36 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +79 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +191 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +24 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.spec.ts +21 -0
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.ts +412 -0
- package/src/lib/components/admin/sections/entry-types/index.ts +2 -0
- package/src/lib/components/admin/sections/index.ts +3 -0
- package/src/lib/components/admin/sections/sections.component.html +191 -0
- package/src/lib/components/admin/sections/sections.component.scss +26 -0
- package/src/lib/components/admin/sections/sections.component.spec.ts +21 -0
- package/src/lib/components/admin/sections/sections.component.ts +334 -0
- package/src/lib/components/admin/sites/create-or-update-sites-input-base.ts +31 -0
- package/src/lib/components/admin/sites/index.ts +2 -0
- package/src/lib/components/admin/sites/sites.component.html +154 -0
- package/src/lib/components/admin/sites/sites.component.scss +19 -0
- package/src/lib/components/admin/sites/sites.component.spec.ts +21 -0
- package/src/lib/components/admin/sites/sites.component.ts +293 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.html +36 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.scss +0 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/entry/entry-config.component.ts +115 -0
- package/src/lib/components/dynamic-form/entry/entry-config.ts +24 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.html +26 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.scss +20 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/entry/entry-control.component.ts +110 -0
- package/src/lib/components/dynamic-form/entry/index.ts +3 -0
- package/src/lib/components/dynamic-form/form-control-group.ts +31 -0
- package/src/lib/components/dynamic-form/index.ts +4 -0
- package/src/lib/components/dynamic-form/matrix/index.ts +3 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.html +147 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.scss +0 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.component.ts +238 -0
- package/src/lib/components/dynamic-form/matrix/matrix-config.ts +63 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.html +42 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.scss +0 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/matrix/matrix-control.component.ts +104 -0
- package/src/lib/components/dynamic-form/table/index.ts +3 -0
- package/src/lib/components/dynamic-form/table/table-config.component.html +85 -0
- package/src/lib/components/dynamic-form/table/table-config.component.scss +10 -0
- package/src/lib/components/dynamic-form/table/table-config.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/table/table-config.component.ts +170 -0
- package/src/lib/components/dynamic-form/table/table-config.ts +45 -0
- package/src/lib/components/dynamic-form/table/table-control.component.html +55 -0
- package/src/lib/components/dynamic-form/table/table-control.component.scss +10 -0
- package/src/lib/components/dynamic-form/table/table-control.component.spec.ts +21 -0
- package/src/lib/components/dynamic-form/table/table-control.component.ts +107 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/constants/index.ts +1 -0
- package/src/lib/constants/styles.ts +31 -0
- package/src/lib/enums/ecms-component.ts +11 -0
- package/src/lib/enums/index.ts +1 -0
- package/src/lib/proxy/README.md +17 -0
- package/src/lib/proxy/admin/dynamic-forms/form-admin.service.ts +21 -0
- package/src/lib/proxy/admin/dynamic-forms/models.ts +5 -0
- package/src/lib/proxy/admin/entries/entry-admin.service.ts +100 -0
- package/src/lib/proxy/admin/entries/models.ts +73 -0
- package/src/lib/proxy/admin/fields/field-admin.service.ts +64 -0
- package/src/lib/proxy/admin/fields/field-group-admin.service.ts +56 -0
- package/{lib/proxy/admin/fields/models.d.ts → src/lib/proxy/admin/fields/models.ts} +42 -34
- package/src/lib/proxy/admin/sections/entry-type-admin.service.ts +55 -0
- package/{lib/proxy/admin/sections/models.d.ts → src/lib/proxy/admin/sections/models.ts} +88 -74
- package/src/lib/proxy/admin/sections/section-admin.service.ts +74 -0
- package/{lib/proxy/admin/sites/models.d.ts → src/lib/proxy/admin/sites/models.ts} +36 -30
- package/src/lib/proxy/admin/sites/site-admin.service.ts +72 -0
- package/src/lib/proxy/dignite/abp/data/models.ts +4 -0
- package/src/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +65 -0
- package/{lib/proxy/dignite/file-explorer/directories/models.d.ts → src/lib/proxy/dignite/file-explorer/directories/models.ts} +35 -29
- package/src/lib/proxy/dignite/file-explorer/files/file-descriptor.service.ts +86 -0
- package/src/lib/proxy/dignite/file-explorer/files/models.ts +57 -0
- package/src/lib/proxy/entries/entry-status.enum.ts +8 -0
- package/src/lib/proxy/fields/models.ts +9 -0
- package/src/lib/proxy/generate-proxy.json +11821 -0
- package/{lib/proxy/microsoft/asp-net-core/mvc/models.d.ts → src/lib/proxy/microsoft/asp-net-core/mvc/models.ts} +12 -10
- package/src/lib/proxy/microsoft/extensions/primitives/models.ts +9 -0
- package/{lib/proxy/microsoft/net/http/headers/models.d.ts → src/lib/proxy/microsoft/net/http/headers/models.ts} +7 -6
- package/src/lib/proxy/sections/models.ts +14 -0
- package/src/lib/proxy/sections/section-type.enum.ts +9 -0
- package/src/lib/proxy/sites/models.ts +5 -0
- package/src/lib/proxy/volo/abp/content/models.ts +6 -0
- package/{lib/proxy/volo/cms-kit/users/models.d.ts → src/lib/proxy/volo/cms-kit/users/models.ts} +8 -7
- package/src/lib/services/appent-content.ts +13 -0
- package/src/lib/services/cms-api.service.ts +71 -0
- package/src/lib/services/cms.service.ts +18 -0
- package/src/lib/services/field-abstracts.service.ts +41 -0
- package/src/lib/services/index.ts +4 -0
- package/src/lib/services/simple-reuse-strategy.ts +49 -0
- package/src/lib/services/update-list.service.ts +15 -0
- package/src/lib/toolbar/index.ts +2 -0
- package/src/lib/toolbar/toolbar-btn-default-action.ts +171 -0
- package/src/lib/toolbar/toolbar-config.ts +95 -0
- package/{public-api.d.ts → src/public-api.ts} +12 -8
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/config/cms-config.module.d.ts +0 -8
- package/config/enums/route-names.d.ts +0 -8
- package/config/index.d.ts +0 -5
- package/config/providers/route.provider.d.ts +0 -8
- package/esm2022/config/cms-config.module.mjs +0 -19
- package/esm2022/config/dignite-ng-expand.cms-config.mjs +0 -5
- package/esm2022/config/enums/index.mjs +0 -2
- package/esm2022/config/enums/route-names.mjs +0 -2
- package/esm2022/config/providers/index.mjs +0 -2
- package/esm2022/config/providers/route.provider.mjs +0 -64
- package/esm2022/config/public-api.mjs +0 -4
- package/esm2022/dignite-ng-expand.cms.mjs +0 -5
- package/esm2022/lib/cms-routing.module.mjs +0 -100
- package/esm2022/lib/cms.module.mjs +0 -156
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +0 -285
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +0 -32
- package/esm2022/lib/components/admin/entries/create.component.mjs +0 -107
- package/esm2022/lib/components/admin/entries/edit.component.mjs +0 -110
- package/esm2022/lib/components/admin/entries/entries.component.mjs +0 -212
- package/esm2022/lib/components/admin/entries/index.mjs +0 -5
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +0 -82
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +0 -121
- package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +0 -25
- package/esm2022/lib/components/admin/fields/edit-field.component.mjs +0 -110
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +0 -124
- package/esm2022/lib/components/admin/fields/fields.component.mjs +0 -119
- package/esm2022/lib/components/admin/fields/index.mjs +0 -7
- package/esm2022/lib/components/admin/index.mjs +0 -5
- package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +0 -27
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +0 -71
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +0 -418
- package/esm2022/lib/components/admin/sections/entry-types/index.mjs +0 -3
- package/esm2022/lib/components/admin/sections/index.mjs +0 -4
- package/esm2022/lib/components/admin/sections/sections.component.mjs +0 -334
- package/esm2022/lib/components/admin/sites/create-or-update-sites-input-base.mjs +0 -23
- package/esm2022/lib/components/admin/sites/index.mjs +0 -3
- package/esm2022/lib/components/admin/sites/sites.component.mjs +0 -285
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +0 -125
- package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +0 -18
- package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +0 -115
- package/esm2022/lib/components/dynamic-form/entry/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/form-control-group.mjs +0 -31
- package/esm2022/lib/components/dynamic-form/index.mjs +0 -5
- package/esm2022/lib/components/dynamic-form/matrix/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +0 -229
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +0 -50
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +0 -111
- package/esm2022/lib/components/dynamic-form/table/index.mjs +0 -4
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +0 -174
- package/esm2022/lib/components/dynamic-form/table/table-config.mjs +0 -38
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +0 -114
- package/esm2022/lib/components/index.mjs +0 -3
- package/esm2022/lib/constants/index.mjs +0 -2
- package/esm2022/lib/constants/styles.mjs +0 -32
- package/esm2022/lib/enums/ecms-component.mjs +0 -13
- package/esm2022/lib/enums/index.mjs +0 -2
- package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +0 -24
- package/esm2022/lib/proxy/admin/dynamic-forms/index.mjs +0 -3
- package/esm2022/lib/proxy/admin/dynamic-forms/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +0 -67
- package/esm2022/lib/proxy/admin/entries/index.mjs +0 -3
- package/esm2022/lib/proxy/admin/entries/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +0 -47
- package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +0 -43
- package/esm2022/lib/proxy/admin/fields/index.mjs +0 -4
- package/esm2022/lib/proxy/admin/fields/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/index.mjs +0 -7
- package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +0 -43
- package/esm2022/lib/proxy/admin/sections/index.mjs +0 -4
- package/esm2022/lib/proxy/admin/sections/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +0 -53
- package/esm2022/lib/proxy/admin/sites/index.mjs +0 -3
- package/esm2022/lib/proxy/admin/sites/models.mjs +0 -2
- package/esm2022/lib/proxy/admin/sites/site-admin.service.mjs +0 -51
- package/esm2022/lib/proxy/dignite/abp/data/index.mjs +0 -2
- package/esm2022/lib/proxy/dignite/abp/data/models.mjs +0 -2
- package/esm2022/lib/proxy/dignite/abp/index.mjs +0 -3
- package/esm2022/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.mjs +0 -48
- package/esm2022/lib/proxy/dignite/file-explorer/directories/index.mjs +0 -3
- package/esm2022/lib/proxy/dignite/file-explorer/directories/models.mjs +0 -2
- package/esm2022/lib/proxy/dignite/file-explorer/files/file-descriptor.service.mjs +0 -60
- package/esm2022/lib/proxy/dignite/file-explorer/files/index.mjs +0 -3
- package/esm2022/lib/proxy/dignite/file-explorer/files/models.mjs +0 -2
- package/esm2022/lib/proxy/dignite/file-explorer/index.mjs +0 -4
- package/esm2022/lib/proxy/dignite/index.mjs +0 -4
- package/esm2022/lib/proxy/entries/entry-status.enum.mjs +0 -8
- package/esm2022/lib/proxy/entries/index.mjs +0 -2
- package/esm2022/lib/proxy/fields/index.mjs +0 -2
- package/esm2022/lib/proxy/fields/models.mjs +0 -2
- package/esm2022/lib/proxy/index.mjs +0 -10
- package/esm2022/lib/proxy/microsoft/asp-net-core/index.mjs +0 -3
- package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/index.mjs +0 -2
- package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/models.mjs +0 -2
- package/esm2022/lib/proxy/microsoft/extensions/index.mjs +0 -3
- package/esm2022/lib/proxy/microsoft/extensions/primitives/index.mjs +0 -2
- package/esm2022/lib/proxy/microsoft/extensions/primitives/models.mjs +0 -2
- package/esm2022/lib/proxy/microsoft/index.mjs +0 -5
- package/esm2022/lib/proxy/microsoft/net/http/headers/index.mjs +0 -2
- package/esm2022/lib/proxy/microsoft/net/http/headers/models.mjs +0 -2
- package/esm2022/lib/proxy/microsoft/net/http/index.mjs +0 -3
- package/esm2022/lib/proxy/microsoft/net/index.mjs +0 -3
- package/esm2022/lib/proxy/sections/index.mjs +0 -3
- package/esm2022/lib/proxy/sections/models.mjs +0 -2
- package/esm2022/lib/proxy/sections/section-type.enum.mjs +0 -9
- package/esm2022/lib/proxy/sites/index.mjs +0 -2
- package/esm2022/lib/proxy/sites/models.mjs +0 -2
- package/esm2022/lib/proxy/volo/abp/content/index.mjs +0 -2
- package/esm2022/lib/proxy/volo/abp/content/models.mjs +0 -2
- package/esm2022/lib/proxy/volo/abp/index.mjs +0 -3
- package/esm2022/lib/proxy/volo/cms-kit/index.mjs +0 -3
- package/esm2022/lib/proxy/volo/cms-kit/users/index.mjs +0 -2
- package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +0 -2
- package/esm2022/lib/proxy/volo/index.mjs +0 -4
- package/esm2022/lib/services/appent-content.mjs +0 -15
- package/esm2022/lib/services/cms-api.service.mjs +0 -80
- package/esm2022/lib/services/cms.service.mjs +0 -23
- package/esm2022/lib/services/field-abstracts.service.mjs +0 -45
- package/esm2022/lib/services/index.mjs +0 -4
- package/esm2022/lib/services/simple-reuse-strategy.mjs +0 -43
- package/esm2022/lib/services/update-list.service.mjs +0 -19
- package/esm2022/lib/toolbar/index.mjs +0 -3
- package/esm2022/lib/toolbar/toolbar-btn-default-action.mjs +0 -160
- package/esm2022/lib/toolbar/toolbar-config.mjs +0 -81
- package/esm2022/public-api.mjs +0 -12
- package/fesm2022/dignite-ng-expand.cms-config.mjs +0 -87
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +0 -1
- package/fesm2022/dignite-ng-expand.cms.mjs +0 -4515
- package/fesm2022/dignite-ng-expand.cms.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/cms-routing.module.d.ts +0 -7
- package/lib/cms.module.d.ts +0 -40
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +0 -91
- package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +0 -23
- package/lib/components/admin/entries/create.component.d.ts +0 -40
- package/lib/components/admin/entries/edit.component.d.ts +0 -42
- package/lib/components/admin/entries/entries.component.d.ts +0 -66
- package/lib/components/admin/entries/index.d.ts +0 -4
- package/lib/components/admin/fields/create-field.component.d.ts +0 -31
- package/lib/components/admin/fields/create-or-edit-field.component.d.ts +0 -37
- package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +0 -16
- package/lib/components/admin/fields/edit-field.component.d.ts +0 -40
- package/lib/components/admin/fields/field-group.component.d.ts +0 -51
- package/lib/components/admin/fields/fields.component.d.ts +0 -37
- package/lib/components/admin/fields/index.d.ts +0 -6
- package/lib/components/admin/index.d.ts +0 -4
- package/lib/components/admin/sections/create-or-update-sections-input-base.d.ts +0 -17
- package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +0 -38
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +0 -132
- package/lib/components/admin/sections/entry-types/index.d.ts +0 -2
- package/lib/components/admin/sections/index.d.ts +0 -3
- package/lib/components/admin/sections/sections.component.d.ts +0 -95
- package/lib/components/admin/sites/create-or-update-sites-input-base.d.ts +0 -12
- package/lib/components/admin/sites/index.d.ts +0 -2
- package/lib/components/admin/sites/sites.component.d.ts +0 -72
- package/lib/components/dynamic-form/entry/entry-config.component.d.ts +0 -42
- package/lib/components/dynamic-form/entry/entry-config.d.ts +0 -9
- package/lib/components/dynamic-form/entry/entry-control.component.d.ts +0 -35
- package/lib/components/dynamic-form/entry/index.d.ts +0 -3
- package/lib/components/dynamic-form/form-control-group.d.ts +0 -4
- package/lib/components/dynamic-form/index.d.ts +0 -4
- package/lib/components/dynamic-form/matrix/index.d.ts +0 -3
- package/lib/components/dynamic-form/matrix/matrix-config.component.d.ts +0 -73
- package/lib/components/dynamic-form/matrix/matrix-config.d.ts +0 -24
- package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +0 -39
- package/lib/components/dynamic-form/table/index.d.ts +0 -3
- package/lib/components/dynamic-form/table/table-config.component.d.ts +0 -58
- package/lib/components/dynamic-form/table/table-config.d.ts +0 -18
- package/lib/components/dynamic-form/table/table-control.component.d.ts +0 -36
- package/lib/components/index.d.ts +0 -2
- package/lib/constants/index.d.ts +0 -1
- package/lib/constants/styles.d.ts +0 -2
- package/lib/enums/ecms-component.d.ts +0 -11
- package/lib/enums/index.d.ts +0 -1
- package/lib/proxy/admin/dynamic-forms/form-admin.service.d.ts +0 -12
- package/lib/proxy/admin/dynamic-forms/models.d.ts +0 -4
- package/lib/proxy/admin/entries/entry-admin.service.d.ts +0 -21
- package/lib/proxy/admin/entries/models.d.ts +0 -65
- package/lib/proxy/admin/fields/field-admin.service.d.ts +0 -17
- package/lib/proxy/admin/fields/field-group-admin.service.d.ts +0 -16
- package/lib/proxy/admin/sections/entry-type-admin.service.d.ts +0 -15
- package/lib/proxy/admin/sections/section-admin.service.d.ts +0 -18
- package/lib/proxy/admin/sites/site-admin.service.d.ts +0 -18
- package/lib/proxy/dignite/abp/data/models.d.ts +0 -3
- package/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.d.ts +0 -17
- package/lib/proxy/dignite/file-explorer/files/file-descriptor.service.d.ts +0 -20
- package/lib/proxy/dignite/file-explorer/files/models.d.ts +0 -50
- package/lib/proxy/entries/entry-status.enum.d.ts +0 -5
- package/lib/proxy/fields/models.d.ts +0 -8
- package/lib/proxy/microsoft/extensions/primitives/models.d.ts +0 -8
- package/lib/proxy/sections/models.d.ts +0 -12
- package/lib/proxy/sections/section-type.enum.d.ts +0 -6
- package/lib/proxy/sites/models.d.ts +0 -4
- package/lib/proxy/volo/abp/content/models.d.ts +0 -5
- package/lib/services/appent-content.d.ts +0 -1
- package/lib/services/cms-api.service.d.ts +0 -20
- package/lib/services/cms.service.d.ts +0 -10
- package/lib/services/field-abstracts.service.d.ts +0 -20
- package/lib/services/index.d.ts +0 -3
- package/lib/services/simple-reuse-strategy.d.ts +0 -11
- package/lib/services/update-list.service.d.ts +0 -9
- package/lib/toolbar/index.d.ts +0 -2
- package/lib/toolbar/toolbar-btn-default-action.d.ts +0 -19
- package/lib/toolbar/toolbar-config.d.ts +0 -57
- /package/{lib/proxy/admin/dynamic-forms/index.d.ts → src/lib/proxy/admin/dynamic-forms/index.ts} +0 -0
- /package/{lib/proxy/admin/entries/index.d.ts → src/lib/proxy/admin/entries/index.ts} +0 -0
- /package/{lib/proxy/admin/fields/index.d.ts → src/lib/proxy/admin/fields/index.ts} +0 -0
- /package/{lib/proxy/admin/index.d.ts → src/lib/proxy/admin/index.ts} +0 -0
- /package/{lib/proxy/admin/sections/index.d.ts → src/lib/proxy/admin/sections/index.ts} +0 -0
- /package/{lib/proxy/admin/sites/index.d.ts → src/lib/proxy/admin/sites/index.ts} +0 -0
- /package/{lib/proxy/dignite/abp/data/index.d.ts → src/lib/proxy/dignite/abp/data/index.ts} +0 -0
- /package/{lib/proxy/dignite/abp/index.d.ts → src/lib/proxy/dignite/abp/index.ts} +0 -0
- /package/{lib/proxy/dignite/file-explorer/directories/index.d.ts → src/lib/proxy/dignite/file-explorer/directories/index.ts} +0 -0
- /package/{lib/proxy/dignite/file-explorer/files/index.d.ts → src/lib/proxy/dignite/file-explorer/files/index.ts} +0 -0
- /package/{lib/proxy/dignite/file-explorer/index.d.ts → src/lib/proxy/dignite/file-explorer/index.ts} +0 -0
- /package/{lib/proxy/dignite/index.d.ts → src/lib/proxy/dignite/index.ts} +0 -0
- /package/{lib/proxy/entries/index.d.ts → src/lib/proxy/entries/index.ts} +0 -0
- /package/{lib/proxy/fields/index.d.ts → src/lib/proxy/fields/index.ts} +0 -0
- /package/{lib/proxy/index.d.ts → src/lib/proxy/index.ts} +0 -0
- /package/{lib/proxy/microsoft/asp-net-core/index.d.ts → src/lib/proxy/microsoft/asp-net-core/index.ts} +0 -0
- /package/{lib/proxy/microsoft/asp-net-core/mvc/index.d.ts → src/lib/proxy/microsoft/asp-net-core/mvc/index.ts} +0 -0
- /package/{lib/proxy/microsoft/extensions/index.d.ts → src/lib/proxy/microsoft/extensions/index.ts} +0 -0
- /package/{lib/proxy/microsoft/extensions/primitives/index.d.ts → src/lib/proxy/microsoft/extensions/primitives/index.ts} +0 -0
- /package/{lib/proxy/microsoft/index.d.ts → src/lib/proxy/microsoft/index.ts} +0 -0
- /package/{lib/proxy/microsoft/net/http/headers/index.d.ts → src/lib/proxy/microsoft/net/http/headers/index.ts} +0 -0
- /package/{lib/proxy/microsoft/net/http/index.d.ts → src/lib/proxy/microsoft/net/http/index.ts} +0 -0
- /package/{lib/proxy/microsoft/net/index.d.ts → src/lib/proxy/microsoft/net/index.ts} +0 -0
- /package/{lib/proxy/sections/index.d.ts → src/lib/proxy/sections/index.ts} +0 -0
- /package/{lib/proxy/sites/index.d.ts → src/lib/proxy/sites/index.ts} +0 -0
- /package/{lib/proxy/volo/abp/content/index.d.ts → src/lib/proxy/volo/abp/content/index.ts} +0 -0
- /package/{lib/proxy/volo/abp/index.d.ts → src/lib/proxy/volo/abp/index.ts} +0 -0
- /package/{lib/proxy/volo/cms-kit/index.d.ts → src/lib/proxy/volo/cms-kit/index.ts} +0 -0
- /package/{lib/proxy/volo/cms-kit/users/index.d.ts → src/lib/proxy/volo/cms-kit/users/index.ts} +0 -0
- /package/{lib/proxy/volo/index.d.ts → src/lib/proxy/volo/index.ts} +0 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { ABP, ConfigStateService, LIST_QUERY_DEBOUNCE_TIME, ListService, LocalizationService, PagedResultDto } from '@abp/ng.core';
|
|
2
|
+
import { ToasterService, ConfirmationService, Confirmation, } from '@abp/ng.theme.shared';
|
|
3
|
+
import { Component, ElementRef, OnInit, ViewChild, inject, } from '@angular/core';
|
|
4
|
+
import { AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators, } from '@angular/forms';
|
|
5
|
+
import { EntryTypeAdminService, GetSectionsInput, SectionAdminService, SectionDto } from '../../../proxy/admin/sections';
|
|
6
|
+
import { SiteAdminService } from '../../../proxy/admin/sites';
|
|
7
|
+
import { ColumnMode } from "@swimlane/ngx-datatable";
|
|
8
|
+
import { finalize } from 'rxjs/operators';
|
|
9
|
+
import { CreateOrUpdateSectionsInputBase } from './create-or-update-sections-input-base';
|
|
10
|
+
import { SectionType, sectionTypeOptions } from '../../../proxy/sections';
|
|
11
|
+
import { EXTENSIONS_IDENTIFIER } from '@abp/ng.theme.shared/extensions';
|
|
12
|
+
import { ECmsComponent } from '../../../enums';
|
|
13
|
+
import { CmsApiService } from '../../../services/cms-api.service';
|
|
14
|
+
import { Observable } from 'rxjs';
|
|
15
|
+
import { Router } from '@angular/router';
|
|
16
|
+
import { UpdateListService } from '../../../services/update-list.service';
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'cms-sections',
|
|
20
|
+
templateUrl: './sections.component.html',
|
|
21
|
+
styleUrls: ['./sections.component.scss'],
|
|
22
|
+
providers: [
|
|
23
|
+
// [Required]
|
|
24
|
+
ListService,
|
|
25
|
+
// [Optional]
|
|
26
|
+
// Provide this token if you want a different debounce time.
|
|
27
|
+
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
28
|
+
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
|
|
29
|
+
{
|
|
30
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
31
|
+
useValue: ECmsComponent.Sections,
|
|
32
|
+
},
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
export class SectionsComponent implements OnInit {
|
|
36
|
+
constructor(
|
|
37
|
+
public readonly list: ListService,
|
|
38
|
+
private _SectionAdminService: SectionAdminService,
|
|
39
|
+
private _SiteAdminService: SiteAdminService,
|
|
40
|
+
private toaster: ToasterService,
|
|
41
|
+
private confirmation: ConfirmationService,
|
|
42
|
+
private fb: FormBuilder,
|
|
43
|
+
private configState: ConfigStateService,
|
|
44
|
+
public _EntryTypeAdminService: EntryTypeAdminService,
|
|
45
|
+
public _LocalizationService: LocalizationService,
|
|
46
|
+
public _CmsApiService: CmsApiService,
|
|
47
|
+
private router: Router,
|
|
48
|
+
) {
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
private _UpdateListService=inject(UpdateListService)
|
|
52
|
+
|
|
53
|
+
/**跳转编辑 */
|
|
54
|
+
jumpSectionsEdit(row, item) {
|
|
55
|
+
this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/${item.id}/edit`], {
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
/**跳转新建 */
|
|
59
|
+
jumpSectionsCreate(row) {
|
|
60
|
+
this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/create`], {
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**版块列表 */
|
|
66
|
+
siteList: any[] = []
|
|
67
|
+
/*** */
|
|
68
|
+
ColumnMode = ColumnMode;
|
|
69
|
+
data: PagedResultDto<SectionDto> = {
|
|
70
|
+
items: [],
|
|
71
|
+
totalCount: 0,
|
|
72
|
+
};
|
|
73
|
+
/** */
|
|
74
|
+
filters = {} as GetSectionsInput;
|
|
75
|
+
/**获取页面列表 */
|
|
76
|
+
hookToQuery() {
|
|
77
|
+
const getData = (query: ABP.PageQueryParams) => this._SectionAdminService.getList({
|
|
78
|
+
...query,
|
|
79
|
+
...this.filters,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const setData = (list: PagedResultDto<SectionDto>) => (this.data = list);
|
|
83
|
+
this.list.hookToQuery(getData).subscribe(setData);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async ngOnInit(): Promise<void> {
|
|
87
|
+
await this.getSiteList()
|
|
88
|
+
this.hookToQuery()
|
|
89
|
+
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
90
|
+
this.list.get()
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**站点切换 */
|
|
95
|
+
siteIdChange() {
|
|
96
|
+
this.list.page = 0
|
|
97
|
+
this.list.get()
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**获取版块列表 */
|
|
101
|
+
getSiteList() {
|
|
102
|
+
return new Promise((resolve, rejects) => {
|
|
103
|
+
this._SiteAdminService.getList({}).subscribe(res => {
|
|
104
|
+
this.siteList = res.items
|
|
105
|
+
this.filters.siteId = res.items[0]?.id || ''
|
|
106
|
+
resolve(true)
|
|
107
|
+
rejects(false)
|
|
108
|
+
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**创建版块模态框状态 */
|
|
115
|
+
visibleOpen: boolean = false
|
|
116
|
+
|
|
117
|
+
/**用于确定模态的繁忙状态是否为真 */
|
|
118
|
+
modalBusy: boolean = false
|
|
119
|
+
/**创建版块表单 */
|
|
120
|
+
createOrEditForm: FormGroup | undefined;
|
|
121
|
+
|
|
122
|
+
/**版块给定的表单值 */
|
|
123
|
+
selected: any
|
|
124
|
+
|
|
125
|
+
_SectionType = SectionType
|
|
126
|
+
_sectionTypeOptions = sectionTypeOptions
|
|
127
|
+
|
|
128
|
+
/**表单控件模板-动态赋值表单控件 */
|
|
129
|
+
@ViewChild('createOrEditModalSubmitBtn', { static: false }) createOrEditModalSubmitBtn: ElementRef;
|
|
130
|
+
|
|
131
|
+
/**创建版块模态框状态改变 */
|
|
132
|
+
VisibleChange(event) {
|
|
133
|
+
if (!event) {
|
|
134
|
+
this.selected = ''
|
|
135
|
+
return
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**创建版块,打开模态框 */
|
|
139
|
+
createSectionBtn() {
|
|
140
|
+
this.visibleOpen = true
|
|
141
|
+
this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase())
|
|
142
|
+
this.setAsyncValidatorsFn()
|
|
143
|
+
}
|
|
144
|
+
/**编辑版块,打开模态框 */
|
|
145
|
+
editSectionBtn(row) {
|
|
146
|
+
this.visibleOpen = true
|
|
147
|
+
this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase())
|
|
148
|
+
this.setAsyncValidatorsFn()
|
|
149
|
+
this._SectionAdminService.get(row.id).subscribe(res => {
|
|
150
|
+
this.createOrEditForm.patchValue(res)
|
|
151
|
+
this.selected = res
|
|
152
|
+
})
|
|
153
|
+
}
|
|
154
|
+
/**删除某个条目类型 */
|
|
155
|
+
deleteEntryType(row) {
|
|
156
|
+
this.confirmation.warn(
|
|
157
|
+
row.displayName,
|
|
158
|
+
this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`),
|
|
159
|
+
).subscribe((status: Confirmation.Status) => {
|
|
160
|
+
if (status == 'confirm') {
|
|
161
|
+
this._EntryTypeAdminService.delete(row.id).pipe(finalize(() => {
|
|
162
|
+
})).subscribe(res => {
|
|
163
|
+
this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
|
|
164
|
+
this.list.get()
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**表单保存提交 */
|
|
172
|
+
createOrEditSave() {
|
|
173
|
+
if (this.selected) {
|
|
174
|
+
return this.EditSave()
|
|
175
|
+
}
|
|
176
|
+
this.createSave()
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** */
|
|
180
|
+
createSave() {
|
|
181
|
+
let input = this.createOrEditForm.value
|
|
182
|
+
input.siteId = this.filters.siteId
|
|
183
|
+
if (!this.createOrEditForm.valid) return
|
|
184
|
+
this.modalBusy = true
|
|
185
|
+
this._SectionAdminService.create(input).pipe(finalize(() => {
|
|
186
|
+
this.modalBusy = false
|
|
187
|
+
this.visibleOpen = false
|
|
188
|
+
})).subscribe(res => {
|
|
189
|
+
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
190
|
+
this.list.get()
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
/**创建版块保存 */
|
|
194
|
+
EditSave() {
|
|
195
|
+
let input = this.createOrEditForm.value
|
|
196
|
+
input.siteId = this.filters.siteId
|
|
197
|
+
input.concurrencyStamp = this.selected.concurrencyStamp
|
|
198
|
+
if (!this.createOrEditForm.valid) return
|
|
199
|
+
this.modalBusy = true
|
|
200
|
+
this._SectionAdminService.update(this.selected.id, input).pipe(finalize(() => {
|
|
201
|
+
this.modalBusy = false
|
|
202
|
+
this.visibleOpen = false
|
|
203
|
+
})).subscribe(res => {
|
|
204
|
+
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
205
|
+
this.list.get()
|
|
206
|
+
})
|
|
207
|
+
}
|
|
208
|
+
/**删除版块 */
|
|
209
|
+
deletefield(row) {
|
|
210
|
+
this.confirmation.warn(
|
|
211
|
+
row.displayName,
|
|
212
|
+
this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`),
|
|
213
|
+
).subscribe((status: Confirmation.Status) => {
|
|
214
|
+
if (status == 'confirm') {
|
|
215
|
+
this._SectionAdminService.delete(row.id).pipe(finalize(() => {
|
|
216
|
+
})).subscribe(res => {
|
|
217
|
+
this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
|
|
218
|
+
this.list.get()
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
/**name表单控件 */
|
|
227
|
+
get displayNameInput() {
|
|
228
|
+
return this.createOrEditForm.get('displayName')
|
|
229
|
+
}
|
|
230
|
+
/**name表单控件 */
|
|
231
|
+
get nameInput() {
|
|
232
|
+
return this.createOrEditForm.get('name')
|
|
233
|
+
}
|
|
234
|
+
/**route表单控件 */
|
|
235
|
+
get routeInput() {
|
|
236
|
+
return this.createOrEditForm.get('route')
|
|
237
|
+
}
|
|
238
|
+
/**route表单控件 */
|
|
239
|
+
get templateInput() {
|
|
240
|
+
return this.createOrEditForm.get('template')
|
|
241
|
+
}
|
|
242
|
+
/**route表单控件 */
|
|
243
|
+
get typeInput() {
|
|
244
|
+
return this.createOrEditForm.get('type')
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
radiochange() {
|
|
248
|
+
this.routeInput.patchValue(this.routeInput.value)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
/**字段标签input失去标点生成字段名字 */
|
|
253
|
+
disPlayNameInputBlur(event) {
|
|
254
|
+
let value = event.target.value
|
|
255
|
+
let pinyin = this._CmsApiService.chineseToPinyin(value)
|
|
256
|
+
let nameInput = this.nameInput
|
|
257
|
+
let routeInput = this.routeInput
|
|
258
|
+
let templateInput = this.templateInput
|
|
259
|
+
if (nameInput.value) return
|
|
260
|
+
nameInput.patchValue(pinyin)
|
|
261
|
+
if (routeInput.value) return
|
|
262
|
+
routeInput.patchValue(pinyin + (this.typeInput.value === 0 ? '' : '/{slug}'))
|
|
263
|
+
if (templateInput.value) return
|
|
264
|
+
templateInput.patchValue(pinyin + '/index')
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/**设置字段控件异步验证 */
|
|
270
|
+
setAsyncValidatorsFn() {
|
|
271
|
+
this.createOrEditForm.setControl('name', new FormControl(this.nameInput.value || '', {
|
|
272
|
+
validators: Validators.required,
|
|
273
|
+
asyncValidators: this.nameRepetitionAsyncValidator(),
|
|
274
|
+
}))
|
|
275
|
+
this.createOrEditForm.setControl('route', new FormControl(this.routeInput.value || '', {
|
|
276
|
+
validators: [Validators.required, this.forbiddenNameValidator()],
|
|
277
|
+
asyncValidators: [this.routeRepetitionAsyncValidator()],
|
|
278
|
+
}))
|
|
279
|
+
}
|
|
280
|
+
forbiddenNameValidator(): ValidatorFn {
|
|
281
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
282
|
+
let inputValue = control.value.toLocaleLowerCase()
|
|
283
|
+
let forbidden = this.typeInput.value == 0 ? false : inputValue.includes('{slug}') ? false : true
|
|
284
|
+
return forbidden ? { repetition: this._LocalizationService.instant(`Cms::RouteVerificationTips`, this._LocalizationService.instant(`Cms::Enum:SectionType:` + SectionType[this.typeInput.value]), '{slug}') } : null;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**定义异步验证方法 */
|
|
289
|
+
nameRepetitionAsyncValidator() {
|
|
290
|
+
return (ctrl: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
|
|
291
|
+
return new Promise(resolve => {
|
|
292
|
+
let subslug = this.createOrEditForm?.get('name')
|
|
293
|
+
if (subslug.value == this.selected?.name) {
|
|
294
|
+
resolve(null);
|
|
295
|
+
return
|
|
296
|
+
}
|
|
297
|
+
this._SectionAdminService.nameExists({
|
|
298
|
+
siteId: this.filters.siteId,
|
|
299
|
+
name: subslug.value
|
|
300
|
+
}).subscribe(res => {
|
|
301
|
+
if (res) {
|
|
302
|
+
resolve({ repetition: this._LocalizationService.instant(`Cms::SectionName{0}AlreadyExist`, ctrl.value) });
|
|
303
|
+
} else {
|
|
304
|
+
resolve(null);
|
|
305
|
+
}
|
|
306
|
+
})
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
/**定义异步验证方法 */
|
|
311
|
+
routeRepetitionAsyncValidator() {
|
|
312
|
+
return (ctrl: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
|
|
313
|
+
return new Promise(resolve => {
|
|
314
|
+
let subslug = this.createOrEditForm?.get('route').value
|
|
315
|
+
if (subslug == this.selected?.route) {
|
|
316
|
+
resolve(null);
|
|
317
|
+
return
|
|
318
|
+
}
|
|
319
|
+
this._SectionAdminService.routeExists({
|
|
320
|
+
siteId: this.filters.siteId,
|
|
321
|
+
route: subslug
|
|
322
|
+
}).subscribe(res => {
|
|
323
|
+
if (res) {
|
|
324
|
+
resolve({ repetition: this._LocalizationService.instant(`Cms::SectionRoute{0}AlreadyExist`, ctrl.value) });
|
|
325
|
+
} else {
|
|
326
|
+
resolve(null);
|
|
327
|
+
}
|
|
328
|
+
})
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from "@angular/forms";
|
|
2
|
+
|
|
3
|
+
export class CreateOrUpdateSitesInputBase {
|
|
4
|
+
|
|
5
|
+
/**字段名称 Display name of this field */
|
|
6
|
+
displayName: any = ['', [Validators.required]];
|
|
7
|
+
|
|
8
|
+
/**字段唯一名称 Unique Name*/
|
|
9
|
+
name: any = ['', [Validators.required]];
|
|
10
|
+
|
|
11
|
+
/**主机地址 */
|
|
12
|
+
host: any = ['https://', [Validators.required]];
|
|
13
|
+
|
|
14
|
+
/**是否激活 */
|
|
15
|
+
isActive: any = [true, []];
|
|
16
|
+
// 语言
|
|
17
|
+
languages:any = [[], [Validators.required]]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
constructor(data?: CreateOrUpdateSitesInputBase) {
|
|
21
|
+
if (data) {
|
|
22
|
+
for (const key in data) {
|
|
23
|
+
if (data.hasOwnProperty(key)) {
|
|
24
|
+
this[key] = data[key];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<abp-page [title]="'Cms::Sites' | abpLocalization" [toolbar]="true">
|
|
2
|
+
<div class="sites-page">
|
|
3
|
+
<div class="card">
|
|
4
|
+
<div class="card-body px-2 py-sm-2 border-bottom">
|
|
5
|
+
<div class="input-group">
|
|
6
|
+
<input type="text" class="form-control" [(ngModel)]="filters.filter"
|
|
7
|
+
[placeholder]="'AbpUi::Search' | abpLocalization" />
|
|
8
|
+
<button class="btn btn-primary px-3" type="button" id="button-addon2" (click)="list.get()">
|
|
9
|
+
<i class="fa fa-search"></i>
|
|
10
|
+
</button>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="card mb-0">
|
|
15
|
+
<div class="card-body p-0">
|
|
16
|
+
<div class="table-responsive table-fixed-header">
|
|
17
|
+
<ngx-datatable class="material container-height" [rows]="data.items" [list]="list"
|
|
18
|
+
[columnMode]="'force'" [headerHeight]="50" [footerHeight]="50" rowHeight="auto"
|
|
19
|
+
[scrollbarV]="true" [virtualization]="false" [externalPaging]="true" [count]="data.totalCount">
|
|
20
|
+
<ngx-datatable-column [name]="'Cms::DisplayName' | abpLocalization" prop="displayName">
|
|
21
|
+
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
|
|
22
|
+
{{ value }}
|
|
23
|
+
</ng-template>
|
|
24
|
+
</ngx-datatable-column>
|
|
25
|
+
<ngx-datatable-column [name]="'Cms::Name' | abpLocalization" prop="name">
|
|
26
|
+
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
|
|
27
|
+
{{ value }}
|
|
28
|
+
</ng-template>
|
|
29
|
+
</ngx-datatable-column>
|
|
30
|
+
<ngx-datatable-column [name]="'Cms::IsActive' | abpLocalization" prop="isActive">
|
|
31
|
+
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
|
|
32
|
+
<i class="fas fa-check text-success" *ngIf="value"></i>
|
|
33
|
+
<i class="fas fa-times text-danger" *ngIf="!value"></i>
|
|
34
|
+
</ng-template>
|
|
35
|
+
</ngx-datatable-column>
|
|
36
|
+
<ngx-datatable-column [name]="'Cms::Host' | abpLocalization" prop="host">
|
|
37
|
+
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
|
|
38
|
+
{{ value }}
|
|
39
|
+
</ng-template>
|
|
40
|
+
</ngx-datatable-column>
|
|
41
|
+
<ngx-datatable-column [name]="'Cms::CreationTime' | abpLocalization" prop="creationTime">
|
|
42
|
+
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
|
|
43
|
+
{{ value | date : 'yyyy-MM-dd hh-mm-ss' }}
|
|
44
|
+
</ng-template>
|
|
45
|
+
</ngx-datatable-column>
|
|
46
|
+
<ngx-datatable-column [sortable]="false">
|
|
47
|
+
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
|
|
48
|
+
<div ngbDropdown container="body">
|
|
49
|
+
<button type="button" class="btn btn-outline-primary btn-sm" ngbDropdownToggle>
|
|
50
|
+
{{'AbpUi::Actions' | abpLocalization}}
|
|
51
|
+
</button>
|
|
52
|
+
<div ngbDropdownMenu>
|
|
53
|
+
<button ngbDropdownItem
|
|
54
|
+
(click)="EditSitesBtn(row)">{{'AbpUi::Edit' | abpLocalization}}</button>
|
|
55
|
+
<button ngbDropdownItem
|
|
56
|
+
(click)="deletefield(row)">{{'AbpUi::Delete' | abpLocalization}}</button>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</ng-template>
|
|
60
|
+
</ngx-datatable-column>
|
|
61
|
+
</ngx-datatable>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</abp-page>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<!-- <dignite-page [title]="'Cms::Sites' | abpLocalization" [back]="false" [class]="'sites-page'">
|
|
75
|
+
<ng-template #pageHeader>
|
|
76
|
+
<button type="button" class="btn btn-primary btn-sm ms-2" (click.stop)="createSitesBtn()">
|
|
77
|
+
<i class="fa fa-plus pe-1" aria-hidden="true"></i>{{'Cms::New' | abpLocalization}}
|
|
78
|
+
</button>
|
|
79
|
+
</ng-template>
|
|
80
|
+
<ng-template #pageBody>
|
|
81
|
+
|
|
82
|
+
</ng-template>
|
|
83
|
+
</dignite-page> -->
|
|
84
|
+
|
|
85
|
+
<abp-modal [(visible)]="createSitesOpen" [busy]="modalBusy" (visibleChange)="createGroupVisibleChange($event)">
|
|
86
|
+
<ng-template #abpHeader>
|
|
87
|
+
<h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>
|
|
88
|
+
</ng-template>
|
|
89
|
+
<ng-template #abpBody>
|
|
90
|
+
<ng-template #loaderRef>
|
|
91
|
+
<div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
|
|
92
|
+
</ng-template>
|
|
93
|
+
<ng-container *ngIf="createOrEditForm; else loaderRef">
|
|
94
|
+
<form class="sites-modal-form" #myForm="ngForm" [formGroup]="createOrEditForm"
|
|
95
|
+
(ngSubmit)="createOrEditSave()">
|
|
96
|
+
<button type="submit" #createModalSubmit style="display: none"></button>
|
|
97
|
+
<div class="mb-2">
|
|
98
|
+
<label class="form-label">{{'Cms::DisplayName' | abpLocalization}}</label>
|
|
99
|
+
<input type="text" class="form-control" formControlName="displayName"
|
|
100
|
+
(blur)="disPlayNameInputBlur($event)" />
|
|
101
|
+
</div>
|
|
102
|
+
<div class="mb-2">
|
|
103
|
+
<label class="form-label">{{'Cms::Name' | abpLocalization}}</label>
|
|
104
|
+
<input type="text" class="form-control" formControlName="name" />
|
|
105
|
+
<div class="text-danger invalid-feedback" *ngIf="nameInput.errors?.repetition">
|
|
106
|
+
{{nameInput.errors?.repetition}}
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="mb-2">
|
|
110
|
+
<label class="form-label">{{'Cms::Host' | abpLocalization}}</label>
|
|
111
|
+
<input type="text" class="form-control" formControlName="host" />
|
|
112
|
+
<div class="text-danger invalid-feedback" *ngIf="hostInput.errors?.repetition">
|
|
113
|
+
{{hostInput.errors?.repetition}}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="mb-2">
|
|
117
|
+
<div class="form-check form-check-inline">
|
|
118
|
+
<input class="form-check-input" type="checkbox" value="true" formControlName="isActive"
|
|
119
|
+
id="flexRadioDefault1" />
|
|
120
|
+
<label class="form-check-label" for="flexRadioDefault1"> {{'Cms::IsActive' | abpLocalization}}
|
|
121
|
+
</label>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="mb-2">
|
|
125
|
+
<label class="form-label">{{'Cms::Languages' | abpLocalization}}</label>
|
|
126
|
+
<ul class="list-group list-group-flush">
|
|
127
|
+
<ng-container *ngFor="let item of languages; let i = index">
|
|
128
|
+
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
129
|
+
<div>
|
|
130
|
+
<input class="form-check-input me-1" type="checkbox" [value]="item.cultureName"
|
|
131
|
+
id="firstRadio{{ i }}" [checked]="item.ischecked"
|
|
132
|
+
(change)="languagesChange($event);!item.ischecked" />
|
|
133
|
+
<label class="form-check-label" for="firstRadio{{ i }}">{{ item.displayName
|
|
134
|
+
}}</label>
|
|
135
|
+
</div>
|
|
136
|
+
<ng-container *ngIf="item.ischecked">
|
|
137
|
+
<div class="text-primary" *ngIf="item.isDefault">{{'Cms::Default' | abpLocalization}}
|
|
138
|
+
</div>
|
|
139
|
+
<div (click.stop)="setDefault(item)" *ngIf="!item.isDefault">
|
|
140
|
+
{{'Cms::SetDefault' | abpLocalization}}</div>
|
|
141
|
+
</ng-container>
|
|
142
|
+
</li>
|
|
143
|
+
</ng-container>
|
|
144
|
+
</ul>
|
|
145
|
+
</div>
|
|
146
|
+
</form>
|
|
147
|
+
</ng-container>
|
|
148
|
+
</ng-template>
|
|
149
|
+
<ng-template #abpFooter>
|
|
150
|
+
<button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
|
|
151
|
+
<abp-button iconClass="fa fa-check"
|
|
152
|
+
(click)="createModalSubmit.nativeElement.click()">{{'AbpUi::Save' | abpLocalization}}</abp-button>
|
|
153
|
+
</ng-template>
|
|
154
|
+
</abp-modal>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
::ng-deep.sites-page {
|
|
2
|
+
.dignite_page{
|
|
3
|
+
background: transparent;
|
|
4
|
+
}
|
|
5
|
+
.list-group-flush > .list-group-item:first-child{
|
|
6
|
+
border-top-width:var(--bs-list-group-border-width);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.container-height{
|
|
10
|
+
height: calc(100vh - 220px);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
::ng-deep.sites-modal-form{
|
|
16
|
+
.form-control{
|
|
17
|
+
padding: 0.4rem 1.25rem;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SitesComponent } from './sites.component';
|
|
4
|
+
|
|
5
|
+
describe('SitesComponent', () => {
|
|
6
|
+
let component: SitesComponent;
|
|
7
|
+
let fixture: ComponentFixture<SitesComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [SitesComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(SitesComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|