@dignite-ng/expand.cms 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/cms-config.module.d.ts +8 -0
- package/config/{src/enums/index.ts → enums/index.d.ts} +1 -1
- package/config/enums/route-names.d.ts +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 +8 -0
- package/config/{src/public-api.ts → public-api.d.ts} +3 -3
- package/esm2022/config/cms-config.module.mjs +19 -0
- package/esm2022/config/dignite-ng-expand.cms-config.mjs +5 -0
- package/esm2022/config/enums/index.mjs +2 -0
- package/esm2022/config/enums/route-names.mjs +2 -0
- package/esm2022/config/providers/index.mjs +2 -0
- package/esm2022/config/providers/route.provider.mjs +64 -0
- package/esm2022/config/public-api.mjs +4 -0
- package/esm2022/dignite-ng-expand.cms.mjs +5 -0
- package/esm2022/lib/cms-routing.module.mjs +101 -0
- package/esm2022/lib/cms.module.mjs +156 -0
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +285 -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 +107 -0
- package/esm2022/lib/components/admin/entries/edit.component.mjs +110 -0
- package/esm2022/lib/components/admin/entries/entries.component.mjs +212 -0
- package/esm2022/lib/components/admin/entries/index.mjs +5 -0
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +82 -0
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +121 -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 +110 -0
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +124 -0
- package/esm2022/lib/components/admin/fields/fields.component.mjs +119 -0
- package/esm2022/lib/components/admin/fields/index.mjs +7 -0
- package/esm2022/lib/components/admin/index.mjs +5 -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 +418 -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 +334 -0
- package/esm2022/lib/components/admin/sites/create-or-update-sites-input-base.mjs +23 -0
- package/esm2022/lib/components/admin/sites/index.mjs +3 -0
- package/esm2022/lib/components/admin/sites/sites.component.mjs +285 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +125 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +18 -0
- package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +115 -0
- package/esm2022/lib/components/dynamic-form/entry/index.mjs +4 -0
- package/esm2022/lib/components/dynamic-form/form-control-group.mjs +31 -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 +229 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +50 -0
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +111 -0
- package/esm2022/lib/components/dynamic-form/table/index.mjs +4 -0
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +174 -0
- package/esm2022/lib/components/dynamic-form/table/table-config.mjs +38 -0
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +114 -0
- package/esm2022/lib/components/index.mjs +3 -0
- package/esm2022/lib/constants/index.mjs +2 -0
- package/esm2022/lib/constants/styles.mjs +32 -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 +24 -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 +67 -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 +47 -0
- package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +43 -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/index.mjs +7 -0
- package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +43 -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 +53 -0
- package/esm2022/lib/proxy/admin/sites/index.mjs +3 -0
- package/esm2022/lib/proxy/admin/sites/models.mjs +2 -0
- package/esm2022/lib/proxy/admin/sites/site-admin.service.mjs +51 -0
- package/esm2022/lib/proxy/dignite/abp/data/index.mjs +2 -0
- package/esm2022/lib/proxy/dignite/abp/data/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/abp/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.mjs +48 -0
- package/esm2022/lib/proxy/dignite/file-explorer/directories/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/file-explorer/directories/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/file-explorer/files/file-descriptor.service.mjs +60 -0
- package/esm2022/lib/proxy/dignite/file-explorer/files/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/file-explorer/files/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/file-explorer/index.mjs +4 -0
- package/esm2022/lib/proxy/dignite/index.mjs +4 -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/index.mjs +2 -0
- package/esm2022/lib/proxy/fields/models.mjs +2 -0
- package/esm2022/lib/proxy/index.mjs +10 -0
- package/esm2022/lib/proxy/microsoft/asp-net-core/index.mjs +3 -0
- package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/index.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/models.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/extensions/index.mjs +3 -0
- package/esm2022/lib/proxy/microsoft/extensions/primitives/index.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/extensions/primitives/models.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/index.mjs +5 -0
- package/esm2022/lib/proxy/microsoft/net/http/headers/index.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/net/http/headers/models.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/net/http/index.mjs +3 -0
- package/esm2022/lib/proxy/microsoft/net/index.mjs +3 -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/sites/index.mjs +2 -0
- package/esm2022/lib/proxy/sites/models.mjs +2 -0
- package/esm2022/lib/proxy/volo/abp/content/index.mjs +2 -0
- package/esm2022/lib/proxy/volo/abp/content/models.mjs +2 -0
- package/esm2022/lib/proxy/volo/abp/index.mjs +3 -0
- package/esm2022/lib/proxy/volo/cms-kit/index.mjs +3 -0
- package/esm2022/lib/proxy/volo/cms-kit/users/index.mjs +2 -0
- package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +2 -0
- package/esm2022/lib/proxy/volo/index.mjs +4 -0
- package/esm2022/lib/services/appent-content.mjs +15 -0
- package/esm2022/lib/services/cms-api.service.mjs +80 -0
- package/esm2022/lib/services/cms.service.mjs +23 -0
- package/esm2022/lib/services/field-abstracts.service.mjs +45 -0
- package/esm2022/lib/services/index.mjs +5 -0
- package/esm2022/lib/services/simple-reuse-strategy.mjs +43 -0
- package/esm2022/lib/services/update-list.service.mjs +19 -0
- package/esm2022/lib/toolbar/index.mjs +3 -0
- package/esm2022/lib/toolbar/toolbar-btn-default-action.mjs +160 -0
- package/esm2022/lib/toolbar/toolbar-config.mjs +81 -0
- package/esm2022/public-api.mjs +12 -0
- package/fesm2022/dignite-ng-expand.cms-config.mjs +87 -0
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -0
- package/fesm2022/dignite-ng-expand.cms.mjs +4516 -0
- package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/cms-routing.module.d.ts +7 -0
- package/lib/cms.module.d.ts +40 -0
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +91 -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 +40 -0
- package/lib/components/admin/entries/edit.component.d.ts +42 -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 +31 -0
- package/lib/components/admin/fields/create-or-edit-field.component.d.ts +37 -0
- package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +16 -0
- package/lib/components/admin/fields/edit-field.component.d.ts +40 -0
- package/lib/components/admin/fields/field-group.component.d.ts +51 -0
- package/lib/components/admin/fields/fields.component.d.ts +37 -0
- package/lib/components/admin/fields/index.d.ts +6 -0
- package/lib/components/admin/index.d.ts +4 -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 +132 -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 +95 -0
- package/lib/components/admin/sites/create-or-update-sites-input-base.d.ts +12 -0
- package/lib/components/admin/sites/index.d.ts +2 -0
- package/lib/components/admin/sites/sites.component.d.ts +72 -0
- package/lib/components/dynamic-form/entry/entry-config.component.d.ts +42 -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 +36 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/constants/index.d.ts +1 -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 +21 -0
- package/lib/proxy/admin/entries/models.d.ts +65 -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} +74 -88
- package/lib/proxy/admin/sections/section-admin.service.d.ts +18 -0
- package/{src/lib/proxy/admin/sites/models.ts → lib/proxy/admin/sites/models.d.ts} +30 -36
- package/lib/proxy/admin/sites/site-admin.service.d.ts +18 -0
- package/lib/proxy/dignite/abp/data/models.d.ts +3 -0
- package/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.d.ts +17 -0
- package/{src/lib/proxy/dignite/file-explorer/directories/models.ts → lib/proxy/dignite/file-explorer/directories/models.d.ts} +29 -35
- package/lib/proxy/dignite/file-explorer/files/file-descriptor.service.d.ts +20 -0
- package/lib/proxy/dignite/file-explorer/files/models.d.ts +50 -0
- package/lib/proxy/entries/entry-status.enum.d.ts +5 -0
- package/lib/proxy/fields/models.d.ts +8 -0
- package/{src/lib/proxy/microsoft/asp-net-core/mvc/models.ts → lib/proxy/microsoft/asp-net-core/mvc/models.d.ts} +10 -12
- package/lib/proxy/microsoft/extensions/primitives/models.d.ts +8 -0
- package/{src/lib/proxy/microsoft/net/http/headers/models.ts → lib/proxy/microsoft/net/http/headers/models.d.ts} +6 -7
- package/lib/proxy/sections/models.d.ts +12 -0
- package/lib/proxy/sections/section-type.enum.d.ts +6 -0
- package/lib/proxy/sites/models.d.ts +4 -0
- package/lib/proxy/volo/abp/content/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/services/appent-content.d.ts +1 -0
- package/lib/services/cms-api.service.d.ts +20 -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 +4 -0
- package/lib/services/simple-reuse-strategy.d.ts +11 -0
- package/lib/services/update-list.service.d.ts +9 -0
- package/lib/toolbar/index.d.ts +2 -0
- package/lib/toolbar/toolbar-btn-default-action.d.ts +19 -0
- package/lib/toolbar/toolbar-config.d.ts +57 -0
- package/package.json +38 -19
- package/{src/public-api.ts → public-api.d.ts} +8 -12
- package/config/ng-package.json +0 -7
- package/config/src/cms-config.module.ts +0 -12
- package/config/src/enums/route-names.ts +0 -8
- package/config/src/providers/route.provider.ts +0 -66
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -7
- package/src/lib/cms-routing.module.ts +0 -111
- package/src/lib/cms.module.ts +0 -119
- package/src/lib/components/admin/entries/create-or-edit-entries.component.html +0 -115
- package/src/lib/components/admin/entries/create-or-edit-entries.component.scss +0 -25
- 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 -287
- package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +0 -36
- package/src/lib/components/admin/entries/create.component.html +0 -13
- package/src/lib/components/admin/entries/create.component.scss +0 -21
- package/src/lib/components/admin/entries/create.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/create.component.ts +0 -103
- package/src/lib/components/admin/entries/edit.component.html +0 -9
- package/src/lib/components/admin/entries/edit.component.scss +0 -26
- package/src/lib/components/admin/entries/edit.component.spec.ts +0 -21
- package/src/lib/components/admin/entries/edit.component.ts +0 -103
- package/src/lib/components/admin/entries/entries.component.html +0 -106
- package/src/lib/components/admin/entries/entries.component.scss +0 -80
- 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 -10
- package/src/lib/components/admin/fields/create-field.component.spec.ts +0 -21
- package/src/lib/components/admin/fields/create-field.component.ts +0 -68
- package/src/lib/components/admin/fields/create-or-edit-field.component.html +0 -39
- package/src/lib/components/admin/fields/create-or-edit-field.component.scss +0 -0
- package/src/lib/components/admin/fields/create-or-edit-field.component.spec.ts +0 -21
- package/src/lib/components/admin/fields/create-or-edit-field.component.ts +0 -119
- 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 -13
- 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 -100
- 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 -132
- package/src/lib/components/admin/fields/fields.component.html +0 -73
- package/src/lib/components/admin/fields/fields.component.scss +0 -11
- package/src/lib/components/admin/fields/fields.component.spec.ts +0 -21
- package/src/lib/components/admin/fields/fields.component.ts +0 -111
- package/src/lib/components/admin/fields/index.ts +0 -6
- package/src/lib/components/admin/index.ts +0 -4
- package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +0 -36
- 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 -191
- package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +0 -24
- 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 -412
- 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 -191
- package/src/lib/components/admin/sections/sections.component.scss +0 -26
- package/src/lib/components/admin/sections/sections.component.spec.ts +0 -21
- package/src/lib/components/admin/sections/sections.component.ts +0 -334
- package/src/lib/components/admin/sites/create-or-update-sites-input-base.ts +0 -31
- package/src/lib/components/admin/sites/index.ts +0 -2
- package/src/lib/components/admin/sites/sites.component.html +0 -154
- package/src/lib/components/admin/sites/sites.component.scss +0 -19
- package/src/lib/components/admin/sites/sites.component.spec.ts +0 -21
- package/src/lib/components/admin/sites/sites.component.ts +0 -293
- 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 -0
- 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 -115
- 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 -20
- 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 -110
- package/src/lib/components/dynamic-form/entry/index.ts +0 -3
- package/src/lib/components/dynamic-form/form-control-group.ts +0 -31
- 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 -147
- 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 -238
- 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 -104
- 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 -55
- package/src/lib/components/dynamic-form/table/table-control.component.scss +0 -10
- 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 -107
- package/src/lib/components/index.ts +0 -2
- package/src/lib/constants/index.ts +0 -1
- package/src/lib/constants/styles.ts +0 -31
- 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/dynamic-forms/form-admin.service.ts +0 -21
- package/src/lib/proxy/admin/dynamic-forms/models.ts +0 -5
- package/src/lib/proxy/admin/entries/entry-admin.service.ts +0 -100
- package/src/lib/proxy/admin/entries/models.ts +0 -73
- 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/sections/entry-type-admin.service.ts +0 -55
- package/src/lib/proxy/admin/sections/section-admin.service.ts +0 -74
- package/src/lib/proxy/admin/sites/site-admin.service.ts +0 -72
- package/src/lib/proxy/dignite/abp/data/models.ts +0 -4
- package/src/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +0 -65
- package/src/lib/proxy/dignite/file-explorer/files/file-descriptor.service.ts +0 -86
- package/src/lib/proxy/dignite/file-explorer/files/models.ts +0 -57
- package/src/lib/proxy/entries/entry-status.enum.ts +0 -8
- package/src/lib/proxy/fields/models.ts +0 -9
- package/src/lib/proxy/generate-proxy.json +0 -11821
- package/src/lib/proxy/microsoft/extensions/primitives/models.ts +0 -9
- package/src/lib/proxy/sections/models.ts +0 -14
- package/src/lib/proxy/sections/section-type.enum.ts +0 -9
- package/src/lib/proxy/sites/models.ts +0 -5
- package/src/lib/proxy/volo/abp/content/models.ts +0 -6
- 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 -41
- package/src/lib/services/index.ts +0 -4
- package/src/lib/services/simple-reuse-strategy.ts +0 -49
- package/src/lib/services/update-list.service.ts +0 -15
- package/src/lib/toolbar/index.ts +0 -2
- package/src/lib/toolbar/toolbar-btn-default-action.ts +0 -171
- package/src/lib/toolbar/toolbar-config.ts +0 -95
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -20
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- /package/{src/lib/proxy/admin/dynamic-forms/index.ts → lib/proxy/admin/dynamic-forms/index.d.ts} +0 -0
- /package/{src/lib/proxy/admin/entries/index.ts → lib/proxy/admin/entries/index.d.ts} +0 -0
- /package/{src/lib/proxy/admin/fields/index.ts → lib/proxy/admin/fields/index.d.ts} +0 -0
- /package/{src/lib/proxy/admin/index.ts → lib/proxy/admin/index.d.ts} +0 -0
- /package/{src/lib/proxy/admin/sections/index.ts → lib/proxy/admin/sections/index.d.ts} +0 -0
- /package/{src/lib/proxy/admin/sites/index.ts → lib/proxy/admin/sites/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/abp/data/index.ts → lib/proxy/dignite/abp/data/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/abp/index.ts → lib/proxy/dignite/abp/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/file-explorer/directories/index.ts → lib/proxy/dignite/file-explorer/directories/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/file-explorer/files/index.ts → lib/proxy/dignite/file-explorer/files/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/file-explorer/index.ts → lib/proxy/dignite/file-explorer/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/index.ts → lib/proxy/dignite/index.d.ts} +0 -0
- /package/{src/lib/proxy/entries/index.ts → lib/proxy/entries/index.d.ts} +0 -0
- /package/{src/lib/proxy/fields/index.ts → lib/proxy/fields/index.d.ts} +0 -0
- /package/{src/lib/proxy/index.ts → lib/proxy/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/asp-net-core/index.ts → lib/proxy/microsoft/asp-net-core/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/asp-net-core/mvc/index.ts → lib/proxy/microsoft/asp-net-core/mvc/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/extensions/index.ts → lib/proxy/microsoft/extensions/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/extensions/primitives/index.ts → lib/proxy/microsoft/extensions/primitives/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/index.ts → lib/proxy/microsoft/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/net/http/headers/index.ts → lib/proxy/microsoft/net/http/headers/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/net/http/index.ts → lib/proxy/microsoft/net/http/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/net/index.ts → lib/proxy/microsoft/net/index.d.ts} +0 -0
- /package/{src/lib/proxy/sections/index.ts → lib/proxy/sections/index.d.ts} +0 -0
- /package/{src/lib/proxy/sites/index.ts → lib/proxy/sites/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/abp/content/index.ts → lib/proxy/volo/abp/content/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/abp/index.ts → lib/proxy/volo/abp/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/cms-kit/index.ts → lib/proxy/volo/cms-kit/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/cms-kit/users/index.ts → lib/proxy/volo/cms-kit/users/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/index.ts → lib/proxy/volo/index.d.ts} +0 -0
|
@@ -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,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
::ng-deep .entry-control-page {
|
|
3
|
-
.form-select {
|
|
4
|
-
padding: 0;
|
|
5
|
-
}
|
|
6
|
-
nz-select {
|
|
7
|
-
width: 100%;
|
|
8
|
-
.ant-select-selector {
|
|
9
|
-
background: transparent !important;
|
|
10
|
-
border: none !important;
|
|
11
|
-
padding: 0.275rem 1.25rem !important;
|
|
12
|
-
box-shadow: none !important;
|
|
13
|
-
height: auto !important;
|
|
14
|
-
}
|
|
15
|
-
.anticon-search,.anticon-down{
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
@@ -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,110 +0,0 @@
|
|
|
1
|
-
import { Component, ElementRef, Input, ViewChild, ViewContainerRef, inject } from '@angular/core';
|
|
2
|
-
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
3
|
-
import { EntryAdminService } from '../../../proxy/admin/entries';
|
|
4
|
-
import { EntryStatus } from '../../../proxy/entries/entry-status.enum';
|
|
5
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
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
|
-
await this.AfterInit()
|
|
71
|
-
await this.getEntryAssignList()
|
|
72
|
-
this.submitclick.nativeElement.click();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
AfterInit() {
|
|
77
|
-
return new Promise((resolve, rejects) => {
|
|
78
|
-
let ValidatorsArray = []
|
|
79
|
-
if (this._fields.required) {
|
|
80
|
-
ValidatorsArray.push(Validators.required)
|
|
81
|
-
}
|
|
82
|
-
let newControl = this.fb.control(this._selected, ValidatorsArray)
|
|
83
|
-
let extraProperties = this._entity.get(this._parentFiledName) as FormGroup
|
|
84
|
-
extraProperties.setControl(this._fields.field.name, newControl)
|
|
85
|
-
resolve(true)
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**获取对应的条目 */
|
|
90
|
-
getEntryAssignList(filter = '') {
|
|
91
|
-
return new Promise((resolve, rejects) => {
|
|
92
|
-
this._EntryAdminService.getList({
|
|
93
|
-
culture: this._culture,
|
|
94
|
-
sectionId: this._fields.field.formConfiguration['Entry.SectionId'],
|
|
95
|
-
skipCount: 0,
|
|
96
|
-
maxResultCount: 30,
|
|
97
|
-
status: EntryStatus.Published,
|
|
98
|
-
filter: filter
|
|
99
|
-
}).subscribe(res => {
|
|
100
|
-
this.listOfOption = res.items
|
|
101
|
-
resolve(true)
|
|
102
|
-
})
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** */
|
|
107
|
-
async SelectChange(event) {
|
|
108
|
-
await this.getEntryAssignList(event)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { EntryConfigComponent, EntryControlComponent } from "./entry";
|
|
2
|
-
import { MatrixConfigComponent } from "./matrix/matrix-config.component";
|
|
3
|
-
import { MatrixControlComponent } from "./matrix/matrix-control.component";
|
|
4
|
-
import { TableConfigComponent, TableControlComponent } from "./table";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 表单控件分组-包含配置,控件,显示的数组
|
|
8
|
-
*/
|
|
9
|
-
export const FieldControlGroup: any[] = [
|
|
10
|
-
{
|
|
11
|
-
displayName: '表格',
|
|
12
|
-
name: 'Table',
|
|
13
|
-
fieldConfigComponent: TableConfigComponent,
|
|
14
|
-
fieldComponent: TableControlComponent,
|
|
15
|
-
// fieldViewComponent:TextBoxViewComponent,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
displayName: '矩阵',
|
|
19
|
-
name: 'Matrix',
|
|
20
|
-
fieldConfigComponent: MatrixConfigComponent,
|
|
21
|
-
fieldComponent: MatrixControlComponent,
|
|
22
|
-
// fieldViewComponent:TextBoxViewComponent,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
displayName: '条目',
|
|
26
|
-
name: 'Entry',
|
|
27
|
-
fieldConfigComponent: EntryConfigComponent,
|
|
28
|
-
fieldComponent: EntryControlComponent,
|
|
29
|
-
// fieldViewComponent:TextBoxViewComponent,
|
|
30
|
-
},
|
|
31
|
-
];
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
<form [formGroup]="_Entity">
|
|
2
|
-
<div formGroupName="formConfiguration">
|
|
3
|
-
<div class="mb-2">
|
|
4
|
-
<label class="form-label">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>
|
|
5
|
-
<div class="row">
|
|
6
|
-
<div class="col-md-3">
|
|
7
|
-
<div class="list-group">
|
|
8
|
-
<li class="list-group-item d-flex align-items-center justify-content-between"
|
|
9
|
-
aria-current="true">
|
|
10
|
-
{{'Cms::MatrixBlockType' | abpLocalization}}
|
|
11
|
-
<button class="btn btn-light btn-sm p-0" (click.stop)="addMatrixBlockType()">
|
|
12
|
-
<i class="fas fa-plus-circle p-1"></i>
|
|
13
|
-
</button>
|
|
14
|
-
</li>
|
|
15
|
-
<ng-container *ngFor="let item of MatrixBlockTypes.controls;let i =index">
|
|
16
|
-
<button type="button" (click.stop)="selectMatrixBlockChange(i)"
|
|
17
|
-
class="list-group-item d-flex align-items-center justify-content-between list-group-item-action "
|
|
18
|
-
[class.active]="i===selectMatrixBlockIndex">
|
|
19
|
-
<div>
|
|
20
|
-
<div>{{item.value.displayName}}</div>
|
|
21
|
-
<div>{{item.value.name}}</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div ngbDropdown class="d-inline-block">
|
|
24
|
-
<button type="button" class="btn btn-light btn-sm" id="dropdownBasic1"
|
|
25
|
-
style="z-index: 8;" ngbDropdownToggle></button>
|
|
26
|
-
<div ngbDropdownMenu aria-labelledby="dropdownBasic1" style="z-index: 9;">
|
|
27
|
-
<button ngbDropdownItem
|
|
28
|
-
(click.stop)="EditMatrixBlock(item.value)">{{'AbpUi::Edit' | abpLocalization}}</button>
|
|
29
|
-
<button ngbDropdownItem
|
|
30
|
-
(click.stop)="DeleteMatrixBlock(i)">{{'AbpUi::Delete' | abpLocalization}}</button>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</button>
|
|
34
|
-
</ng-container>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="col-md-3">
|
|
38
|
-
<div class="list-group" *ngIf="MatrixBlockTypes?.controls.length>0">
|
|
39
|
-
<li class="list-group-item d-flex align-items-center justify-content-between"
|
|
40
|
-
aria-current="true">
|
|
41
|
-
{{'Cms::Fields' | abpLocalization}}
|
|
42
|
-
<button class="btn btn-light btn-sm p-0" (click.stop)="addMatrixField()">
|
|
43
|
-
<i class="fas fa-plus-circle p-1"></i>
|
|
44
|
-
</button>
|
|
45
|
-
</li>
|
|
46
|
-
<ng-container *ngFor="let item of MatrixBlockTypes.controls;let i =index">
|
|
47
|
-
<ng-container *ngIf="i === selectMatrixBlockIndex">
|
|
48
|
-
<ng-container *ngFor="let el of item.controls['fields'].controls;let fi =index">
|
|
49
|
-
<button type="button" (click.stop)="selectMatrixFieldChange(i,fi)"
|
|
50
|
-
class="list-group-item d-flex align-items-center justify-content-between list-group-item-action "
|
|
51
|
-
[class.active]="fi===selectMatrixFieldIndex">
|
|
52
|
-
<div>
|
|
53
|
-
<div>{{el.value.displayName}}</div>
|
|
54
|
-
<div>{{el.value.name}}</div>
|
|
55
|
-
</div>
|
|
56
|
-
<button type="button"
|
|
57
|
-
(click.stop)="deleteMatrixField(item.controls['fields'],fi)"
|
|
58
|
-
class="btn btn-sm btn-li">{{'AbpUi::Delete' | abpLocalization}}</button>
|
|
59
|
-
</button>
|
|
60
|
-
</ng-container>
|
|
61
|
-
</ng-container>
|
|
62
|
-
</ng-container>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="col-md-6" formArrayName="MatrixBlockTypes">
|
|
66
|
-
<ng-container *ngFor="let item of MatrixBlockTypes.controls;let i =index">
|
|
67
|
-
<div [formGroupName]="i" [hidden]="i !== selectMatrixBlockIndex">
|
|
68
|
-
<div formArrayName="fields">
|
|
69
|
-
<ng-container *ngFor="let itemf of item.controls['fields'].controls;let fi =index">
|
|
70
|
-
<div [formGroupName]="fi" [hidden]="fi !== selectMatrixFieldIndex">
|
|
71
|
-
<div class="mb-2">
|
|
72
|
-
<label class="form-label"
|
|
73
|
-
for="displayName">{{'Cms::DisplayName' | abpLocalization}}</label>
|
|
74
|
-
<input type="text" class="form-control" formControlName="displayName"
|
|
75
|
-
(blur)="MatrixFieldDisplayNameInputBlur($event)">
|
|
76
|
-
</div>
|
|
77
|
-
<div class="mb-2">
|
|
78
|
-
<label class="form-label"
|
|
79
|
-
for="name">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>
|
|
80
|
-
<input type="text" class="form-control" formControlName="name">
|
|
81
|
-
<div class="form-text">
|
|
82
|
-
{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="mb-2">
|
|
85
|
-
<label class="form-label"
|
|
86
|
-
for="description">{{'Cms::Description' | abpLocalization}}</label>
|
|
87
|
-
<input type="text" class="form-control" formControlName="description">
|
|
88
|
-
</div>
|
|
89
|
-
<div class="mb-2">
|
|
90
|
-
<label class="form-label"
|
|
91
|
-
for="formControlName">{{'Cms::FieldType' | abpLocalization}}</label>
|
|
92
|
-
<select class="form-select" formControlName="formControlName" (change)="setConfigComponent()">
|
|
93
|
-
<ng-container *ngFor="let itemC of _FieldControlGroup;let i =index">
|
|
94
|
-
<option [value]="itemC.name">{{itemC.displayName}}</option>
|
|
95
|
-
</ng-container>
|
|
96
|
-
</select>
|
|
97
|
-
</div>
|
|
98
|
-
<ng-container *ngIf="itemf.value.formControlName&&item">
|
|
99
|
-
<df-dynamic [type]="itemf.value.formControlName" [entity]="item"
|
|
100
|
-
[selected]="_selected?_selected['formConfiguration']['MatrixBlockTypes'][i]['fields'][fi]:''"></df-dynamic>
|
|
101
|
-
</ng-container>
|
|
102
|
-
</div>
|
|
103
|
-
</ng-container>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</ng-container>
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<button type="submit" (abpInit)="submitclick?.nativeElement?.click()" style="display: none;"
|
|
112
|
-
#submitclick></button>
|
|
113
|
-
</div>
|
|
114
|
-
</form>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<abp-modal [(visible)]="matrixModalOpen" [busy]="modalBusy" (visibleChange)="matrixModalVisibleChange($event)" >
|
|
119
|
-
<ng-template #abpHeader>
|
|
120
|
-
<h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>
|
|
121
|
-
</ng-template>
|
|
122
|
-
<ng-template #abpBody>
|
|
123
|
-
<ng-template #loaderRef>
|
|
124
|
-
<div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
|
|
125
|
-
</ng-template>
|
|
126
|
-
<ng-container *ngIf="matrixModalForm; else loaderRef">
|
|
127
|
-
<form class="sites-modal-form" #myForm="ngForm" [formGroup]="matrixModalForm"
|
|
128
|
-
(ngSubmit)="createOrEditSave()">
|
|
129
|
-
<button type="submit" #matrixModalModalSubmit style="display: none"></button>
|
|
130
|
-
<div class="mb-2">
|
|
131
|
-
<label class="form-label" for="displayName">{{'Cms::DisplayName' | abpLocalization}}</label>
|
|
132
|
-
<input type="text" class="form-control" formControlName="displayName"
|
|
133
|
-
(blur)="displayNameInputBlur($event)">
|
|
134
|
-
</div>
|
|
135
|
-
<div class="mb-2">
|
|
136
|
-
<label class="form-label" for="name">{{'Cms::Name' | abpLocalization}}</label>
|
|
137
|
-
<input type="text" class="form-control" formControlName="name">
|
|
138
|
-
</div>
|
|
139
|
-
</form>
|
|
140
|
-
</ng-container>
|
|
141
|
-
</ng-template>
|
|
142
|
-
<ng-template #abpFooter>
|
|
143
|
-
<button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
|
|
144
|
-
<abp-button iconClass="fa fa-check"
|
|
145
|
-
(click)="matrixModalModalSubmit.nativeElement.click()">{{'AbpUi::Save' | abpLocalization}}</abp-button>
|
|
146
|
-
</ng-template>
|
|
147
|
-
</abp-modal>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { MatrixConfigComponent } from './matrix-config.component';
|
|
4
|
-
|
|
5
|
-
describe('MatrixConfigComponent', () => {
|
|
6
|
-
let component: MatrixConfigComponent;
|
|
7
|
-
let fixture: ComponentFixture<MatrixConfigComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [MatrixConfigComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(MatrixConfigComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { Component, ElementRef, Inject, Input, QueryList, ViewChild, ViewChildren, ViewContainerRef, inject } from '@angular/core';
|
|
2
|
-
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
|
3
|
-
import { MatrixConfig, MatrixItemConfig } from './matrix-config';
|
|
4
|
-
import { CmsApiService, FieldAbstractsService } from '../../../services';
|
|
5
|
-
// import { CreateDynamicComponentsService, DfApiService, } from '../../../services';
|
|
6
|
-
// import { getExcludeAssignControl } from '../form-control-group';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'df-matrix-config',
|
|
10
|
-
templateUrl: './matrix-config.component.html',
|
|
11
|
-
styleUrls: ['./matrix-config.component.scss']
|
|
12
|
-
})
|
|
13
|
-
export class MatrixConfigComponent {
|
|
14
|
-
|
|
15
|
-
constructor(
|
|
16
|
-
private fb: FormBuilder,
|
|
17
|
-
private _CmsApiService: CmsApiService,
|
|
18
|
-
private _FieldAbstractsService: FieldAbstractsService,
|
|
19
|
-
) { }
|
|
20
|
-
|
|
21
|
-
/**表单控件组 */
|
|
22
|
-
_FieldControlGroup: any[]
|
|
23
|
-
/**表单控件类型 */
|
|
24
|
-
_type: any
|
|
25
|
-
@Input()
|
|
26
|
-
public set type(v: any) {
|
|
27
|
-
this._type = v
|
|
28
|
-
this.dataLoaded()
|
|
29
|
-
}
|
|
30
|
-
/**表单实体 */
|
|
31
|
-
_Entity: FormGroup | undefined
|
|
32
|
-
@Input()
|
|
33
|
-
public set Entity(v: FormGroup) {
|
|
34
|
-
this._Entity = v;
|
|
35
|
-
this.dataLoaded()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**选择的表单信息 */
|
|
40
|
-
_selected: any
|
|
41
|
-
@Input()
|
|
42
|
-
public set selected(v: any) {
|
|
43
|
-
|
|
44
|
-
if (v) {
|
|
45
|
-
this._selected = v
|
|
46
|
-
this.dataLoaded()
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@ViewChild('submitclick', { static: true }) submitclick: ElementRef;
|
|
52
|
-
|
|
53
|
-
async dataLoaded() {
|
|
54
|
-
if (this._Entity && this._type) {
|
|
55
|
-
await this.AfterInit()
|
|
56
|
-
this.submitclick.nativeElement.click();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
AfterInit() {
|
|
61
|
-
return new Promise(async (resolve, rejects) => {
|
|
62
|
-
this._FieldControlGroup = this._FieldAbstractsService.getExcludeAssignControl(this._type)
|
|
63
|
-
this._Entity.setControl('formConfiguration', this.fb.group(new MatrixConfig()))
|
|
64
|
-
await this.setSelectValue()
|
|
65
|
-
this.formConfiguration.patchValue(this._selected.formConfiguration)
|
|
66
|
-
resolve(true)
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
setSelectValue() {
|
|
72
|
-
return new Promise((resolve, rejects) => {
|
|
73
|
-
if (this._selected && this._selected.formControlName == this._type) {
|
|
74
|
-
this._selected.formConfiguration['MatrixBlockTypes'].forEach(((el, index) => {
|
|
75
|
-
this.addMatrixBlockTypeItem(el)
|
|
76
|
-
el.fields.forEach((elf, indexf) => {
|
|
77
|
-
this.addMatrixFieldItem(elf, index)
|
|
78
|
-
})
|
|
79
|
-
}))
|
|
80
|
-
resolve(true)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
})
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**获取表单配置 */
|
|
87
|
-
get formConfiguration() {
|
|
88
|
-
return this._Entity.get('formConfiguration') as FormGroup
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**获取表单配置下的矩阵块表单数组 */
|
|
92
|
-
get MatrixBlockTypes() {
|
|
93
|
-
return this.formConfiguration.controls['MatrixBlockTypes'] as FormArray
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/**模态框-状态 */
|
|
98
|
-
matrixModalOpen: boolean = false
|
|
99
|
-
/**模态框-是否正在编辑 */
|
|
100
|
-
isMatrixModalEdit: any = false
|
|
101
|
-
|
|
102
|
-
/**模态框-用于确定模态的繁忙状态是否为真 */
|
|
103
|
-
modalBusy: boolean = false
|
|
104
|
-
|
|
105
|
-
/**模态框-表单 */
|
|
106
|
-
matrixModalForm: FormGroup | undefined;
|
|
107
|
-
|
|
108
|
-
/**表单控件模板-用于在form外提交submit */
|
|
109
|
-
@ViewChild('matrixModalModalSubmit', { static: false }) matrixModalModalSubmit: ElementRef;
|
|
110
|
-
|
|
111
|
-
/**矩阵块-选择的下标 */
|
|
112
|
-
selectMatrixBlockIndex: any = 0
|
|
113
|
-
|
|
114
|
-
/**矩阵块-选择的矩阵下字段的下标 */
|
|
115
|
-
selectMatrixFieldIndex: any = 0
|
|
116
|
-
|
|
117
|
-
/**模态框-状态改变 */
|
|
118
|
-
matrixModalVisibleChange(event) {
|
|
119
|
-
if (!event) {
|
|
120
|
-
this.isMatrixModalEdit = false
|
|
121
|
-
this.matrixModalForm = undefined
|
|
122
|
-
return
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
/**矩阵块--新增-打开模态框 */
|
|
128
|
-
addMatrixBlockType() {
|
|
129
|
-
this.matrixModalForm = this.fb.group(new MatrixItemConfig())
|
|
130
|
-
this.matrixModalOpen = true
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/**模态框--矩阵表单保存提交 */
|
|
136
|
-
createOrEditSave() {
|
|
137
|
-
let input = this.matrixModalForm.value
|
|
138
|
-
if (!this.matrixModalForm.valid) return
|
|
139
|
-
if (this.isMatrixModalEdit) {
|
|
140
|
-
let MatrixBlockTypesItem = this.MatrixBlockTypes.at(this.selectMatrixBlockIndex) as FormGroup
|
|
141
|
-
MatrixBlockTypesItem.patchValue({
|
|
142
|
-
...input
|
|
143
|
-
})
|
|
144
|
-
} else {
|
|
145
|
-
this.addMatrixBlockTypeItem(input)
|
|
146
|
-
}
|
|
147
|
-
this.matrixModalOpen = false
|
|
148
|
-
}
|
|
149
|
-
/**新增矩阵块-向数组表单中增加项 */
|
|
150
|
-
addMatrixBlockTypeItem(input) {
|
|
151
|
-
this.MatrixBlockTypes.push(new FormGroup({
|
|
152
|
-
displayName: new FormControl(input.displayName, Validators.required),
|
|
153
|
-
name: new FormControl(input.name, Validators.required),
|
|
154
|
-
fields: new FormArray([])
|
|
155
|
-
}))
|
|
156
|
-
}
|
|
157
|
-
/**编辑矩阵块 */
|
|
158
|
-
EditMatrixBlock(input) {
|
|
159
|
-
this.matrixModalForm = this.fb.group(new MatrixItemConfig())
|
|
160
|
-
this.matrixModalForm.patchValue({
|
|
161
|
-
...input
|
|
162
|
-
})
|
|
163
|
-
this.matrixModalOpen = true
|
|
164
|
-
this.isMatrixModalEdit = true
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**删除矩阵块 */
|
|
168
|
-
DeleteMatrixBlock(index) {
|
|
169
|
-
this.MatrixBlockTypes.removeAt(index)
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**矩阵块-选择 */
|
|
173
|
-
selectMatrixBlockChange(index) {
|
|
174
|
-
this.selectMatrixBlockIndex = index
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**矩阵字段-新增 */
|
|
178
|
-
addMatrixField() {
|
|
179
|
-
this.addMatrixFieldItem('', this.selectMatrixBlockIndex)
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
/**矩阵字段-新增矩阵字段项 */
|
|
183
|
-
addMatrixFieldItem(input: any = '', selectMatrixBlockIndex) {
|
|
184
|
-
/**矩阵下标的矩阵项Form */
|
|
185
|
-
let MatrixBlockTypesItemForm = this.MatrixBlockTypes.at(selectMatrixBlockIndex) as FormGroup
|
|
186
|
-
let MatrixFieldItemForm = MatrixBlockTypesItemForm.get('fields') as FormArray
|
|
187
|
-
MatrixFieldItemForm.push(this.fb.group({
|
|
188
|
-
/**字段名称 Display name of this field */
|
|
189
|
-
displayName: [input.displayName, [Validators.required]],
|
|
190
|
-
/**字段唯一名称 Unique Name*/
|
|
191
|
-
name: [input.name, [Validators.required]],
|
|
192
|
-
/**描述 说明 */
|
|
193
|
-
description: [input.description, []],
|
|
194
|
-
/**FieldType字段类型 表单控件名称 */
|
|
195
|
-
formControlName: [input.formControlName || 'TextEdit', [Validators.required]],
|
|
196
|
-
//动态表单配置
|
|
197
|
-
formConfiguration: new FormGroup({}),
|
|
198
|
-
}))
|
|
199
|
-
//
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**删除矩阵字段项 */
|
|
203
|
-
deleteMatrixField(MatrixFieldForm, index) {
|
|
204
|
-
MatrixFieldForm.removeAt(index)
|
|
205
|
-
this.selectMatrixFieldIndex = 0
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**矩阵字段-选择 */
|
|
209
|
-
selectMatrixFieldChange(MatrixBlockIndex, MatrixFieldIndex) {
|
|
210
|
-
this.selectMatrixFieldIndex = MatrixFieldIndex
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
get nameInput() {
|
|
214
|
-
return this.matrixModalForm?.get('name')
|
|
215
|
-
}
|
|
216
|
-
get FieldnameInput() {
|
|
217
|
-
let MatrixBlockTypesItemForm = this.MatrixBlockTypes.at(this.selectMatrixBlockIndex) as FormGroup
|
|
218
|
-
let MatrixFieldItemForm = MatrixBlockTypesItemForm.get('fields') as FormArray
|
|
219
|
-
return MatrixFieldItemForm.at(this.selectMatrixFieldIndex).get('name')
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**矩阵displayNameInput字段失去焦点 */
|
|
223
|
-
displayNameInputBlur(event) {
|
|
224
|
-
let value = event.target.value
|
|
225
|
-
let pinyin = this._CmsApiService.chineseToPinyin(value)
|
|
226
|
-
let nameInput = this.nameInput
|
|
227
|
-
if (nameInput.value) return
|
|
228
|
-
nameInput.patchValue(pinyin)
|
|
229
|
-
}
|
|
230
|
-
/**矩阵displayNameInput字段失去焦点 */
|
|
231
|
-
MatrixFieldDisplayNameInputBlur(event) {
|
|
232
|
-
let value = event.target.value
|
|
233
|
-
let pinyin = this._CmsApiService.chineseToPinyin(value)
|
|
234
|
-
let FieldnameInput = this.FieldnameInput
|
|
235
|
-
if (FieldnameInput.value) return
|
|
236
|
-
FieldnameInput.patchValue(pinyin)
|
|
237
|
-
}
|
|
238
|
-
}
|