@abp/ng.theme.shared 4.4.1 → 5.0.0-beta.1-1
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/abp-ng.theme.shared.d.ts +1 -34
- package/bundles/abp-ng.theme.shared-extensions.umd.js +473 -361
- package/bundles/abp-ng.theme.shared-extensions.umd.js.map +1 -1
- package/bundles/abp-ng.theme.shared-testing.umd.js +33 -7
- package/bundles/abp-ng.theme.shared-testing.umd.js.map +1 -1
- package/bundles/abp-ng.theme.shared.umd.js +691 -1078
- package/bundles/abp-ng.theme.shared.umd.js.map +1 -1
- package/esm2015/abp-ng.theme.shared.js +1 -34
- package/esm2015/abp-ng.theme.shared.js.map +1 -0
- package/esm2015/extensions/abp-ng.theme.shared-extensions.js +1 -5
- package/esm2015/extensions/abp-ng.theme.shared-extensions.js.map +1 -0
- package/esm2015/extensions/lib/adapters/date-time.adapter.js +7 -4
- package/esm2015/extensions/lib/adapters/date-time.adapter.js.map +1 -0
- package/esm2015/extensions/lib/adapters/date.adapter.js +7 -4
- package/esm2015/extensions/lib/adapters/date.adapter.js.map +1 -0
- package/esm2015/extensions/lib/adapters/time.adapter.js +7 -4
- package/esm2015/extensions/lib/adapters/time.adapter.js.map +1 -0
- package/esm2015/extensions/lib/components/abstract-actions/abstract-actions.component.js +9 -12
- package/esm2015/extensions/lib/components/abstract-actions/abstract-actions.component.js.map +1 -0
- package/esm2015/extensions/lib/components/date-time-picker/date-time-picker.component.js +74 -35
- package/esm2015/extensions/lib/components/date-time-picker/date-time-picker.component.js.map +1 -0
- package/esm2015/extensions/lib/components/extensible-form/extensible-form-prop.component.js +49 -34
- package/esm2015/extensions/lib/components/extensible-form/extensible-form-prop.component.js.map +1 -0
- package/esm2015/extensions/lib/components/extensible-form/extensible-form.component.js +42 -30
- package/esm2015/extensions/lib/components/extensible-form/extensible-form.component.js.map +1 -0
- package/esm2015/extensions/lib/components/extensible-table/extensible-table.component.js +59 -28
- package/esm2015/extensions/lib/components/extensible-table/extensible-table.component.js.map +1 -0
- package/esm2015/extensions/lib/components/grid-actions/grid-actions.component.js +34 -23
- package/esm2015/extensions/lib/components/grid-actions/grid-actions.component.js.map +1 -0
- package/esm2015/extensions/lib/components/page-toolbar/page-toolbar.component.js +26 -18
- package/esm2015/extensions/lib/components/page-toolbar/page-toolbar.component.js.map +1 -0
- package/esm2015/extensions/lib/constants/extra-properties.js +1 -1
- package/esm2015/extensions/lib/constants/extra-properties.js.map +1 -0
- package/esm2015/extensions/lib/directives/disabled.directive.js +15 -12
- package/esm2015/extensions/lib/directives/disabled.directive.js.map +1 -0
- package/esm2015/extensions/lib/directives/prop-data.directive.js +21 -18
- package/esm2015/extensions/lib/directives/prop-data.directive.js.map +1 -0
- package/esm2015/extensions/lib/enums/props.enum.js +1 -1
- package/esm2015/extensions/lib/enums/props.enum.js.map +1 -0
- package/esm2015/extensions/lib/models/actions.js +1 -2
- package/esm2015/extensions/lib/models/actions.js.map +1 -0
- package/esm2015/extensions/lib/models/entity-actions.js +1 -1
- package/esm2015/extensions/lib/models/entity-actions.js.map +1 -0
- package/esm2015/extensions/lib/models/entity-props.js +3 -1
- package/esm2015/extensions/lib/models/entity-props.js.map +1 -0
- package/esm2015/extensions/lib/models/form-props.js +1 -2
- package/esm2015/extensions/lib/models/form-props.js.map +1 -0
- package/esm2015/extensions/lib/models/internal/object-extensions.js +1 -1
- package/esm2015/extensions/lib/models/internal/object-extensions.js.map +1 -0
- package/esm2015/extensions/lib/models/object-extensions.js +1 -1
- package/esm2015/extensions/lib/models/object-extensions.js.map +1 -0
- package/esm2015/extensions/lib/models/props.js +1 -2
- package/esm2015/extensions/lib/models/props.js.map +1 -0
- package/esm2015/extensions/lib/models/toolbar-actions.js +1 -1
- package/esm2015/extensions/lib/models/toolbar-actions.js.map +1 -0
- package/esm2015/extensions/lib/services/extensions.service.js +9 -7
- package/esm2015/extensions/lib/services/extensions.service.js.map +1 -0
- package/esm2015/extensions/lib/tokens/extensions.token.js +2 -1
- package/esm2015/extensions/lib/tokens/extensions.token.js.map +1 -0
- package/esm2015/extensions/lib/ui-extensions.module.js +75 -39
- package/esm2015/extensions/lib/ui-extensions.module.js.map +1 -0
- package/esm2015/extensions/lib/utils/actions.util.js +1 -1
- package/esm2015/extensions/lib/utils/actions.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/enum.util.js +1 -1
- package/esm2015/extensions/lib/utils/enum.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/factory.util.js +1 -1
- package/esm2015/extensions/lib/utils/factory.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/form-props.util.js +1 -1
- package/esm2015/extensions/lib/utils/form-props.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/localization.util.js +1 -1
- package/esm2015/extensions/lib/utils/localization.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/props.util.js +1 -1
- package/esm2015/extensions/lib/utils/props.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/state.util.js +1 -1
- package/esm2015/extensions/lib/utils/state.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/typeahead.util.js +1 -1
- package/esm2015/extensions/lib/utils/typeahead.util.js.map +1 -0
- package/esm2015/extensions/lib/utils/validation.util.js +1 -1
- package/esm2015/extensions/lib/utils/validation.util.js.map +1 -0
- package/esm2015/extensions/public-api.js +1 -1
- package/esm2015/extensions/public-api.js.map +1 -0
- package/esm2015/lib/animations/bounce.animations.js +5 -5
- package/esm2015/lib/animations/bounce.animations.js.map +1 -0
- package/esm2015/lib/animations/collapse.animations.js +1 -1
- package/esm2015/lib/animations/collapse.animations.js.map +1 -0
- package/esm2015/lib/animations/fade.animations.js +1 -1
- package/esm2015/lib/animations/fade.animations.js.map +1 -0
- package/esm2015/lib/animations/index.js +1 -1
- package/esm2015/lib/animations/index.js.map +1 -0
- package/esm2015/lib/animations/modal.animations.js +1 -1
- package/esm2015/lib/animations/modal.animations.js.map +1 -0
- package/esm2015/lib/animations/slide.animations.js +1 -1
- package/esm2015/lib/animations/slide.animations.js.map +1 -0
- package/esm2015/lib/animations/toast.animations.js +1 -1
- package/esm2015/lib/animations/toast.animations.js.map +1 -0
- package/esm2015/lib/components/breadcrumb/breadcrumb.component.js +19 -21
- package/esm2015/lib/components/breadcrumb/breadcrumb.component.js.map +1 -0
- package/esm2015/lib/components/breadcrumb-items/breadcrumb-items.component.js +22 -0
- package/esm2015/lib/components/breadcrumb-items/breadcrumb-items.component.js.map +1 -0
- package/esm2015/lib/components/button/button.component.js +57 -30
- package/esm2015/lib/components/button/button.component.js.map +1 -0
- package/esm2015/lib/components/confirmation/confirmation.component.js +14 -8
- package/esm2015/lib/components/confirmation/confirmation.component.js.map +1 -0
- package/esm2015/lib/components/http-error-wrapper/http-error-wrapper.component.js +25 -20
- package/esm2015/lib/components/http-error-wrapper/http-error-wrapper.component.js.map +1 -0
- package/esm2015/lib/components/index.js +3 -6
- package/esm2015/lib/components/index.js.map +1 -0
- package/esm2015/lib/components/loader-bar/loader-bar.component.js +34 -21
- package/esm2015/lib/components/loader-bar/loader-bar.component.js.map +1 -0
- package/esm2015/lib/components/loading/loading.component.js +20 -13
- package/esm2015/lib/components/loading/loading.component.js.map +1 -0
- package/esm2015/lib/components/modal/modal-close.directive.js +14 -10
- package/esm2015/lib/components/modal/modal-close.directive.js.map +1 -0
- package/esm2015/lib/components/modal/modal-ref.service.js +7 -5
- package/esm2015/lib/components/modal/modal-ref.service.js.map +1 -0
- package/esm2015/lib/components/modal/modal.component.js +57 -65
- package/esm2015/lib/components/modal/modal.component.js.map +1 -0
- package/esm2015/lib/components/toast/toast.component.js +25 -22
- package/esm2015/lib/components/toast/toast.component.js.map +1 -0
- package/esm2015/lib/components/toast-container/toast-container.component.js +25 -16
- package/esm2015/lib/components/toast-container/toast-container.component.js.map +1 -0
- package/esm2015/lib/constants/styles.js +1 -1
- package/esm2015/lib/constants/styles.js.map +1 -0
- package/esm2015/lib/constants/validation.js +1 -1
- package/esm2015/lib/constants/validation.js.map +1 -0
- package/esm2015/lib/directives/ellipsis.directive.js +40 -24
- package/esm2015/lib/directives/ellipsis.directive.js.map +1 -0
- package/esm2015/lib/directives/index.js +2 -3
- package/esm2015/lib/directives/index.js.map +1 -0
- package/esm2015/lib/directives/loading.directive.js +20 -17
- package/esm2015/lib/directives/loading.directive.js.map +1 -0
- package/esm2015/lib/directives/ngx-datatable-default.directive.js +21 -16
- package/esm2015/lib/directives/ngx-datatable-default.directive.js.map +1 -0
- package/esm2015/lib/directives/ngx-datatable-list.directive.js +22 -18
- package/esm2015/lib/directives/ngx-datatable-list.directive.js.map +1 -0
- package/esm2015/lib/enums/index.js +1 -1
- package/esm2015/lib/enums/index.js.map +1 -0
- package/esm2015/lib/enums/route-names.js +1 -1
- package/esm2015/lib/enums/route-names.js.map +1 -0
- package/esm2015/lib/handlers/error.handler.js +28 -37
- package/esm2015/lib/handlers/error.handler.js.map +1 -0
- package/esm2015/lib/handlers/index.js +1 -1
- package/esm2015/lib/handlers/index.js.map +1 -0
- package/esm2015/lib/handlers/lazy-style.handler.js +9 -10
- package/esm2015/lib/handlers/lazy-style.handler.js.map +1 -0
- package/esm2015/lib/models/common.js +1 -1
- package/esm2015/lib/models/common.js.map +1 -0
- package/esm2015/lib/models/confirmation.js +1 -1
- package/esm2015/lib/models/confirmation.js.map +1 -0
- package/esm2015/lib/models/index.js +1 -1
- package/esm2015/lib/models/index.js.map +1 -0
- package/esm2015/lib/models/nav-item.js +1 -1
- package/esm2015/lib/models/nav-item.js.map +1 -0
- package/esm2015/lib/models/statistics.js +1 -1
- package/esm2015/lib/models/statistics.js.map +1 -0
- package/esm2015/lib/models/toaster.js +1 -1
- package/esm2015/lib/models/toaster.js.map +1 -0
- package/esm2015/lib/providers/index.js +1 -1
- package/esm2015/lib/providers/index.js.map +1 -0
- package/esm2015/lib/providers/ng-bootstrap-config.provider.js +1 -1
- package/esm2015/lib/providers/ng-bootstrap-config.provider.js.map +1 -0
- package/esm2015/lib/providers/route.provider.js +1 -1
- package/esm2015/lib/providers/route.provider.js.map +1 -0
- package/esm2015/lib/services/confirmation.service.js +7 -8
- package/esm2015/lib/services/confirmation.service.js.map +1 -0
- package/esm2015/lib/services/index.js +2 -3
- package/esm2015/lib/services/index.js.map +1 -0
- package/esm2015/lib/services/nav-items.service.js +7 -5
- package/esm2015/lib/services/nav-items.service.js.map +1 -0
- package/esm2015/lib/services/page-alert.service.js +7 -6
- package/esm2015/lib/services/page-alert.service.js.map +1 -0
- package/esm2015/lib/services/toaster.service.js +22 -21
- package/esm2015/lib/services/toaster.service.js.map +1 -0
- package/esm2015/lib/theme-shared.module.js +72 -39
- package/esm2015/lib/theme-shared.module.js.map +1 -0
- package/esm2015/lib/tokens/append-content.token.js +1 -3
- package/esm2015/lib/tokens/append-content.token.js.map +1 -0
- package/esm2015/lib/tokens/http-error.token.js +1 -1
- package/esm2015/lib/tokens/http-error.token.js.map +1 -0
- package/esm2015/lib/tokens/index.js +1 -1
- package/esm2015/lib/tokens/index.js.map +1 -0
- package/esm2015/lib/tokens/lazy-styles.token.js +1 -1
- package/esm2015/lib/tokens/lazy-styles.token.js.map +1 -0
- package/esm2015/lib/tokens/ngx-datatable-messages.token.js +1 -1
- package/esm2015/lib/tokens/ngx-datatable-messages.token.js.map +1 -0
- package/esm2015/lib/tokens/suppress-unsaved-changes-warning.token.js +1 -2
- package/esm2015/lib/tokens/suppress-unsaved-changes-warning.token.js.map +1 -0
- package/esm2015/lib/utils/date-parser-formatter.js +13 -10
- package/esm2015/lib/utils/date-parser-formatter.js.map +1 -0
- package/esm2015/lib/utils/index.js +1 -2
- package/esm2015/lib/utils/index.js.map +1 -0
- package/esm2015/lib/utils/validation-utils.js +1 -1
- package/esm2015/lib/utils/validation-utils.js.map +1 -0
- package/esm2015/public-api.js +1 -1
- package/esm2015/public-api.js.map +1 -0
- package/esm2015/testing/abp-ng.theme.shared-testing.js +1 -1
- package/esm2015/testing/abp-ng.theme.shared-testing.js.map +1 -0
- package/esm2015/testing/lib/models/config.js +1 -1
- package/esm2015/testing/lib/models/config.js.map +1 -0
- package/esm2015/testing/lib/models/index.js +1 -1
- package/esm2015/testing/lib/models/index.js.map +1 -0
- package/esm2015/testing/lib/theme-shared-testing.module.js +12 -7
- package/esm2015/testing/lib/theme-shared-testing.module.js.map +1 -0
- package/esm2015/testing/public-api.js +1 -1
- package/esm2015/testing/public-api.js.map +1 -0
- package/extensions/abp-ng.theme.shared-extensions.d.ts +1 -4
- package/extensions/lib/adapters/date-time.adapter.d.ts +3 -0
- package/extensions/lib/adapters/date.adapter.d.ts +3 -0
- package/extensions/lib/adapters/time.adapter.d.ts +3 -0
- package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +3 -0
- package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +3 -0
- package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +3 -0
- package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +3 -0
- package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +9 -4
- package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +3 -0
- package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +3 -0
- package/extensions/lib/directives/disabled.directive.d.ts +3 -0
- package/extensions/lib/directives/prop-data.directive.d.ts +3 -0
- package/extensions/lib/models/entity-props.d.ts +5 -2
- package/extensions/lib/services/extensions.service.d.ts +3 -0
- package/extensions/lib/tokens/extensions.token.d.ts +3 -1
- package/extensions/lib/ui-extensions.module.d.ts +19 -0
- package/extensions/lib/utils/state.util.d.ts +1 -1
- package/extensions/package.json +0 -1
- package/fesm2015/abp-ng.theme.shared-extensions.js +540 -409
- package/fesm2015/abp-ng.theme.shared-extensions.js.map +1 -1
- package/fesm2015/abp-ng.theme.shared-testing.js +11 -6
- package/fesm2015/abp-ng.theme.shared-testing.js.map +1 -1
- package/fesm2015/abp-ng.theme.shared.js +645 -917
- package/fesm2015/abp-ng.theme.shared.js.map +1 -1
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +3 -0
- package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +6 -0
- package/lib/components/button/button.component.d.ts +4 -1
- package/lib/components/confirmation/confirmation.component.d.ts +3 -0
- package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +6 -3
- package/lib/components/index.d.ts +2 -5
- package/lib/components/loader-bar/loader-bar.component.d.ts +3 -0
- package/lib/components/loading/loading.component.d.ts +4 -4
- package/lib/components/modal/modal-close.directive.d.ts +3 -0
- package/lib/components/modal/modal-ref.service.d.ts +3 -0
- package/lib/components/modal/modal.component.d.ts +4 -18
- package/lib/components/toast/toast.component.d.ts +5 -4
- package/lib/components/toast-container/toast-container.component.d.ts +5 -1
- package/lib/directives/ellipsis.directive.d.ts +6 -0
- package/lib/directives/index.d.ts +1 -2
- package/lib/directives/loading.directive.d.ts +3 -0
- package/lib/directives/ngx-datatable-default.directive.d.ts +3 -0
- package/lib/directives/ngx-datatable-list.directive.d.ts +3 -0
- package/lib/handlers/error.handler.d.ts +9 -7
- package/lib/handlers/lazy-style.handler.d.ts +3 -0
- package/lib/models/confirmation.d.ts +3 -3
- package/lib/models/toaster.d.ts +5 -5
- package/lib/providers/ng-bootstrap-config.provider.d.ts +1 -1
- package/lib/providers/route.provider.d.ts +1 -1
- package/lib/services/confirmation.service.d.ts +3 -0
- package/lib/services/index.d.ts +1 -2
- package/lib/services/nav-items.service.d.ts +3 -0
- package/lib/services/page-alert.service.d.ts +3 -0
- package/lib/services/toaster.service.d.ts +4 -1
- package/lib/theme-shared.module.d.ts +26 -0
- package/lib/utils/date-parser-formatter.d.ts +3 -0
- package/lib/utils/index.d.ts +0 -1
- package/package.json +4 -6
- package/testing/abp-ng.theme.shared-testing.d.ts +1 -0
- package/testing/lib/theme-shared-testing.module.d.ts +6 -0
- package/testing/package.json +0 -1
- package/abp-ng.theme.shared.metadata.json +0 -1
- package/bundles/abp-ng.theme.shared-extensions-testing.umd.js +0 -28
- package/bundles/abp-ng.theme.shared-extensions-testing.umd.js.map +0 -1
- package/bundles/abp-ng.theme.shared-extensions-testing.umd.min.js +0 -2
- package/bundles/abp-ng.theme.shared-extensions-testing.umd.min.js.map +0 -1
- package/bundles/abp-ng.theme.shared-extensions.umd.min.js +0 -17
- package/bundles/abp-ng.theme.shared-extensions.umd.min.js.map +0 -1
- package/bundles/abp-ng.theme.shared-testing.umd.min.js +0 -2
- package/bundles/abp-ng.theme.shared-testing.umd.min.js.map +0 -1
- package/bundles/abp-ng.theme.shared.umd.min.js +0 -2
- package/bundles/abp-ng.theme.shared.umd.min.js.map +0 -1
- package/esm2015/extensions/testing/abp-ng.theme.shared-extensions-testing.js +0 -5
- package/esm2015/extensions/testing/lib/ui-extensions-testing.module.js +0 -11
- package/esm2015/extensions/testing/public-api.js +0 -2
- package/esm2015/lib/components/chart/chart.component.js +0 -120
- package/esm2015/lib/components/modal/modal-container.component.js +0 -16
- package/esm2015/lib/components/sort-order-icon/sort-order-icon.component.js +0 -62
- package/esm2015/lib/components/table/table.component.js +0 -71
- package/esm2015/lib/components/table-empty-message/table-empty-message.component.js +0 -29
- package/esm2015/lib/directives/table-sort.directive.js +0 -43
- package/esm2015/lib/services/modal.service.js +0 -46
- package/esm2015/lib/utils/widget-utils.js +0 -13
- package/extensions/abp-ng.theme.shared-extensions.metadata.json +0 -1
- package/extensions/testing/abp-ng.theme.shared-extensions-testing.d.ts +0 -4
- package/extensions/testing/abp-ng.theme.shared-extensions-testing.metadata.json +0 -1
- package/extensions/testing/lib/ui-extensions-testing.module.d.ts +0 -2
- package/extensions/testing/package.json +0 -11
- package/extensions/testing/public-api.d.ts +0 -1
- package/fesm2015/abp-ng.theme.shared-extensions-testing.js +0 -18
- package/fesm2015/abp-ng.theme.shared-extensions-testing.js.map +0 -1
- package/lib/components/chart/chart.component.d.ts +0 -30
- package/lib/components/modal/modal-container.component.d.ts +0 -7
- package/lib/components/sort-order-icon/sort-order-icon.component.d.ts +0 -18
- package/lib/components/table/table.component.d.ts +0 -30
- package/lib/components/table-empty-message/table-empty-message.component.d.ts +0 -7
- package/lib/directives/table-sort.directive.d.ts +0 -21
- package/lib/services/modal.service.d.ts +0 -16
- package/lib/utils/widget-utils.d.ts +0 -3
- package/testing/abp-ng.theme.shared-testing.metadata.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disabled.directive.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/directives/disabled.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAA4B,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;AAK3C,MAAM,OAAO,iBAAiB;IAI5B,YAA4B,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAEpD,iEAAiE;IACjE,WAAW,CAAC,EAAE,WAAW,EAAiB;QACxC,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,WAAW,EAAE;YACzC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;SAC3E;IACH,CAAC;;8GAXU,iBAAiB;kGAAjB,iBAAiB;2FAAjB,iBAAiB;kBAH7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;iBAC1B;;0BAKc,IAAI;4CAFjB,WAAW;sBADV,KAAK","sourcesContent":["import { Directive, Host, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\n@Directive({\n selector: '[abpDisabled]',\n})\nexport class DisabledDirective implements OnChanges {\n @Input()\n abpDisabled: boolean;\n\n constructor(@Host() private ngControl: NgControl) {}\n\n // Related issue: https://github.com/angular/angular/issues/35330\n ngOnChanges({ abpDisabled }: SimpleChanges) {\n if (this.ngControl.control && abpDisabled) {\n this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();\n }\n }\n}\n"]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
/* eslint-disable @angular-eslint/no-input-rename */
|
|
1
2
|
import { Directive, Injector, Input, TemplateRef, ViewContainerRef, } from '@angular/core';
|
|
2
3
|
import { PropData } from '../models/props';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
3
5
|
export class PropDataDirective extends PropData {
|
|
4
6
|
constructor(tempRef, vcRef, injector) {
|
|
5
7
|
super();
|
|
6
8
|
this.tempRef = tempRef;
|
|
7
9
|
this.vcRef = vcRef;
|
|
8
|
-
// tslint:disable-next-line
|
|
9
10
|
this.getInjected = injector.get.bind(injector);
|
|
10
11
|
}
|
|
11
12
|
ngOnChanges() {
|
|
@@ -19,20 +20,22 @@ export class PropDataDirective extends PropData {
|
|
|
19
20
|
this.vcRef.clear();
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
PropDataDirective
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
PropDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: PropDataDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
PropDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: PropDataDirective, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: PropDataDirective, decorators: [{
|
|
26
|
+
type: Directive,
|
|
27
|
+
args: [{
|
|
28
|
+
exportAs: 'abpPropData',
|
|
29
|
+
selector: '[abpPropData]',
|
|
30
|
+
}]
|
|
31
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { propList: [{
|
|
32
|
+
type: Input,
|
|
33
|
+
args: ['abpPropDataFromList']
|
|
34
|
+
}], record: [{
|
|
35
|
+
type: Input,
|
|
36
|
+
args: ['abpPropDataWithRecord']
|
|
37
|
+
}], index: [{
|
|
38
|
+
type: Input,
|
|
39
|
+
args: ['abpPropDataAtIndex']
|
|
40
|
+
}] } });
|
|
41
|
+
//# sourceMappingURL=prop-data.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-data.directive.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/directives/prop-data.directive.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EACL,SAAS,EACT,QAAQ,EACR,KAAK,EAGL,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAY,MAAM,iBAAiB,CAAC;;AAMrD,MAAM,OAAO,iBACX,SAAQ,QAAyB;IAWjC,YACU,OAAyB,EACzB,KAAuB,EAC/B,QAAkB;QAElB,KAAK,EAAE,CAAC;QAJA,YAAO,GAAP,OAAO,CAAkB;QACzB,UAAK,GAAL,KAAK,CAAkB;QAK/B,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;IAED,WAAW;QACT,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAEnB,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE;YAC1C,SAAS,EAAE,IAAI,CAAC,IAAI;YACpB,KAAK,EAAE,CAAC;SACT,CAAC,CAAC;IACL,CAAC;IAED,WAAW;QACT,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;;8GAjCU,iBAAiB;kGAAjB,iBAAiB;2FAAjB,iBAAiB;kBAJ7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,aAAa;oBACvB,QAAQ,EAAE,eAAe;iBAC1B;wJAKwC,QAAQ;sBAA9C,KAAK;uBAAC,qBAAqB;gBAEa,MAAM;sBAA9C,KAAK;uBAAC,uBAAuB;gBAEQ,KAAK;sBAA1C,KAAK;uBAAC,oBAAoB","sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\nimport {\n Directive,\n Injector,\n Input,\n OnChanges,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { PropData, PropList } from '../models/props';\n\n@Directive({\n exportAs: 'abpPropData',\n selector: '[abpPropData]',\n})\nexport class PropDataDirective<L extends PropList<any>>\n extends PropData<InferredData<L>>\n implements OnChanges, OnDestroy\n{\n @Input('abpPropDataFromList') readonly propList: L;\n\n @Input('abpPropDataWithRecord') readonly record: InferredData<L>['record'];\n\n @Input('abpPropDataAtIndex') readonly index: number;\n\n readonly getInjected: InferredData<L>['getInjected'];\n\n constructor(\n private tempRef: TemplateRef<any>,\n private vcRef: ViewContainerRef,\n injector: Injector,\n ) {\n super();\n\n this.getInjected = injector.get.bind(injector);\n }\n\n ngOnChanges() {\n this.vcRef.clear();\n\n this.vcRef.createEmbeddedView(this.tempRef, {\n $implicit: this.data,\n index: 0,\n });\n }\n\n ngOnDestroy() {\n this.vcRef.clear();\n }\n}\n\ntype InferredData<L> = PropData<InferredRecord<L>>;\ntype InferredRecord<L> = L extends PropList<infer R> ? R : never;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=props.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.enum.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/enums/props.enum.ts"],"names":[],"mappings":"","sourcesContent":["export const enum ePropType {\n Boolean = 'boolean',\n Date = 'date',\n DateTime = 'dateTime',\n Email = 'email',\n Enum = 'enum',\n Hidden = 'hidden',\n MultiSelect = 'multiselect',\n Number = 'number',\n Password = 'password',\n String = 'string',\n Text = 'text',\n Time = 'time',\n Typeahead = 'typeahead',\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable:variable-name */
|
|
2
1
|
import { LinkedList } from '@abp/utils';
|
|
3
2
|
export class ActionList extends LinkedList {
|
|
4
3
|
}
|
|
@@ -44,4 +43,4 @@ export class Actions {
|
|
|
44
43
|
this.callbackList.pop();
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
//# sourceMappingURL=
|
|
46
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/models/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,MAAM,OAAgB,UAAmC,SAAQ,UAAa;CAAG;AAEjF,MAAM,OAAgB,UAAU;IAS9B,IAAI,IAAI;QACN,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF;AAID,MAAM,OAAgB,MAAM;IAC1B,YACkB,UAAkB,EAClB,UAA8B,CAAC,CAAC,EAAE,CAAC,IAAI,EACvC,SAA4B,CAAC,CAAC,EAAE,GAAE,CAAC;QAFnC,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAAgC;QACvC,WAAM,GAAN,MAAM,CAA6B;IAClD,CAAC;CACL;AAKD,MAAM,OAAgB,cAAc;IAApC;QAEU,yBAAoB,GAAsD,EAAE,CAAC;IAOvF,CAAC;IALC,GAAG,CAAC,IAAY;QACd,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAExE,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAgB,OAAO;IAW3B,YAA6B,YAA4C;QAA5C,iBAAY,GAAZ,YAAY,CAAgC;IAAG,CAAC;IAR7E,IAAI,OAAO;QACT,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAEpC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAE5D,OAAO,UAAU,CAAC;IACpB,CAAC;IAID,cAAc,CAAC,kBAAgD;QAC7D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM;YAAE,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IAC3D,CAAC;CACF","sourcesContent":["import { LinkedList } from '@abp/utils';\nimport { InjectFlags, InjectionToken, Type } from '@angular/core';\nimport { O } from 'ts-toolbelt';\n\nexport abstract class ActionList<R = any, A = Action<R>> extends LinkedList<A> {}\n\nexport abstract class ActionData<R = any> {\n abstract getInjected: <T>(\n token: Type<T> | InjectionToken<T>,\n notFoundValue?: T,\n flags?: InjectFlags,\n ) => T;\n index?: number;\n abstract record: R;\n\n get data(): ReadonlyActionData<R> {\n return {\n getInjected: this.getInjected,\n index: this.index,\n record: this.record,\n };\n }\n}\n\nexport type ReadonlyActionData<R = any> = O.Readonly<Omit<ActionData<R>, 'data'>>;\n\nexport abstract class Action<R = any> {\n constructor(\n public readonly permission: string,\n public readonly visible: ActionPredicate<R> = _ => true,\n public readonly action: ActionCallback<R> = _ => {},\n ) {}\n}\n\nexport type ActionCallback<T, R = any> = (data?: Omit<ActionData<T>, 'data'>) => R;\nexport type ActionPredicate<T> = (data?: Omit<ActionData<T>, 'data'>) => boolean;\n\nexport abstract class ActionsFactory<C extends Actions<any>> {\n protected abstract _ctor: Type<C>;\n private contributorCallbacks: ActionContributorCallbacks<InferredActionList<C>> = {};\n\n get(name: string): C {\n this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];\n\n return new this._ctor(this.contributorCallbacks[name]);\n }\n}\n\nexport abstract class Actions<L extends ActionList> {\n protected abstract _ctor: Type<L>;\n\n get actions(): L {\n const actionList = new this._ctor();\n\n this.callbackList.forEach(callback => callback(actionList));\n\n return actionList;\n }\n\n constructor(private readonly callbackList: ActionContributorCallback<L>[]) {}\n\n addContributor(contributeCallback: ActionContributorCallback<L>) {\n this.callbackList.push(contributeCallback);\n }\n\n clearContributors() {\n while (this.callbackList.length) this.callbackList.pop();\n }\n}\n\nexport type ActionContributorCallbacks<L extends ActionList<any>> = Record<\n string,\n ActionContributorCallback<L>[]\n>;\n\nexport type ActionContributorCallback<L extends ActionList<any>> = (actionList: L) => any;\n\ntype InferredActionList<C> = C extends Actions<infer L> ? L : never;\n"]}
|
|
@@ -26,4 +26,4 @@ export class EntityAction extends Action {
|
|
|
26
26
|
return arrayOfOptions.map(EntityAction.create);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=entity-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-actions.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/models/entity-actions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAGN,UAAU,EACV,OAAO,EACP,cAAc,GACf,MAAM,WAAW,CAAC;AAEnB,MAAM,OAAO,gBAA0B,SAAQ,UAA8B;CAAG;AAEhF,MAAM,OAAO,aAAuB,SAAQ,OAA4B;IAAxE;;QACY,UAAK,GAA8B,gBAAgB,CAAC;IAChE,CAAC;CAAA;AAED,MAAM,OAAO,oBAA8B,SAAQ,cAAgC;IAAnF;;QACY,UAAK,GAA2B,aAAa,CAAC;IAC1D,CAAC;CAAA;AAED,MAAM,OAAO,YAAsB,SAAQ,MAAS;IAIlD,YAAY,OAA+B;QACzC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,CAAU,OAA+B;QACpD,OAAO,IAAI,YAAY,CAAI,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,UAAU,CAAU,cAAwC;QACjE,OAAO,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;CACF","sourcesContent":["import { Type } from '@angular/core';\nimport { O } from 'ts-toolbelt';\nimport {\n Action,\n ActionContributorCallback,\n ActionContributorCallbacks,\n ActionList,\n Actions,\n ActionsFactory,\n} from './actions';\n\nexport class EntityActionList<R = any> extends ActionList<R, EntityAction<R>> {}\n\nexport class EntityActions<R = any> extends Actions<EntityActionList<R>> {\n protected _ctor: Type<EntityActionList<R>> = EntityActionList;\n}\n\nexport class EntityActionsFactory<R = any> extends ActionsFactory<EntityActions<R>> {\n protected _ctor: Type<EntityActions<R>> = EntityActions;\n}\n\nexport class EntityAction<R = any> extends Action<R> {\n readonly text: string;\n readonly icon: string;\n\n constructor(options: EntityActionOptions<R>) {\n super(options.permission, options.visible, options.action);\n this.text = options.text;\n this.icon = options.icon || '';\n }\n\n static create<R = any>(options: EntityActionOptions<R>) {\n return new EntityAction<R>(options);\n }\n\n static createMany<R = any>(arrayOfOptions: EntityActionOptions<R>[]) {\n return arrayOfOptions.map(EntityAction.create);\n }\n}\n\nexport type EntityActionOptions<R = any> = O.Optional<\n O.Writable<EntityAction<R>>,\n 'permission' | 'visible' | 'icon'\n>;\n\nexport type EntityActionDefaults<R = any> = Record<string, EntityAction<R>[]>;\nexport type EntityActionContributorCallback<R = any> = ActionContributorCallback<\n EntityActionList<R>\n>;\nexport type EntityActionContributorCallbacks<R = any> = ActionContributorCallbacks<\n EntityActionList<R>\n>;\n"]}
|
|
@@ -21,6 +21,8 @@ export class EntityProp extends Prop {
|
|
|
21
21
|
this.sortable = options.sortable || false;
|
|
22
22
|
this.valueResolver = options.valueResolver || (data => of(data.record[this.name]));
|
|
23
23
|
this.action = options.action;
|
|
24
|
+
this.component = options.component;
|
|
25
|
+
this.enumList = options.enumList;
|
|
24
26
|
}
|
|
25
27
|
static create(options) {
|
|
26
28
|
return new EntityProp(options);
|
|
@@ -29,4 +31,4 @@ export class EntityProp extends Prop {
|
|
|
29
31
|
return arrayOfOptions.map(EntityProp.create);
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=entity-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-props.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/models/entity-props.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,EAAE,EAAE,MAAM,MAAM,CAAC;AAItC,OAAO,EACL,IAAI,EAIJ,QAAQ,EACR,KAAK,EACL,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,MAAM,OAAO,cAAwB,SAAQ,QAA0B;CAAG;AAE1E,MAAM,OAAO,WAAqB,SAAQ,KAAwB;IAAlE;;QACY,UAAK,GAA4B,cAAc,CAAC;IAC5D,CAAC;CAAA;AAED,MAAM,OAAO,kBAA4B,SAAQ,YAA4B;IAA7E;;QACY,UAAK,GAAyB,WAAW,CAAC;IACtD,CAAC;CAAA;AAED,MAAM,OAAO,UAAoB,SAAQ,IAAO;IAQ9C,YAAY,OAA6B;QACvC,KAAK,CACH,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,OAAO,CAChB,CAAC;QAEF,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnF,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,MAAM,CAAU,OAA6B;QAClD,OAAO,IAAI,UAAU,CAAI,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,UAAU,CAAU,cAAsC;QAC/D,OAAO,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["import { Type } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { O } from 'ts-toolbelt';\nimport { ABP } from '@abp/ng.core';\nimport { ActionCallback } from './actions';\nimport {\n Prop,\n PropCallback,\n PropContributorCallback,\n PropContributorCallbacks,\n PropList,\n Props,\n PropsFactory,\n} from './props';\n\nexport class EntityPropList<R = any> extends PropList<R, EntityProp<R>> {}\n\nexport class EntityProps<R = any> extends Props<EntityPropList<R>> {\n protected _ctor: Type<EntityPropList<R>> = EntityPropList;\n}\n\nexport class EntityPropsFactory<R = any> extends PropsFactory<EntityProps<R>> {\n protected _ctor: Type<EntityProps<R>> = EntityProps;\n}\n\nexport class EntityProp<R = any> extends Prop<R> {\n readonly columnWidth: number | undefined;\n readonly sortable: boolean;\n readonly valueResolver: PropCallback<R, Observable<any>>;\n readonly action: ActionCallback<R>;\n readonly component: Type<any>;\n readonly enumList: Array<ABP.Option<any>>;\n\n constructor(options: EntityPropOptions<R>) {\n super(\n options.type,\n options.name,\n options.displayName,\n options.permission,\n options.visible,\n options.isExtra,\n );\n\n this.columnWidth = options.columnWidth;\n this.sortable = options.sortable || false;\n this.valueResolver = options.valueResolver || (data => of(data.record[this.name]));\n this.action = options.action;\n this.component = options.component;\n this.enumList = options.enumList;\n }\n\n static create<R = any>(options: EntityPropOptions<R>) {\n return new EntityProp<R>(options);\n }\n\n static createMany<R = any>(arrayOfOptions: EntityPropOptions<R>[]) {\n return arrayOfOptions.map(EntityProp.create);\n }\n}\n\nexport type EntityPropOptions<R = any> = O.Optional<\n O.Writable<EntityProp<R>>,\n | 'permission'\n | 'visible'\n | 'displayName'\n | 'isExtra'\n | 'columnWidth'\n | 'sortable'\n | 'valueResolver'\n | 'action'\n | 'component'\n | 'enumList'\n>;\n\nexport type EntityPropDefaults<R = any> = Record<string, EntityProp<R>[]>;\nexport type EntityPropContributorCallback<R = any> = PropContributorCallback<EntityPropList<R>>;\nexport type EntityPropContributorCallbacks<R = any> = PropContributorCallbacks<EntityPropList<R>>;\n"]}
|
|
@@ -43,11 +43,10 @@ export class FormPropData extends PropData {
|
|
|
43
43
|
constructor(injector, record) {
|
|
44
44
|
super();
|
|
45
45
|
this.record = record;
|
|
46
|
-
// tslint:disable-next-line
|
|
47
46
|
this.getInjected = injector.get.bind(injector);
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
function isFalsyValue(defaultValue) {
|
|
51
50
|
return [0, '', false].indexOf(defaultValue) > -1;
|
|
52
51
|
}
|
|
53
|
-
//# sourceMappingURL=
|
|
52
|
+
//# sourceMappingURL=form-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-props.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/models/form-props.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,IAAI,EAIJ,QAAQ,EACR,QAAQ,EAER,KAAK,EACL,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,MAAM,OAAO,YAAsB,SAAQ,QAAwB;CAAG;AAEtE,MAAM,OAAO,SAAmB,SAAQ,KAAsB;IAA9D;;QACY,UAAK,GAA0B,YAAY,CAAC;IACxD,CAAC;CAAA;AAED,MAAM,OAAO,sBAAgC,SAAQ,YAA0B;IAA/E;;QACY,UAAK,GAAuB,SAAS,CAAC;IAClD,CAAC;CAAA;AAED,MAAM,OAAO,oBAA8B,SAAQ,YAA0B;IAA7E;;QACY,UAAK,GAAuB,SAAS,CAAC;IAClD,CAAC;CAAA;AAED,MAAM,OAAO,QAAkB,SAAQ,IAAO;IAU5C,YAAY,OAA2B;QACrC,KAAK,CACH,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,OAAO,CAChB,CAAC;QAEF,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,KAAK,CAAC;QAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;QACrC,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,IAAI,IAAI,CAAC;IACvF,CAAC;IAED,MAAM,CAAC,MAAM,CAAU,OAA2B;QAChD,OAAO,IAAI,QAAQ,CAAI,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,UAAU,CAAU,cAAoC;QAC7D,OAAO,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,MAAM,OAAO,YAAsB,SAAQ,QAAW;IAGpD,YAAY,QAAkB,EAAkB,MAAS;QACvD,KAAK,EAAE,CAAC;QADsC,WAAM,GAAN,MAAM,CAAG;QAGvD,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;CACF;AAyBD,SAAS,YAAY,CAAC,YAAsC;IAC1D,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,YAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { ABP } from '@abp/ng.core';\nimport { Injector, Type } from '@angular/core';\nimport { AsyncValidatorFn, ValidatorFn } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { O } from 'ts-toolbelt';\nimport {\n Prop,\n PropCallback,\n PropContributorCallback,\n PropContributorCallbacks,\n PropData,\n PropList,\n PropPredicate,\n Props,\n PropsFactory,\n} from './props';\n\nexport class FormPropList<R = any> extends PropList<R, FormProp<R>> {}\n\nexport class FormProps<R = any> extends Props<FormPropList<R>> {\n protected _ctor: Type<FormPropList<R>> = FormPropList;\n}\n\nexport class CreateFormPropsFactory<R = any> extends PropsFactory<FormProps<R>> {\n protected _ctor: Type<FormProps<R>> = FormProps;\n}\n\nexport class EditFormPropsFactory<R = any> extends PropsFactory<FormProps<R>> {\n protected _ctor: Type<FormProps<R>> = FormProps;\n}\n\nexport class FormProp<R = any> extends Prop<R> {\n readonly validators: PropCallback<R, ValidatorFn[]>;\n readonly asyncValidators: PropCallback<R, AsyncValidatorFn[]>;\n readonly disabled: PropPredicate<R>;\n readonly readonly: PropPredicate<R>;\n readonly autocomplete: string;\n readonly defaultValue: boolean | number | string | Date;\n readonly options: PropCallback<R, Observable<ABP.Option<any>[]>> | undefined;\n readonly id: string | undefined;\n\n constructor(options: FormPropOptions<R>) {\n super(\n options.type,\n options.name,\n options.displayName,\n options.permission,\n options.visible,\n options.isExtra,\n );\n\n this.asyncValidators = options.asyncValidators || (_ => []);\n this.validators = options.validators || (_ => []);\n this.disabled = options.disabled || (_ => false);\n this.readonly = options.readonly || (_ => false);\n this.autocomplete = options.autocomplete || 'off';\n this.options = options.options;\n this.id = options.id || options.name;\n const defaultValue = options.defaultValue;\n this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || null;\n }\n\n static create<R = any>(options: FormPropOptions<R>) {\n return new FormProp<R>(options);\n }\n\n static createMany<R = any>(arrayOfOptions: FormPropOptions<R>[]) {\n return arrayOfOptions.map(FormProp.create);\n }\n}\n\nexport class FormPropData<R = any> extends PropData<R> {\n getInjected: PropData<R>['getInjected'];\n\n constructor(injector: Injector, public readonly record: R) {\n super();\n\n this.getInjected = injector.get.bind(injector);\n }\n}\n\nexport type FormPropOptions<R = any> = O.Optional<\n O.Writable<FormProp<R>>,\n | 'permission'\n | 'visible'\n | 'displayName'\n | 'isExtra'\n | 'validators'\n | 'asyncValidators'\n | 'disabled'\n | 'readonly'\n | 'autocomplete'\n | 'defaultValue'\n | 'options'\n | 'id'\n>;\n\nexport type CreateFormPropDefaults<R = any> = Record<string, FormProp<R>[]>;\nexport type CreateFormPropContributorCallback<R = any> = PropContributorCallback<FormPropList<R>>;\nexport type CreateFormPropContributorCallbacks<R = any> = PropContributorCallbacks<FormPropList<R>>;\nexport type EditFormPropDefaults<R = any> = Record<string, FormProp<R>[]>;\nexport type EditFormPropContributorCallback<R = any> = PropContributorCallback<FormPropList<R>>;\nexport type EditFormPropContributorCallbacks<R = any> = PropContributorCallbacks<FormPropList<R>>;\n\nfunction isFalsyValue(defaultValue: FormProp['defaultValue']): boolean {\n return [0, '', false].indexOf(defaultValue as any) > -1;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=object-extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-extensions.js","sourceRoot":"","sources":["../../../../../../../../packages/theme-shared/extensions/src/lib/models/internal/object-extensions.ts"],"names":[],"mappings":"","sourcesContent":["import { ePropType } from '../../enums/props.enum';\nimport { EntityPropList } from '../entity-props';\nimport { FormPropList } from '../form-props';\nimport { PropContributorCallbacks } from '../props';\n\nexport type DisplayNameGeneratorFn = (\n displayName: LocalizableStringDto,\n fallback: LocalizableStringDto,\n) => string;\n\nexport type EntityExtensions = Record<string, EntityExtensionDto>;\n\nexport interface EntityExtensionDto {\n properties: EntityExtensionProperties;\n configuration: Record<string, object>;\n}\n\nexport type EntityExtensionProperties = Record<string, ExtensionPropertyDto>;\n\nexport interface ExtensionEnumDto {\n fields: ExtensionEnumFieldDto[];\n localizationResource?: string;\n transformed?: any;\n}\n\nexport interface ExtensionEnumFieldDto {\n name?: string;\n value: any;\n}\n\nexport interface ExtensionPropertyApiCreateDto {\n isAvailable: boolean;\n}\n\nexport interface ExtensionPropertyApiDto {\n onGet: ExtensionPropertyApiGetDto;\n onCreate: ExtensionPropertyApiCreateDto;\n onUpdate: ExtensionPropertyApiUpdateDto;\n}\n\nexport interface ExtensionPropertyApiGetDto {\n isAvailable: boolean;\n}\n\nexport interface ExtensionPropertyApiUpdateDto {\n isAvailable: boolean;\n}\n\nexport interface ExtensionPropertyAttributeDto {\n typeSimple?: string;\n config: Record<string, any>;\n}\n\nexport interface ExtensionPropertyDto {\n type?: string;\n typeSimple?: ePropType;\n displayName: LocalizableStringDto;\n api: ExtensionPropertyApiDto;\n ui: ExtensionPropertyUiDto;\n attributes: ExtensionPropertyAttributeDto[];\n configuration: Record<string, any>;\n defaultValue: any;\n}\n\nexport interface ExtensionPropertyUiDto {\n onTable: ExtensionPropertyUiTableDto;\n onCreateForm: ExtensionPropertyUiFormDto;\n onEditForm: ExtensionPropertyUiFormDto;\n lookup?: ExtensionPropertyUiLookupDto;\n}\n\nexport interface ExtensionPropertyUiFormDto {\n isVisible: boolean;\n}\n\nexport interface ExtensionPropertyUiLookupDto {\n url?: string;\n resultListPropertyName?: string;\n displayPropertyName?: string;\n valuePropertyName?: string;\n filterParamName?: string;\n}\n\nexport interface ExtensionPropertyUiTableDto {\n isSortable?: boolean;\n isVisible: boolean;\n}\n\nexport interface LocalizableStringDto {\n name?: string;\n resource?: string;\n}\n\nexport interface ModuleExtensionDto {\n entities: Record<string, EntityExtensionDto>;\n configuration: Record<string, object>;\n}\n\nexport interface ObjectExtensionsDto {\n modules: Record<string, ModuleExtensionDto>;\n enums: Record<string, ExtensionEnumDto>;\n}\n\nexport interface PropContributors<T = any> {\n prop: PropContributorCallbacks<EntityPropList<T>>;\n createForm: PropContributorCallbacks<FormPropList<T>>;\n editForm: PropContributorCallbacks<FormPropList<T>>;\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as ObjectExtensions from './internal/object-extensions';
|
|
2
2
|
export { ObjectExtensions };
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=object-extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-extensions.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/models/object-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import * as ObjectExtensions from './internal/object-extensions';\n\nexport { ObjectExtensions };\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable:variable-name */
|
|
2
1
|
import { LinkedList } from '@abp/utils';
|
|
3
2
|
export class PropList extends LinkedList {
|
|
4
3
|
}
|
|
@@ -48,4 +47,4 @@ export class Props {
|
|
|
48
47
|
this.callbackList.pop();
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
//# sourceMappingURL=
|
|
50
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/models/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAKxC,MAAM,OAAgB,QAA+B,SAAQ,UAAa;CAAG;AAE7E,MAAM,OAAgB,QAAQ;IAS5B,IAAI,IAAI;QACN,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF;AAID,MAAM,OAAgB,IAAI;IACxB,YACkB,IAAe,EACf,IAAY,EACZ,WAAmB,EACnB,UAAkB,EAClB,UAA4B,CAAC,CAAC,EAAE,CAAC,IAAI,EACrC,UAAU,KAAK;QALf,SAAI,GAAJ,IAAI,CAAW;QACf,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAA8B;QACrC,YAAO,GAAP,OAAO,CAAQ;QAE/B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,IAAI,CAAC;IACnD,CAAC;CACF;AAKD,MAAM,OAAgB,YAAY;IAAlC;QAEU,yBAAoB,GAAkD,EAAE,CAAC;IAOnF,CAAC;IALC,GAAG,CAAC,IAAY;QACd,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAExE,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAgB,KAAK;IAWzB,YAA6B,YAA0C;QAA1C,iBAAY,GAAZ,YAAY,CAA8B;IAAG,CAAC;IAR3E,IAAI,KAAK;QACP,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAElC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE1D,OAAO,QAAQ,CAAC;IAClB,CAAC;IAID,cAAc,CAAC,kBAA8C;QAC3D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM;YAAE,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IAC3D,CAAC;CACF","sourcesContent":["import { LinkedList } from '@abp/utils';\nimport { InjectFlags, InjectionToken, Type } from '@angular/core';\nimport { O } from 'ts-toolbelt';\nimport { ePropType } from '../enums/props.enum';\n\nexport abstract class PropList<R = any, A = Prop<R>> extends LinkedList<A> {}\n\nexport abstract class PropData<R = any> {\n abstract getInjected: <T>(\n token: Type<T> | InjectionToken<T>,\n notFoundValue?: T,\n flags?: InjectFlags,\n ) => T;\n index?: number;\n abstract record: R;\n\n get data(): ReadonlyPropData<R> {\n return {\n getInjected: this.getInjected,\n index: this.index,\n record: this.record,\n };\n }\n}\n\nexport type ReadonlyPropData<R = any> = O.Readonly<Omit<PropData<R>, 'data'>>;\n\nexport abstract class Prop<R = any> {\n constructor(\n public readonly type: ePropType,\n public readonly name: string,\n public readonly displayName: string,\n public readonly permission: string,\n public readonly visible: PropPredicate<R> = _ => true,\n public readonly isExtra = false,\n ) {\n this.displayName = this.displayName || this.name;\n }\n}\n\nexport type PropCallback<T, R = any> = (data?: Omit<PropData<T>, 'data'>, auxData?: any) => R;\nexport type PropPredicate<T> = (data?: Omit<PropData<T>, 'data'>, auxData?: any) => boolean;\n\nexport abstract class PropsFactory<C extends Props<any>> {\n protected abstract _ctor: Type<C>;\n private contributorCallbacks: PropContributorCallbacks<InferredPropList<C>> = {};\n\n get(name: string): C {\n this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];\n\n return new this._ctor(this.contributorCallbacks[name]);\n }\n}\n\nexport abstract class Props<L extends PropList> {\n protected abstract _ctor: Type<L>;\n\n get props(): L {\n const propList = new this._ctor();\n\n this.callbackList.forEach(callback => callback(propList));\n\n return propList;\n }\n\n constructor(private readonly callbackList: PropContributorCallback<L>[]) {}\n\n addContributor(contributeCallback: PropContributorCallback<L>) {\n this.callbackList.push(contributeCallback);\n }\n\n clearContributors() {\n while (this.callbackList.length) this.callbackList.pop();\n }\n}\n\nexport type PropContributorCallbacks<L extends PropList<any>> = Record<\n string,\n PropContributorCallback<L>[]\n>;\n\nexport type PropContributorCallback<L extends PropList<any>> = (propList: L) => any;\n\ntype InferredPropList<C> = C extends Props<infer L> ? L : never;\n"]}
|
|
@@ -38,4 +38,4 @@ export class ToolbarComponent extends Action {
|
|
|
38
38
|
return arrayOfOptions.map(ToolbarComponent.create);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
//# sourceMappingURL=
|
|
41
|
+
//# sourceMappingURL=toolbar-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-actions.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/models/toolbar-actions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAGN,UAAU,EACV,OAAO,EACP,cAAc,GACf,MAAM,WAAW,CAAC;AAEnB,MAAM,OAAO,iBAA2B,SAAQ,UAG/C;CAAG;AAEJ,MAAM,OAAO,cAAwB,SAAQ,OAA6B;IAA1E;;QACY,UAAK,GAA+B,iBAAiB,CAAC;IAClE,CAAC;CAAA;AAED,MAAM,OAAO,qBAA+B,SAAQ,cAAiC;IAArF;;QACY,UAAK,GAA4B,cAAc,CAAC;IAC5D,CAAC;CAAA;AAED,MAAM,OAAO,aAAuB,SAAQ,MAAS;IAInD,YAAY,OAAgC;QAC1C,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,CAAU,OAAgC;QACrD,OAAO,IAAI,aAAa,CAAI,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,UAAU,CAAU,cAAyC;QAClE,OAAO,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;CACF;AAED,MAAM,OAAO,gBAA0B,SAAQ,MAAS;IAGtD,YAAY,OAAmC;QAC7C,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,MAAM,CAAU,OAAmC;QACxD,OAAO,IAAI,gBAAgB,CAAI,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CAAU,cAA4C;QACrE,OAAO,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;CACF","sourcesContent":["import { Type } from '@angular/core';\nimport { O } from 'ts-toolbelt';\nimport {\n Action,\n ActionContributorCallback,\n ActionContributorCallbacks,\n ActionList,\n Actions,\n ActionsFactory,\n} from './actions';\n\nexport class ToolbarActionList<R = any> extends ActionList<\n R,\n ToolbarAction<R> | ToolbarComponent<R>\n> {}\n\nexport class ToolbarActions<R = any> extends Actions<ToolbarActionList<R>> {\n protected _ctor: Type<ToolbarActionList<R>> = ToolbarActionList;\n}\n\nexport class ToolbarActionsFactory<R = any> extends ActionsFactory<ToolbarActions<R>> {\n protected _ctor: Type<ToolbarActions<R>> = ToolbarActions;\n}\n\nexport class ToolbarAction<R = any> extends Action<R> {\n readonly text: string;\n readonly icon: string;\n\n constructor(options: ToolbarActionOptions<R>) {\n super(options.permission, options.visible, options.action);\n this.text = options.text;\n this.icon = options.icon || '';\n }\n\n static create<R = any>(options: ToolbarActionOptions<R>) {\n return new ToolbarAction<R>(options);\n }\n\n static createMany<R = any>(arrayOfOptions: ToolbarActionOptions<R>[]) {\n return arrayOfOptions.map(ToolbarAction.create);\n }\n}\n\nexport class ToolbarComponent<R = any> extends Action<R> {\n readonly component: Type<any>;\n\n constructor(options: ToolbarComponentOptions<R>) {\n super(options.permission, options.visible, options.action);\n this.component = options.component;\n }\n\n static create<R = any>(options: ToolbarComponentOptions<R>) {\n return new ToolbarComponent<R>(options);\n }\n\n static createMany<R = any>(arrayOfOptions: ToolbarComponentOptions<R>[]) {\n return arrayOfOptions.map(ToolbarComponent.create);\n }\n}\n\nexport type ToolbarActionOptions<R = any> = O.Optional<\n O.Writable<ToolbarAction<R>>,\n 'permission' | 'visible' | 'icon'\n>;\n\nexport type ToolbarComponentOptions<R = any> = O.Optional<\n O.Writable<ToolbarComponent<R>>,\n 'permission' | 'visible' | 'action'\n>;\n\nexport type ToolbarActionDefaults<R = any> = Record<string, ToolbarAction<R>[]>;\nexport type ToolbarActionContributorCallback<R = any> = ActionContributorCallback<\n ToolbarActionList<R>\n>;\nexport type ToolbarActionContributorCallbacks<R = any> = ActionContributorCallbacks<\n ToolbarActionList<R>\n>;\n"]}
|
|
@@ -13,10 +13,12 @@ export class ExtensionsService {
|
|
|
13
13
|
this.editFormProps = new EditFormPropsFactory();
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
ExtensionsService.ɵ
|
|
17
|
-
ExtensionsService
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
ExtensionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
+
ExtensionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensionsService, providedIn: 'root' });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensionsService, decorators: [{
|
|
19
|
+
type: Injectable,
|
|
20
|
+
args: [{
|
|
21
|
+
providedIn: 'root',
|
|
22
|
+
}]
|
|
23
|
+
}] });
|
|
24
|
+
//# sourceMappingURL=extensions.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.service.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/services/extensions.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;AAKlE,MAAM,OAAO,iBAAiB;IAH9B;QAIW,kBAAa,GAAG,IAAI,oBAAoB,EAAK,CAAC;QAC9C,mBAAc,GAAG,IAAI,qBAAqB,EAAO,CAAC;QAClD,gBAAW,GAAG,IAAI,kBAAkB,EAAK,CAAC;QAC1C,oBAAe,GAAG,IAAI,sBAAsB,EAAK,CAAC;QAClD,kBAAa,GAAG,IAAI,oBAAoB,EAAK,CAAC;KACxD;;8GANY,iBAAiB;kHAAjB,iBAAiB,cAFhB,MAAM;2FAEP,iBAAiB;kBAH7B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { EntityActionsFactory } from '../models/entity-actions';\nimport { EntityPropsFactory } from '../models/entity-props';\nimport { CreateFormPropsFactory, EditFormPropsFactory } from '../models/form-props';\nimport { ToolbarActionsFactory } from '../models/toolbar-actions';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExtensionsService<R = any> {\n readonly entityActions = new EntityActionsFactory<R>();\n readonly toolbarActions = new ToolbarActionsFactory<R[]>();\n readonly entityProps = new EntityPropsFactory<R>();\n readonly createFormProps = new CreateFormPropsFactory<R>();\n readonly editFormProps = new EditFormPropsFactory<R>();\n}\n"]}
|
|
@@ -3,4 +3,5 @@ export const EXTENSIONS_IDENTIFIER = new InjectionToken('EXTENSIONS_IDENTIFIER')
|
|
|
3
3
|
export const EXTENSIONS_ACTION_TYPE = new InjectionToken('EXTENSIONS_ACTION_TYPE');
|
|
4
4
|
export const EXTENSIONS_ACTION_DATA = new InjectionToken('EXTENSIONS_ACTION_DATA');
|
|
5
5
|
export const EXTENSIONS_ACTION_CALLBACK = new InjectionToken('EXTENSIONS_ACTION_DATA');
|
|
6
|
-
|
|
6
|
+
export const PROP_DATA_STREAM = new InjectionToken('PROP_DATA_STREAM');
|
|
7
|
+
//# sourceMappingURL=extensions.token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.token.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/tokens/extensions.token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAK/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAS,uBAAuB,CAAC,CAAC;AAGzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAa,wBAAwB,CAAC,CAAC;AAE/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAa,wBAAwB,CAAC,CAAC;AAC/F,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,cAAc,CAC1D,wBAAwB,CACzB,CAAC;AACF,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,cAAc,CAAkB,kBAAkB,CAAC,CAAC","sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ActionCallback, ReadonlyActionData as ActionData } from '../models/actions';\nimport { ExtensionsService } from '../services/extensions.service';\nimport { Observable } from 'rxjs';\n\nexport const EXTENSIONS_IDENTIFIER = new InjectionToken<string>('EXTENSIONS_IDENTIFIER');\nexport type ActionKeys = Extract<'entityActions' | 'toolbarActions', keyof ExtensionsService>;\n\nexport const EXTENSIONS_ACTION_TYPE = new InjectionToken<ActionKeys>('EXTENSIONS_ACTION_TYPE');\n\nexport const EXTENSIONS_ACTION_DATA = new InjectionToken<ActionData>('EXTENSIONS_ACTION_DATA');\nexport const EXTENSIONS_ACTION_CALLBACK = new InjectionToken<ActionCallback<unknown>>(\n 'EXTENSIONS_ACTION_DATA',\n);\nexport const PROP_DATA_STREAM = new InjectionToken<Observable<any>>('PROP_DATA_STREAM');\n"]}
|
|
@@ -11,46 +11,82 @@ import { GridActionsComponent } from './components/grid-actions/grid-actions.com
|
|
|
11
11
|
import { PageToolbarComponent } from './components/page-toolbar/page-toolbar.component';
|
|
12
12
|
import { DisabledDirective } from './directives/disabled.directive';
|
|
13
13
|
import { PropDataDirective } from './directives/prop-data.directive';
|
|
14
|
+
import * as i0 from "@angular/core";
|
|
14
15
|
export class BaseUiExtensionsModule {
|
|
15
16
|
}
|
|
16
|
-
BaseUiExtensionsModule
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
17
|
+
BaseUiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
18
|
+
BaseUiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
|
|
19
|
+
PageToolbarComponent,
|
|
20
|
+
GridActionsComponent,
|
|
21
|
+
ExtensibleFormPropComponent,
|
|
22
|
+
ExtensibleFormComponent,
|
|
23
|
+
ExtensibleTableComponent,
|
|
24
|
+
PropDataDirective,
|
|
25
|
+
DisabledDirective], imports: [CoreModule,
|
|
26
|
+
ThemeSharedModule,
|
|
27
|
+
NgxValidateCoreModule,
|
|
28
|
+
NgbDatepickerModule,
|
|
29
|
+
NgbDropdownModule,
|
|
30
|
+
NgbTimepickerModule,
|
|
31
|
+
NgbTypeaheadModule], exports: [DateTimePickerComponent,
|
|
32
|
+
PageToolbarComponent,
|
|
33
|
+
GridActionsComponent,
|
|
34
|
+
ExtensibleFormComponent,
|
|
35
|
+
ExtensibleTableComponent,
|
|
36
|
+
PropDataDirective,
|
|
37
|
+
DisabledDirective] });
|
|
38
|
+
BaseUiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, imports: [[
|
|
39
|
+
CoreModule,
|
|
40
|
+
ThemeSharedModule,
|
|
41
|
+
NgxValidateCoreModule,
|
|
42
|
+
NgbDatepickerModule,
|
|
43
|
+
NgbDropdownModule,
|
|
44
|
+
NgbTimepickerModule,
|
|
45
|
+
NgbTypeaheadModule,
|
|
46
|
+
]] });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, decorators: [{
|
|
48
|
+
type: NgModule,
|
|
49
|
+
args: [{
|
|
50
|
+
exports: [
|
|
51
|
+
DateTimePickerComponent,
|
|
52
|
+
PageToolbarComponent,
|
|
53
|
+
GridActionsComponent,
|
|
54
|
+
ExtensibleFormComponent,
|
|
55
|
+
ExtensibleTableComponent,
|
|
56
|
+
PropDataDirective,
|
|
57
|
+
DisabledDirective,
|
|
58
|
+
],
|
|
59
|
+
declarations: [
|
|
60
|
+
DateTimePickerComponent,
|
|
61
|
+
PageToolbarComponent,
|
|
62
|
+
GridActionsComponent,
|
|
63
|
+
ExtensibleFormPropComponent,
|
|
64
|
+
ExtensibleFormComponent,
|
|
65
|
+
ExtensibleTableComponent,
|
|
66
|
+
PropDataDirective,
|
|
67
|
+
DisabledDirective,
|
|
68
|
+
],
|
|
69
|
+
imports: [
|
|
70
|
+
CoreModule,
|
|
71
|
+
ThemeSharedModule,
|
|
72
|
+
NgxValidateCoreModule,
|
|
73
|
+
NgbDatepickerModule,
|
|
74
|
+
NgbDropdownModule,
|
|
75
|
+
NgbTimepickerModule,
|
|
76
|
+
NgbTypeaheadModule,
|
|
77
|
+
],
|
|
78
|
+
}]
|
|
79
|
+
}] });
|
|
48
80
|
export class UiExtensionsModule {
|
|
49
81
|
}
|
|
50
|
-
UiExtensionsModule
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
82
|
+
UiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
83
|
+
UiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] });
|
|
84
|
+
UiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, imports: [[BaseUiExtensionsModule], BaseUiExtensionsModule] });
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, decorators: [{
|
|
86
|
+
type: NgModule,
|
|
87
|
+
args: [{
|
|
88
|
+
exports: [BaseUiExtensionsModule],
|
|
89
|
+
imports: [BaseUiExtensionsModule],
|
|
90
|
+
}]
|
|
91
|
+
}] });
|
|
92
|
+
//# sourceMappingURL=ui-extensions.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-extensions.module.js","sourceRoot":"","sources":["../../../../../../packages/theme-shared/extensions/src/lib/ui-extensions.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;;AAgCrE,MAAM,OAAO,sBAAsB;;mHAAtB,sBAAsB;oHAAtB,sBAAsB,iBAnB/B,uBAAuB;QACvB,oBAAoB;QACpB,oBAAoB;QACpB,2BAA2B;QAC3B,uBAAuB;QACvB,wBAAwB;QACxB,iBAAiB;QACjB,iBAAiB,aAGjB,UAAU;QACV,iBAAiB;QACjB,qBAAqB;QACrB,mBAAmB;QACnB,iBAAiB;QACjB,mBAAmB;QACnB,kBAAkB,aAzBlB,uBAAuB;QACvB,oBAAoB;QACpB,oBAAoB;QACpB,uBAAuB;QACvB,wBAAwB;QACxB,iBAAiB;QACjB,iBAAiB;oHAsBR,sBAAsB,YAVxB;YACP,UAAU;YACV,iBAAiB;YACjB,qBAAqB;YACrB,mBAAmB;YACnB,iBAAiB;YACjB,mBAAmB;YACnB,kBAAkB;SACnB;2FAEU,sBAAsB;kBA9BlC,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,uBAAuB;wBACvB,oBAAoB;wBACpB,oBAAoB;wBACpB,uBAAuB;wBACvB,wBAAwB;wBACxB,iBAAiB;wBACjB,iBAAiB;qBAClB;oBACD,YAAY,EAAE;wBACZ,uBAAuB;wBACvB,oBAAoB;wBACpB,oBAAoB;wBACpB,2BAA2B;wBAC3B,uBAAuB;wBACvB,wBAAwB;wBACxB,iBAAiB;wBACjB,iBAAiB;qBAClB;oBACD,OAAO,EAAE;wBACP,UAAU;wBACV,iBAAiB;wBACjB,qBAAqB;wBACrB,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;wBACnB,kBAAkB;qBACnB;iBACF;;AAOD,MAAM,OAAO,kBAAkB;;+GAAlB,kBAAkB;gHAAlB,kBAAkB,YANlB,sBAAsB,aAAtB,sBAAsB;gHAMtB,kBAAkB,YAFpB,CAAC,sBAAsB,CAAC,EAJtB,sBAAsB;2FAMtB,kBAAkB;kBAJ9B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC","sourcesContent":["import { CoreModule } from '@abp/ng.core';\nimport { ThemeSharedModule } from '@abp/ng.theme.shared';\nimport { NgModule } from '@angular/core';\nimport {\n NgbDatepickerModule,\n NgbDropdownModule,\n NgbTimepickerModule,\n NgbTypeaheadModule,\n} from '@ng-bootstrap/ng-bootstrap';\nimport { NgxValidateCoreModule } from '@ngx-validate/core';\nimport { DateTimePickerComponent } from './components/date-time-picker/date-time-picker.component';\nimport { ExtensibleFormPropComponent } from './components/extensible-form/extensible-form-prop.component';\nimport { ExtensibleFormComponent } from './components/extensible-form/extensible-form.component';\nimport { ExtensibleTableComponent } from './components/extensible-table/extensible-table.component';\nimport { GridActionsComponent } from './components/grid-actions/grid-actions.component';\nimport { PageToolbarComponent } from './components/page-toolbar/page-toolbar.component';\nimport { DisabledDirective } from './directives/disabled.directive';\nimport { PropDataDirective } from './directives/prop-data.directive';\n\n@NgModule({\n exports: [\n DateTimePickerComponent,\n PageToolbarComponent,\n GridActionsComponent,\n ExtensibleFormComponent,\n ExtensibleTableComponent,\n PropDataDirective,\n DisabledDirective,\n ],\n declarations: [\n DateTimePickerComponent,\n PageToolbarComponent,\n GridActionsComponent,\n ExtensibleFormPropComponent,\n ExtensibleFormComponent,\n ExtensibleTableComponent,\n PropDataDirective,\n DisabledDirective,\n ],\n imports: [\n CoreModule,\n ThemeSharedModule,\n NgxValidateCoreModule,\n NgbDatepickerModule,\n NgbDropdownModule,\n NgbTimepickerModule,\n NgbTypeaheadModule,\n ],\n})\nexport class BaseUiExtensionsModule {}\n\n@NgModule({\n exports: [BaseUiExtensionsModule],\n imports: [BaseUiExtensionsModule],\n})\nexport class UiExtensionsModule {}\n"]}
|
|
@@ -6,4 +6,4 @@ export function mergeWithDefaultActions(extension, defaultActions, ...contributo
|
|
|
6
6
|
contributors.forEach(contributor => (contributor[name] || []).forEach((callback) => actions.addContributor(callback)));
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=actions.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.util.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/utils/actions.util.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,uBAAuB,CACrC,SAAY,EACZ,cAAyC,EACzC,GAAG,YAAqD;IAExD,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,EAAE;QACnD,MAAM,OAAO,GAAuB,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxD,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC5B,OAAO,CAAC,cAAc,CAAC,CAAC,UAAsB,EAAE,EAAE,CAChD,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAC7C,CAAC;QACF,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CACjC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,QAAwC,EAAE,EAAE,CAC7E,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CACjC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { ActionContributorCallback, ActionList, ActionsFactory } from '../models/actions';\nimport {\n EntityActionContributorCallbacks,\n EntityActionDefaults,\n EntityActions,\n EntityActionsFactory,\n} from '../models/entity-actions';\nimport {\n ToolbarActionContributorCallbacks,\n ToolbarActionDefaults,\n ToolbarActions,\n ToolbarActionsFactory,\n} from '../models/toolbar-actions';\n\nexport function mergeWithDefaultActions<F extends ActionsFactory<any>>(\n extension: F,\n defaultActions: InferredActionDefaults<F>,\n ...contributors: InferredActionContributorCallbacks<F>[]\n) {\n Object.keys(defaultActions).forEach((name: string) => {\n const actions: InferredActions<F> = extension.get(name);\n actions.clearContributors();\n actions.addContributor((actionList: ActionList) =>\n actionList.addManyTail(defaultActions[name]),\n );\n contributors.forEach(contributor =>\n (contributor[name] || []).forEach((callback: ActionContributorCallback<any>) =>\n actions.addContributor(callback),\n ),\n );\n });\n}\ntype InferredActionDefaults<F> = F extends EntityActionsFactory<infer RE>\n ? EntityActionDefaults<RE>\n : F extends ToolbarActionsFactory<infer RT>\n ? ToolbarActionDefaults<RT>\n : never;\n\ntype InferredActionContributorCallbacks<F> = F extends EntityActionsFactory<infer RE>\n ? EntityActionContributorCallbacks<RE>\n : F extends ToolbarActionsFactory<infer RT>\n ? ToolbarActionContributorCallbacks<RT>\n : never;\n\ntype InferredActions<F> = F extends EntityActionsFactory<infer RE>\n ? EntityActions<RE>\n : F extends ToolbarActionsFactory<infer RT>\n ? ToolbarActions<RT>\n : never;\n"]}
|
|
@@ -39,4 +39,4 @@ function createEnumLocalizer(l10n, enumType, lookupEnum) {
|
|
|
39
39
|
function getShortEnumType(enumType) {
|
|
40
40
|
return enumType.split('.').pop();
|
|
41
41
|
}
|
|
42
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=enum.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enum.util.js","sourceRoot":"","sources":["../../../../../../../packages/theme-shared/extensions/src/lib/utils/enum.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,KAAK,EAAc,EAAE,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAIrE,MAAM,UAAU,UAAU,CAAC,OAAiD;IAC1E,MAAM,UAAU,GAAQ,EAAE,CAAC;IAE3B,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QAClC,UAAU,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,KAAY,CAAC,CAAC,GAAG,IAAI,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,QAAgB,EAChB,UAA6C,EAC7C,QAAgB;IAEhB,OAAO,IAAI,CAAC,EAAE;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC1D,MAAM,GAAG,GAAG,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;QACnD,MAAM,YAAY,GAAG,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAErE,OAAO,wBAAwB,CAAC,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,QAAgB,EAChB,UAA6C;IAE7C,OAAO,IAAI,CAAC,EAAE;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;QACnD,MAAM,YAAY,GAAG,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAErE,OAAO,wBAAwB,CAC7B,IAAI,EACJ,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;YAC1C,GAAG,EAAE,YAAY,CAAC,IAAI,CAAC;YACvB,KAAK;SACN,CAAC,CAAC,CACJ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,IAAyB,EAAE,SAAc;IACzE,OAAO,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,SAAS,mBAAmB,CAC1B,IAAyB,EACzB,QAAgB,EAChB,UAA6C;IAE7C,MAAM,QAAQ,GAAG,UAAU,CAAC,oBAAoB,CAAC;IACjD,MAAM,SAAS,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,GAAG,CAAC,EAAE,CACX,IAAI,CAAC,wBAAwB,CAC3B,CAAC,QAAQ,CAAC,EACV,CAAC,OAAO,GAAG,SAAS,GAAG,GAAG,GAAG,GAAG,EAAE,SAAS,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,CAAC,EAC7D,GAAG,CACJ,CAAC;AACN,CAAC;AAED,SAAS,gBAAgB,CAAC,QAAgB;IACxC,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import { ABP, LocalizationService } from '@abp/ng.core';\nimport { merge, Observable, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { EXTRA_PROPERTIES_KEY } from '../constants/extra-properties';\nimport { ObjectExtensions } from '../models/object-extensions';\nimport { PropCallback } from '../models/props';\n\nexport function createEnum(members: ObjectExtensions.ExtensionEnumFieldDto[]) {\n const enumObject: any = {};\n\n members.forEach(({ name, value }) => {\n enumObject[(enumObject[name] = value as any)] = name;\n });\n\n return enumObject;\n}\n\nexport function createEnumValueResolver<T = any>(\n enumType: string,\n lookupEnum: ObjectExtensions.ExtensionEnumDto,\n propName: string,\n): PropCallback<T, Observable<string>> {\n return data => {\n const value = data.record[EXTRA_PROPERTIES_KEY][propName];\n const key = lookupEnum.transformed[value];\n const l10n = data.getInjected(LocalizationService);\n const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);\n\n return createLocalizationStream(l10n, localizeEnum(key));\n };\n}\n\nexport function createEnumOptions<T = any>(\n enumType: string,\n lookupEnum: ObjectExtensions.ExtensionEnumDto,\n): PropCallback<T, Observable<ABP.Option<any>[]>> {\n return data => {\n const l10n = data.getInjected(LocalizationService);\n const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);\n\n return createLocalizationStream(\n l10n,\n lookupEnum.fields.map(({ name, value }) => ({\n key: localizeEnum(name),\n value,\n })),\n );\n };\n}\n\nfunction createLocalizationStream(l10n: LocalizationService, mapTarget: any) {\n return merge(of(null), l10n.languageChange$).pipe(map(() => mapTarget));\n}\n\nfunction createEnumLocalizer(\n l10n: LocalizationService,\n enumType: string,\n lookupEnum: ObjectExtensions.ExtensionEnumDto,\n): (key: string) => string {\n const resource = lookupEnum.localizationResource;\n const shortType = getShortEnumType(enumType);\n\n return key =>\n l10n.localizeWithFallbackSync(\n [resource],\n ['Enum:' + shortType + '.' + key, shortType + '.' + key, key],\n key,\n );\n}\n\nfunction getShortEnumType(enumType: string): string {\n return enumType.split('.').pop();\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export function selfFactory(dependency) {
|
|
2
2
|
return dependency;
|
|
3
3
|
}
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=factory.util.js.map
|