@ng-atomic/common 5.15.0 → 6.0.4
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/core/component-store.d.ts +48 -0
- package/core/index.d.ts +2 -0
- package/core/injectable-component.d.ts +31 -0
- package/esm2022/core/component-store.mjs +86 -0
- package/esm2022/core/index.mjs +3 -0
- package/esm2022/core/injectable-component.mjs +82 -0
- package/esm2022/core/ng-atomic-common-core.mjs +5 -0
- package/esm2022/directives/ios-safari-scroll-buggyfill/index.mjs +3 -0
- package/esm2022/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.directive.mjs +24 -0
- package/esm2022/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.module.mjs +24 -0
- package/esm2022/directives/ios-safari-scroll-buggyfill/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs +5 -0
- package/esm2022/index.mjs +2 -0
- package/esm2022/models/action.mjs +7 -0
- package/{esm2020 → esm2022}/models/index.mjs +1 -1
- package/{esm2020 → esm2022}/models/menu-item.mjs +1 -1
- package/esm2022/models/ng-atomic-common-models.mjs +5 -0
- package/{esm2020 → esm2022}/models/public_api.mjs +1 -1
- package/{esm2020 → esm2022}/ng-atomic-common.mjs +1 -1
- package/esm2022/pipes/actions/actions.pipe.mjs +19 -0
- package/{esm2020 → esm2022}/pipes/actions/index.mjs +1 -1
- package/esm2022/pipes/actions/ng-atomic-common-pipes-actions.mjs +5 -0
- package/esm2022/pipes/data-accessor/data-accessor.pipe.mjs +30 -0
- package/{esm2020 → esm2022}/pipes/data-accessor/index.mjs +1 -1
- package/esm2022/pipes/data-accessor/ng-atomic-common-pipes-data-accessor.mjs +5 -0
- package/esm2022/pipes/domain/domain.pipe.mjs +28 -0
- package/esm2022/pipes/domain/index.mjs +2 -0
- package/esm2022/pipes/domain/ng-atomic-common-pipes-domain.mjs +5 -0
- package/esm2022/pipes/error/error.pipe.mjs +44 -0
- package/esm2022/pipes/error/index.mjs +2 -0
- package/esm2022/pipes/error/ng-atomic-common-pipes-error.mjs +5 -0
- package/esm2022/pipes/grouped-by/grouped-by.pipe.mjs +27 -0
- package/esm2022/pipes/grouped-by/index.mjs +2 -0
- package/esm2022/pipes/grouped-by/ng-atomic-common-pipes-grouped-by.mjs +5 -0
- package/esm2022/pipes/keys/index.mjs +2 -0
- package/esm2022/pipes/keys/keys.pipe.mjs +18 -0
- package/esm2022/pipes/keys/ng-atomic-common-pipes-keys.mjs +5 -0
- package/esm2022/pipes/pagination/index.mjs +2 -0
- package/esm2022/pipes/pagination/ng-atomic-common-pipes-pagination.mjs +5 -0
- package/esm2022/pipes/pagination/pagination.pipe.mjs +32 -0
- package/esm2022/pipes/query/index.mjs +2 -0
- package/esm2022/pipes/query/ng-atomic-common-pipes-query.mjs +5 -0
- package/esm2022/pipes/query/query.pipe.mjs +26 -0
- package/{esm2020 → esm2022}/pipes/select-id/index.mjs +1 -1
- package/esm2022/pipes/select-id/ng-atomic-common-pipes-select-id.mjs +5 -0
- package/esm2022/pipes/select-id/select-id.pipe.mjs +29 -0
- package/esm2022/pipes/signal/index.mjs +2 -0
- package/esm2022/pipes/signal/ng-atomic-common-pipes-signal.mjs +5 -0
- package/esm2022/pipes/signal/signal.pipe.mjs +21 -0
- package/esm2022/pipes/smart-exp/index.mjs +3 -0
- package/esm2022/pipes/smart-exp/ng-atomic-common-pipes-smart-exp.mjs +5 -0
- package/esm2022/pipes/smart-exp/smart-exp.module.mjs +16 -0
- package/esm2022/pipes/smart-exp/smart-exp.pipe.mjs +27 -0
- package/esm2022/pipes/smart-field/index.mjs +2 -0
- package/esm2022/pipes/smart-field/ng-atomic-common-pipes-smart-field.mjs +5 -0
- package/esm2022/pipes/smart-field/smart-field.pipe.mjs +33 -0
- package/esm2022/pipes/smart-sort-by/index.mjs +4 -0
- package/esm2022/pipes/smart-sort-by/ng-atomic-common-pipes-smart-sort-by.mjs +5 -0
- package/esm2022/pipes/smart-sort-by/smart-sort-by.module.mjs +24 -0
- package/esm2022/pipes/smart-sort-by/smart-sort-by.pipe.mjs +28 -0
- package/esm2022/pipes/smart-sort-by/smart-sort-by.transformer.mjs +5 -0
- package/esm2022/pipes/yen/index.mjs +2 -0
- package/esm2022/pipes/yen/ng-atomic-common-pipes-yen.mjs +5 -0
- package/esm2022/pipes/yen/yen.pipe.mjs +20 -0
- package/esm2022/services/auth/auth.service.mjs +36 -0
- package/esm2022/services/auth/index.mjs +2 -0
- package/esm2022/services/auth/ng-atomic-common-services-auth.mjs +5 -0
- package/esm2022/services/chips-manager/chips.manager.mjs +29 -0
- package/{esm2020 → esm2022}/services/chips-manager/index.mjs +1 -1
- package/esm2022/services/chips-manager/ng-atomic-common-services-chips-manager.mjs +5 -0
- package/esm2022/services/csv/csv.service.mjs +25 -0
- package/{esm2020 → esm2022}/services/csv/index.mjs +1 -1
- package/esm2022/services/csv/ng-atomic-common-services-csv.mjs +5 -0
- package/esm2022/services/form/form.service.mjs +38 -0
- package/{esm2020 → esm2022}/services/form/index.mjs +1 -1
- package/esm2022/services/form/ng-atomic-common-services-form.mjs +5 -0
- package/{esm2020 → esm2022}/services/form/pagination/index.mjs +1 -1
- package/esm2022/services/form/pagination/ng-atomic-common-services-form-pagination.mjs +5 -0
- package/esm2022/services/form/pagination/pagination.service.mjs +24 -0
- package/{esm2020 → esm2022}/services/form/sort/index.mjs +1 -1
- package/esm2022/services/form/sort/ng-atomic-common-services-form-sort.mjs +5 -0
- package/esm2022/services/form/sort/sort.service.mjs +33 -0
- package/{esm2020 → esm2022}/services/loading/index.mjs +1 -1
- package/esm2022/services/loading/loading.service.mjs +44 -0
- package/esm2022/services/loading/ng-atomic-common-services-loading.mjs +5 -0
- package/{esm2020 → esm2022}/services/query-resolver/index.mjs +1 -1
- package/esm2022/services/query-resolver/ng-atomic-common-services-query-resolver.mjs +5 -0
- package/esm2022/services/query-resolver/query-resolver.service.mjs +33 -0
- package/esm2022/services/snack-bar/index.mjs +3 -0
- package/esm2022/services/snack-bar/ng-atomic-common-services-snack-bar.mjs +5 -0
- package/esm2022/services/snack-bar/snack-bar.module.mjs +22 -0
- package/esm2022/services/snack-bar/snack-bar.service.mjs +23 -0
- package/esm2022/services/ui/index.mjs +2 -0
- package/esm2022/services/ui/ng-atomic-common-services-ui.mjs +5 -0
- package/esm2022/services/ui/ui.service.mjs +199 -0
- package/esm2022/stores/component-store/component-store.mjs +2 -0
- package/{esm2020 → esm2022}/stores/component-store/index.mjs +1 -1
- package/esm2022/stores/component-store/ng-atomic-common-stores-component-store.mjs +5 -0
- package/esm2022/stores/entities/entities.store.mjs +32 -0
- package/esm2022/stores/entities/index.mjs +2 -0
- package/esm2022/stores/entities/ng-atomic-common-stores-entities.mjs +5 -0
- package/esm2022/stores/entity/entity.store.mjs +34 -0
- package/{esm2020 → esm2022}/stores/entity/index.mjs +1 -1
- package/esm2022/stores/entity/ng-atomic-common-stores-entity.mjs +5 -0
- package/{esm2020 → esm2022}/stores/pagination/index.mjs +1 -1
- package/esm2022/stores/pagination/ng-atomic-common-stores-pagination.mjs +5 -0
- package/esm2022/stores/pagination/pagination.store.mjs +23 -0
- package/{esm2020 → esm2022}/stores/query/index.mjs +1 -1
- package/esm2022/stores/query/ng-atomic-common-stores-query.mjs +5 -0
- package/esm2022/stores/query/query.store.mjs +31 -0
- package/{esm2020 → esm2022}/stores/selection/index.mjs +1 -1
- package/esm2022/stores/selection/ng-atomic-common-stores-selection.mjs +5 -0
- package/esm2022/stores/selection/selection.store.mjs +29 -0
- package/{esm2020 → esm2022}/stores/sort/index.mjs +1 -1
- package/esm2022/stores/sort/ng-atomic-common-stores-sort.mjs +5 -0
- package/esm2022/stores/sort/sort.store.mjs +27 -0
- package/esm2022/utils/comma/comma.mjs +4 -0
- package/{esm2020 → esm2022}/utils/comma/index.mjs +1 -1
- package/esm2022/utils/compare-by-id/compare-by-id.mjs +5 -0
- package/{esm2020 → esm2022}/utils/compare-by-id/index.mjs +1 -1
- package/esm2022/utils/date-utils/date-utils.mjs +13 -0
- package/{esm2020 → esm2022}/utils/date-utils/index.mjs +1 -1
- package/esm2022/utils/diff/diff.mjs +7 -0
- package/{esm2020 → esm2022}/utils/diff/index.mjs +1 -1
- package/esm2022/utils/get/get.mjs +6 -0
- package/esm2022/utils/get/index.mjs +2 -0
- package/esm2022/utils/index.mjs +11 -0
- package/esm2022/utils/mat-dayjs-date/dayjs-date.adapter.mjs +190 -0
- package/esm2022/utils/mat-dayjs-date/dayjs-date.formats.mjs +15 -0
- package/esm2022/utils/mat-dayjs-date/dayjs-date.module.mjs +41 -0
- package/esm2022/utils/mat-dayjs-date/dayjs-jp-providers.mjs +20 -0
- package/esm2022/utils/mat-dayjs-date/index.mjs +5 -0
- package/esm2022/utils/ng-atomic-common-utils.mjs +5 -0
- package/{esm2020 → esm2022}/utils/page/index.mjs +1 -1
- package/esm2022/utils/page/ng-atomic-common-utils-page.mjs +5 -0
- package/esm2022/utils/page/page.mjs +20 -0
- package/{esm2020/stores/entities → esm2022/utils/query}/index.mjs +2 -2
- package/esm2022/utils/query/query.resolver.mjs +100 -0
- package/{esm2020 → esm2022}/utils/smart-exp-transformer/index.mjs +1 -1
- package/esm2022/utils/smart-exp-transformer/smart-exp-transformer.mjs +18 -0
- package/{esm2020 → esm2022}/utils/to-object/index.mjs +1 -1
- package/esm2022/utils/to-object/to-object.mjs +10 -0
- package/fesm2022/ng-atomic-common-core.mjs +171 -0
- package/fesm2022/ng-atomic-common-core.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs +7 -7
- package/fesm2022/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-models.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-pipes-actions.mjs +3 -3
- package/fesm2022/ng-atomic-common-pipes-actions.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-pipes-data-accessor.mjs +5 -5
- package/fesm2022/ng-atomic-common-pipes-data-accessor.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-domain.mjs +35 -0
- package/fesm2022/ng-atomic-common-pipes-domain.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-error.mjs +51 -0
- package/fesm2022/ng-atomic-common-pipes-error.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-grouped-by.mjs +34 -0
- package/fesm2022/ng-atomic-common-pipes-grouped-by.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-keys.mjs +25 -0
- package/fesm2022/ng-atomic-common-pipes-keys.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-pagination.mjs +39 -0
- package/fesm2022/ng-atomic-common-pipes-pagination.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-query.mjs +33 -0
- package/fesm2022/ng-atomic-common-pipes-query.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-pipes-select-id.mjs +4 -4
- package/fesm2022/ng-atomic-common-pipes-select-id.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-signal.mjs +28 -0
- package/fesm2022/ng-atomic-common-pipes-signal.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-pipes-smart-exp.mjs +8 -8
- package/fesm2022/ng-atomic-common-pipes-smart-exp.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-smart-field.mjs +40 -0
- package/fesm2022/ng-atomic-common-pipes-smart-field.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-pipes-smart-sort-by.mjs +9 -9
- package/fesm2022/ng-atomic-common-pipes-smart-sort-by.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-yen.mjs +27 -0
- package/fesm2022/ng-atomic-common-pipes-yen.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-auth.mjs +43 -0
- package/fesm2022/ng-atomic-common-services-auth.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ng-atomic-common-services-chips-manager.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-chips-manager.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-services-csv.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-csv.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-services-form-pagination.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-form-pagination.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-services-form-sort.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-form-sort.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-services-form.mjs +1 -1
- package/fesm2022/ng-atomic-common-services-form.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-services-loading.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-loading.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-services-query-resolver.mjs +8 -9
- package/fesm2022/ng-atomic-common-services-query-resolver.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ng-atomic-common-services-snack-bar.mjs +9 -9
- package/fesm2022/ng-atomic-common-services-snack-bar.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-ui.mjs +206 -0
- package/fesm2022/ng-atomic-common-services-ui.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-stores-component-store.mjs +6 -0
- package/fesm2022/ng-atomic-common-stores-component-store.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ng-atomic-common-stores-entities.mjs +6 -1
- package/fesm2022/ng-atomic-common-stores-entities.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-stores-entity.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-stores-pagination.mjs +3 -3
- package/fesm2022/ng-atomic-common-stores-pagination.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-stores-query.mjs +4 -4
- package/fesm2022/ng-atomic-common-stores-query.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-stores-selection.mjs +3 -3
- package/fesm2022/ng-atomic-common-stores-selection.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-stores-sort.mjs +4 -5
- package/fesm2022/ng-atomic-common-stores-sort.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-utils-page.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ng-atomic-common-utils.mjs +33 -24
- package/fesm2022/ng-atomic-common-utils.mjs.map +1 -0
- package/fesm2022/ng-atomic-common.mjs.map +1 -0
- package/package.json +172 -181
- package/pipes/domain/domain.pipe.d.ts +1 -1
- package/pipes/domain/index.d.ts +1 -2
- package/pipes/error/error.pipe.d.ts +16 -0
- package/pipes/error/index.d.ts +1 -0
- package/pipes/grouped-by/grouped-by.pipe.d.ts +9 -0
- package/pipes/grouped-by/index.d.ts +1 -0
- package/pipes/keys/index.d.ts +1 -0
- package/pipes/keys/keys.pipe.d.ts +8 -0
- package/pipes/pagination/index.d.ts +0 -1
- package/pipes/pagination/pagination.pipe.d.ts +1 -0
- package/pipes/query/index.d.ts +1 -0
- package/pipes/query/query.pipe.d.ts +10 -0
- package/pipes/signal/index.d.ts +1 -0
- package/pipes/signal/signal.pipe.d.ts +10 -0
- package/pipes/smart-field/index.d.ts +0 -1
- package/pipes/smart-field/smart-field.pipe.d.ts +30 -9
- package/pipes/yen/index.d.ts +0 -1
- package/pipes/yen/yen.pipe.d.ts +2 -2
- package/services/auth/auth.service.d.ts +34 -0
- package/services/auth/index.d.ts +1 -0
- package/services/ui/index.d.ts +1 -0
- package/services/ui/ui.service.d.ts +54 -0
- package/stores/component-store/component-store.d.ts +1 -15
- package/stores/entities/entities.store.d.ts +6 -5
- package/stores/sort/sort.store.d.ts +0 -1
- package/utils/get/get.d.ts +5 -0
- package/utils/get/index.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/esm2020/directives/ios-safari-scroll-buggyfill/index.mjs +0 -3
- package/esm2020/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.directive.mjs +0 -24
- package/esm2020/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.module.mjs +0 -24
- package/esm2020/directives/ios-safari-scroll-buggyfill/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs +0 -5
- package/esm2020/index.mjs +0 -2
- package/esm2020/models/action.mjs +0 -7
- package/esm2020/models/ng-atomic-common-models.mjs +0 -5
- package/esm2020/pipes/actions/actions.pipe.mjs +0 -19
- package/esm2020/pipes/actions/ng-atomic-common-pipes-actions.mjs +0 -5
- package/esm2020/pipes/data-accessor/data-accessor.pipe.mjs +0 -30
- package/esm2020/pipes/data-accessor/ng-atomic-common-pipes-data-accessor.mjs +0 -5
- package/esm2020/pipes/domain/domain.module.mjs +0 -24
- package/esm2020/pipes/domain/domain.pipe.mjs +0 -27
- package/esm2020/pipes/domain/index.mjs +0 -3
- package/esm2020/pipes/domain/ng-atomic-common-pipes-domain.mjs +0 -5
- package/esm2020/pipes/pagination/index.mjs +0 -3
- package/esm2020/pipes/pagination/ng-atomic-common-pipes-pagination.mjs +0 -5
- package/esm2020/pipes/pagination/pagination.module.mjs +0 -20
- package/esm2020/pipes/pagination/pagination.pipe.mjs +0 -32
- package/esm2020/pipes/select-id/ng-atomic-common-pipes-select-id.mjs +0 -5
- package/esm2020/pipes/select-id/select-id.pipe.mjs +0 -29
- package/esm2020/pipes/smart-exp/index.mjs +0 -3
- package/esm2020/pipes/smart-exp/ng-atomic-common-pipes-smart-exp.mjs +0 -5
- package/esm2020/pipes/smart-exp/smart-exp.module.mjs +0 -16
- package/esm2020/pipes/smart-exp/smart-exp.pipe.mjs +0 -27
- package/esm2020/pipes/smart-field/index.mjs +0 -3
- package/esm2020/pipes/smart-field/ng-atomic-common-pipes-smart-field.mjs +0 -5
- package/esm2020/pipes/smart-field/smart-field.module.mjs +0 -24
- package/esm2020/pipes/smart-field/smart-field.pipe.mjs +0 -31
- package/esm2020/pipes/smart-sort-by/index.mjs +0 -4
- package/esm2020/pipes/smart-sort-by/ng-atomic-common-pipes-smart-sort-by.mjs +0 -5
- package/esm2020/pipes/smart-sort-by/smart-sort-by.module.mjs +0 -24
- package/esm2020/pipes/smart-sort-by/smart-sort-by.pipe.mjs +0 -28
- package/esm2020/pipes/smart-sort-by/smart-sort-by.transformer.mjs +0 -5
- package/esm2020/pipes/yen/index.mjs +0 -3
- package/esm2020/pipes/yen/ng-atomic-common-pipes-yen.mjs +0 -5
- package/esm2020/pipes/yen/yen.module.mjs +0 -24
- package/esm2020/pipes/yen/yen.pipe.mjs +0 -17
- package/esm2020/services/chips-manager/chips.manager.mjs +0 -29
- package/esm2020/services/chips-manager/ng-atomic-common-services-chips-manager.mjs +0 -5
- package/esm2020/services/csv/csv.service.mjs +0 -25
- package/esm2020/services/csv/ng-atomic-common-services-csv.mjs +0 -5
- package/esm2020/services/form/form.service.mjs +0 -38
- package/esm2020/services/form/ng-atomic-common-services-form.mjs +0 -5
- package/esm2020/services/form/pagination/ng-atomic-common-services-form-pagination.mjs +0 -5
- package/esm2020/services/form/pagination/pagination.service.mjs +0 -24
- package/esm2020/services/form/sort/ng-atomic-common-services-form-sort.mjs +0 -5
- package/esm2020/services/form/sort/sort.service.mjs +0 -33
- package/esm2020/services/loading/loading.service.mjs +0 -44
- package/esm2020/services/loading/ng-atomic-common-services-loading.mjs +0 -5
- package/esm2020/services/query-resolver/ng-atomic-common-services-query-resolver.mjs +0 -5
- package/esm2020/services/query-resolver/query-resolver.service.mjs +0 -34
- package/esm2020/services/snack-bar/index.mjs +0 -3
- package/esm2020/services/snack-bar/ng-atomic-common-services-snack-bar.mjs +0 -5
- package/esm2020/services/snack-bar/snack-bar.module.mjs +0 -22
- package/esm2020/services/snack-bar/snack-bar.service.mjs +0 -23
- package/esm2020/stores/component-store/component-store.mjs +0 -36
- package/esm2020/stores/component-store/ng-atomic-common-stores-component-store.mjs +0 -5
- package/esm2020/stores/entities/entities.store.mjs +0 -27
- package/esm2020/stores/entities/ng-atomic-common-stores-entities.mjs +0 -5
- package/esm2020/stores/entity/entity.store.mjs +0 -34
- package/esm2020/stores/entity/ng-atomic-common-stores-entity.mjs +0 -5
- package/esm2020/stores/pagination/ng-atomic-common-stores-pagination.mjs +0 -5
- package/esm2020/stores/pagination/pagination.store.mjs +0 -23
- package/esm2020/stores/query/ng-atomic-common-stores-query.mjs +0 -5
- package/esm2020/stores/query/query.store.mjs +0 -31
- package/esm2020/stores/selection/ng-atomic-common-stores-selection.mjs +0 -5
- package/esm2020/stores/selection/selection.store.mjs +0 -29
- package/esm2020/stores/sort/ng-atomic-common-stores-sort.mjs +0 -5
- package/esm2020/stores/sort/sort.store.mjs +0 -28
- package/esm2020/utils/comma/comma.mjs +0 -4
- package/esm2020/utils/compare-by-id/compare-by-id.mjs +0 -5
- package/esm2020/utils/date-utils/date-utils.mjs +0 -13
- package/esm2020/utils/diff/diff.mjs +0 -7
- package/esm2020/utils/index.mjs +0 -10
- package/esm2020/utils/mat-dayjs-date/dayjs-date.adapter.mjs +0 -191
- package/esm2020/utils/mat-dayjs-date/dayjs-date.formats.mjs +0 -15
- package/esm2020/utils/mat-dayjs-date/dayjs-date.module.mjs +0 -41
- package/esm2020/utils/mat-dayjs-date/dayjs-jp-providers.mjs +0 -20
- package/esm2020/utils/mat-dayjs-date/index.mjs +0 -5
- package/esm2020/utils/ng-atomic-common-utils.mjs +0 -5
- package/esm2020/utils/page/ng-atomic-common-utils-page.mjs +0 -5
- package/esm2020/utils/page/page.mjs +0 -20
- package/esm2020/utils/query/index.mjs +0 -2
- package/esm2020/utils/query/query.resolver.mjs +0 -97
- package/esm2020/utils/smart-exp-transformer/smart-exp-transformer.mjs +0 -18
- package/esm2020/utils/to-object/to-object.mjs +0 -10
- package/fesm2015/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-models.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-actions.mjs +0 -26
- package/fesm2015/ng-atomic-common-pipes-actions.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-data-accessor.mjs +0 -40
- package/fesm2015/ng-atomic-common-pipes-data-accessor.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-domain.mjs +0 -59
- package/fesm2015/ng-atomic-common-pipes-domain.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-pagination.mjs +0 -59
- package/fesm2015/ng-atomic-common-pipes-pagination.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-select-id.mjs +0 -39
- package/fesm2015/ng-atomic-common-pipes-select-id.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-smart-exp.mjs +0 -50
- package/fesm2015/ng-atomic-common-pipes-smart-exp.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-smart-field.mjs +0 -63
- package/fesm2015/ng-atomic-common-pipes-smart-field.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-smart-sort-by.mjs +0 -63
- package/fesm2015/ng-atomic-common-pipes-smart-sort-by.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-pipes-yen.mjs +0 -45
- package/fesm2015/ng-atomic-common-pipes-yen.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-chips-manager.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-csv.mjs +0 -32
- package/fesm2015/ng-atomic-common-services-csv.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-form-pagination.mjs +0 -31
- package/fesm2015/ng-atomic-common-services-form-pagination.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-form-sort.mjs +0 -39
- package/fesm2015/ng-atomic-common-services-form-sort.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-form.mjs +0 -42
- package/fesm2015/ng-atomic-common-services-form.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-loading.mjs +0 -54
- package/fesm2015/ng-atomic-common-services-loading.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-query-resolver.mjs +0 -44
- package/fesm2015/ng-atomic-common-services-query-resolver.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-services-snack-bar.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-stores-component-store.mjs +0 -44
- package/fesm2015/ng-atomic-common-stores-component-store.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-stores-entities.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-stores-entity.mjs +0 -42
- package/fesm2015/ng-atomic-common-stores-entity.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-stores-pagination.mjs +0 -30
- package/fesm2015/ng-atomic-common-stores-pagination.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-stores-query.mjs +0 -40
- package/fesm2015/ng-atomic-common-stores-query.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-stores-selection.mjs +0 -36
- package/fesm2015/ng-atomic-common-stores-selection.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-stores-sort.mjs +0 -35
- package/fesm2015/ng-atomic-common-stores-sort.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-utils-page.mjs +0 -21
- package/fesm2015/ng-atomic-common-utils-page.mjs.map +0 -1
- package/fesm2015/ng-atomic-common-utils.mjs +0 -419
- package/fesm2015/ng-atomic-common-utils.mjs.map +0 -1
- package/fesm2015/ng-atomic-common.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs +0 -52
- package/fesm2020/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-models.mjs +0 -13
- package/fesm2020/ng-atomic-common-models.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-actions.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-data-accessor.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-domain.mjs +0 -55
- package/fesm2020/ng-atomic-common-pipes-domain.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-pagination.mjs +0 -56
- package/fesm2020/ng-atomic-common-pipes-pagination.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-select-id.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-smart-exp.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-smart-field.mjs +0 -59
- package/fesm2020/ng-atomic-common-pipes-smart-field.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-smart-sort-by.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-pipes-yen.mjs +0 -45
- package/fesm2020/ng-atomic-common-pipes-yen.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-chips-manager.mjs +0 -36
- package/fesm2020/ng-atomic-common-services-chips-manager.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-csv.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-form-pagination.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-form-sort.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-form.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-loading.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-query-resolver.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-services-snack-bar.mjs +0 -49
- package/fesm2020/ng-atomic-common-services-snack-bar.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-stores-component-store.mjs +0 -43
- package/fesm2020/ng-atomic-common-stores-component-store.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-stores-entities.mjs +0 -34
- package/fesm2020/ng-atomic-common-stores-entities.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-stores-entity.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-stores-pagination.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-stores-query.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-stores-selection.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-stores-sort.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-utils-page.mjs.map +0 -1
- package/fesm2020/ng-atomic-common-utils.mjs.map +0 -1
- package/fesm2020/ng-atomic-common.mjs +0 -4
- package/fesm2020/ng-atomic-common.mjs.map +0 -1
- package/pipes/domain/domain.module.d.ts +0 -8
- package/pipes/pagination/pagination.module.d.ts +0 -7
- package/pipes/smart-field/smart-field.module.d.ts +0 -8
- package/pipes/yen/yen.module.d.ts +0 -8
- /package/{fesm2015 → fesm2022}/ng-atomic-common-models.mjs +0 -0
- /package/{fesm2020 → fesm2022}/ng-atomic-common-stores-entity.mjs +0 -0
- /package/{fesm2020 → fesm2022}/ng-atomic-common-utils-page.mjs +0 -0
- /package/{fesm2015 → fesm2022}/ng-atomic-common.mjs +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ViewContainerRef, Injector, DestroyRef, ElementRef, EventEmitter, Directive, Input, Output, Injectable } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
|
|
5
|
+
function provideComponent(abstract, typeOrFactory) {
|
|
6
|
+
async function loadComponentType() {
|
|
7
|
+
if (typeof typeOrFactory === 'function' && !typeOrFactory.prototype) {
|
|
8
|
+
return await typeOrFactory();
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return typeOrFactory;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
;
|
|
15
|
+
return { provide: abstract['TOKEN'], useValue: loadComponentType };
|
|
16
|
+
}
|
|
17
|
+
function getInputs(type, meta = 'ɵcmp') {
|
|
18
|
+
return Object.entries(type[meta]['inputs']);
|
|
19
|
+
}
|
|
20
|
+
function getInputsByComponentRef(cmp) {
|
|
21
|
+
return getInputs(cmp.instance.constructor);
|
|
22
|
+
}
|
|
23
|
+
function getOutputsByInstance(cmp) {
|
|
24
|
+
return Object.entries(cmp.instance.constructor['ɵcmp']['outputs']);
|
|
25
|
+
}
|
|
26
|
+
class InjectableComponent {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.#outlet = inject(ViewContainerRef);
|
|
29
|
+
this.#injector = inject(Injector);
|
|
30
|
+
this.#destroy$ = inject(DestroyRef);
|
|
31
|
+
this.#el = inject(ElementRef);
|
|
32
|
+
this.injectable = false;
|
|
33
|
+
this.action = new EventEmitter();
|
|
34
|
+
}
|
|
35
|
+
#outlet;
|
|
36
|
+
#injector;
|
|
37
|
+
#destroy$;
|
|
38
|
+
#el;
|
|
39
|
+
#setAttribute(component) {
|
|
40
|
+
const hostElement = component.hostView.rootNodes[0];
|
|
41
|
+
const attributes = this.#el.nativeElement.attributes;
|
|
42
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
43
|
+
const attr = attributes.item(i);
|
|
44
|
+
if (attr.name.startsWith('_ngcontent')) {
|
|
45
|
+
hostElement.setAttribute(attr.name, attr.value);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
#bindInputs(component) {
|
|
50
|
+
Object.entries(this.constructor['ɵdir']['inputs']).forEach(([key, value]) => {
|
|
51
|
+
if (key === 'injectable')
|
|
52
|
+
return;
|
|
53
|
+
component.setInput(key, this[value]);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
#bindOutputs(component) {
|
|
57
|
+
getOutputsByInstance(component).forEach(([alias, attr]) => {
|
|
58
|
+
component.instance[attr].pipe(takeUntilDestroyed(this.#destroy$)).subscribe((value) => this[attr].emit(value));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
ngOnInit() {
|
|
62
|
+
if (this.injectable) {
|
|
63
|
+
this.#injector.get(this.constructor['TOKEN'])().then(type => {
|
|
64
|
+
const ref = this.#outlet.createComponent(type);
|
|
65
|
+
this.#bindInputs(ref);
|
|
66
|
+
this.#bindOutputs(ref);
|
|
67
|
+
this.#setAttribute(ref);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InjectableComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
72
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "16.2.12", type: InjectableComponent, isStandalone: true, inputs: { injectable: ["injectable", "injectable", (value) => value === '' ? true : value] }, outputs: { action: "action" }, ngImport: i0 }); }
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InjectableComponent, decorators: [{
|
|
75
|
+
type: Directive,
|
|
76
|
+
args: [{ standalone: true }]
|
|
77
|
+
}], propDecorators: { injectable: [{
|
|
78
|
+
type: Input,
|
|
79
|
+
args: [{ transform: (value) => value === '' ? true : value }]
|
|
80
|
+
}], action: [{
|
|
81
|
+
type: Output
|
|
82
|
+
}] } });
|
|
83
|
+
|
|
84
|
+
class NgAtomicComponentStore {
|
|
85
|
+
constructor() {
|
|
86
|
+
this.action = new EventEmitter();
|
|
87
|
+
}
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgAtomicComponentStore, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
89
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: NgAtomicComponentStore, isStandalone: true, ngImport: i0 }); }
|
|
90
|
+
}
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgAtomicComponentStore, decorators: [{
|
|
92
|
+
type: Directive,
|
|
93
|
+
args: [{ standalone: true }]
|
|
94
|
+
}] });
|
|
95
|
+
class EffectMap extends Map {
|
|
96
|
+
get(key, scope = 'default') {
|
|
97
|
+
return super.get(this.makeKey(key, scope));
|
|
98
|
+
}
|
|
99
|
+
set(key, value) {
|
|
100
|
+
return super.set(this.makeKey(key, value.props.scope), value);
|
|
101
|
+
}
|
|
102
|
+
has(key, scope = 'default') {
|
|
103
|
+
return super.has(this.makeKey(key, scope));
|
|
104
|
+
}
|
|
105
|
+
makeKey(key, scope = 'default') {
|
|
106
|
+
return `[${scope}]#${key}`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
class NgAtomicRootActionStore {
|
|
110
|
+
constructor() {
|
|
111
|
+
this.actions$ = new EventEmitter();
|
|
112
|
+
this.actions$.subscribe(action => this.log(action, 'root'));
|
|
113
|
+
}
|
|
114
|
+
dispatch(action) {
|
|
115
|
+
this.actions$.emit(action);
|
|
116
|
+
}
|
|
117
|
+
log(action, scope = 'default') {
|
|
118
|
+
console.debug(action, scope);
|
|
119
|
+
}
|
|
120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgAtomicRootActionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
121
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgAtomicRootActionStore, providedIn: 'root' }); }
|
|
122
|
+
}
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgAtomicRootActionStore, decorators: [{
|
|
124
|
+
type: Injectable,
|
|
125
|
+
args: [{ providedIn: 'root' }]
|
|
126
|
+
}], ctorParameters: function () { return []; } });
|
|
127
|
+
class NgAtomicComponent extends InjectableComponent {
|
|
128
|
+
#destroy$;
|
|
129
|
+
constructor() {
|
|
130
|
+
super();
|
|
131
|
+
this.root = inject(NgAtomicRootActionStore);
|
|
132
|
+
this.#destroy$ = inject(DestroyRef);
|
|
133
|
+
this.root.actions$.pipe(takeUntilDestroyed(this.#destroy$)).subscribe(action => this.#effect(action, 'root'));
|
|
134
|
+
}
|
|
135
|
+
dispatch(action, scope = 'default') {
|
|
136
|
+
this.root.log(action, scope);
|
|
137
|
+
const effect = this.#effect(action, scope);
|
|
138
|
+
if (scope === 'root' && (!effect?.props || effect?.props?.dispatch)) {
|
|
139
|
+
this.root.actions$.emit(action);
|
|
140
|
+
}
|
|
141
|
+
else if (!effect?.props || effect?.props?.dispatch) {
|
|
142
|
+
this.action.emit(action);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
#effect(action, scope = 'default') {
|
|
146
|
+
const effect = (this._effectMap ?? new EffectMap()).get(action.id, scope);
|
|
147
|
+
if (effect?.key && effect?.props?.scope === scope) {
|
|
148
|
+
this[effect?.key](effect.props.accessor(action));
|
|
149
|
+
}
|
|
150
|
+
return effect;
|
|
151
|
+
}
|
|
152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgAtomicComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
153
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: NgAtomicComponent, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
154
|
+
}
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgAtomicComponent, decorators: [{
|
|
156
|
+
type: Directive,
|
|
157
|
+
args: [{ standalone: true }]
|
|
158
|
+
}], ctorParameters: function () { return []; } });
|
|
159
|
+
function Effect(id, { dispatch = false, scope = 'default', accessor = (action) => action.payload, } = {}) {
|
|
160
|
+
return function (target, propertyKey, descriptor) {
|
|
161
|
+
target['_effectMap'] ??= new EffectMap();
|
|
162
|
+
target['_effectMap'].set(id, { key: propertyKey, props: { dispatch, scope, accessor } });
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Generated bundle index. Do not edit.
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
export { Effect, InjectableComponent, NgAtomicComponent, NgAtomicComponentStore, NgAtomicRootActionStore, getInputs, getInputsByComponentRef, getOutputsByInstance, provideComponent };
|
|
171
|
+
//# sourceMappingURL=ng-atomic-common-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-core.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/core/injectable-component.ts","../../../../../packages/@ng-atomic/common/src/lib/core/component-store.ts","../../../../../packages/@ng-atomic/common/src/lib/core/ng-atomic-common-core.ts"],"sourcesContent":["import { ComponentRef, DestroyRef, Directive, ElementRef, EmbeddedViewRef, EventEmitter, Injector, Input, Output, Type, ViewContainerRef, inject } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { Action } from \"@ng-atomic/common/models\";\nimport { NgAtomicComponentStore } from \"./component-store\";\n\nexport type TypeFactoryAsync<T> = () => Promise<Type<T>>;\n\nexport type TypeFactory<T> = () => (Type<T> | Promise<Type<T>>);\n\nexport function provideComponent<ABS = any, IMPL = any>(\n abstract: Type<ABS>,\n typeOrFactory: Type<IMPL> | TypeFactory<IMPL>,\n) {\n async function loadComponentType(): Promise<Type<IMPL>> {\n if (typeof typeOrFactory === 'function' && !typeOrFactory.prototype) {\n return await (typeOrFactory as TypeFactory<IMPL>)();\n } else {\n return typeOrFactory as Type<IMPL>;\n }\n };\n return { provide: abstract['TOKEN'], useValue: loadComponentType };\n}\n\nexport function getInputs<T>(type: Type<T>, meta: 'ɵcmp' | 'ɵdir' = 'ɵcmp'): [string, string][] {\n return Object.entries(type[meta]['inputs']);\n}\n\nexport function getInputsByComponentRef<T = any>(cmp: ComponentRef<T>): [string, string][] {\n return getInputs(cmp.instance.constructor as Type<T>);\n}\n\nexport function getOutputsByInstance<T = any>(cmp: ComponentRef<T>): [string, string][] {\n return Object.entries(cmp.instance.constructor['ɵcmp']['outputs']);\n}\n\n@Directive({ standalone: true })\nexport class InjectableComponent<T extends NgAtomicComponentStore = any> {\n readonly #outlet = inject(ViewContainerRef);\n readonly #injector = inject(Injector);\n readonly #destroy$ = inject(DestroyRef);\n readonly #el = inject(ElementRef);\n\n #setAttribute(component: ComponentRef<T>) {\n const hostElement = (component.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n const attributes: NamedNodeMap = this.#el.nativeElement.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (attr.name.startsWith('_ngcontent')) {\n hostElement.setAttribute(attr.name, attr.value);\n }\n }\n }\n\n #bindInputs(component: ComponentRef<T>) {\n Object.entries(this.constructor['ɵdir']['inputs']).forEach(([key, value]: [string, string]) => {\n if (key === 'injectable') return;\n component.setInput(key, this[value]);\n });\n }\n\n #bindOutputs(component: ComponentRef<T>) {\n getOutputsByInstance(component).forEach(([alias, attr]: [string, string]) => {\n component.instance[attr].pipe(\n takeUntilDestroyed(this.#destroy$)\n ).subscribe((value) => this[attr].emit(value));\n });\n }\n\n ngOnInit() {\n if (this.injectable) {\n this.#injector.get<TypeFactoryAsync<T>>(this.constructor['TOKEN'])().then(type => {\n const ref = this.#outlet.createComponent(type);\n this.#bindInputs(ref);\n this.#bindOutputs(ref);\n this.#setAttribute(ref);\n });\n }\n }\n\n @Input({transform: (value: any) => value === '' ? true : value})\n private injectable = false;\n\n @Output()\n protected action = new EventEmitter<Action>();\n}\n","import { DestroyRef, Directive, EventEmitter, Injectable, inject } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { Action } from \"@ng-atomic/common/models\";\nimport { InjectableComponent } from \"./injectable-component\";\n\n@Directive({ standalone: true })\nexport class NgAtomicComponentStore {\n readonly action = new EventEmitter<Action>();\n}\n\ninterface EffectProps {\n dispatch: boolean;\n scope: string;\n accessor: <T = any>(action: Action) => T;\n}\n\nclass EffectMap extends Map<string, {key: string, props: EffectProps}> {\n get(key: string, scope = 'default'): { key: string; props: EffectProps; } {\n return super.get(this.makeKey(key, scope)); \n }\n\n set(key: string, value: { key: string; props: EffectProps; }): this {\n return super.set(this.makeKey(key, value.props.scope), value);\n }\n\n has(key: string, scope = 'default'): boolean {\n return super.has(this.makeKey(key, scope));\n }\n\n private makeKey(key: string, scope = 'default') {\n return `[${scope}]#${key}`;\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class NgAtomicRootActionStore {\n readonly actions$ = new EventEmitter<Action>();\n\n constructor() {\n this.actions$.subscribe(action => this.log(action, 'root'));\n }\n\n dispatch(action: Action) {\n this.actions$.emit(action);\n }\n\n log(action: Action, scope: string = 'default') {\n console.debug(action, scope);\n }\n}\n\n@Directive({ standalone: true })\nexport class NgAtomicComponent extends InjectableComponent {\n protected _effectMap: EffectMap;\n protected root = inject(NgAtomicRootActionStore);\n #destroy$ = inject(DestroyRef);\n\n constructor() {\n super();\n this.root.actions$.pipe(\n takeUntilDestroyed(this.#destroy$),\n ).subscribe(action => this.#effect(action, 'root'));\n }\n\n dispatch(action: Action, scope = 'default') {\n this.root.log(action, scope);\n const effect = this.#effect(action, scope);\n if (scope === 'root' && (!effect?.props || effect?.props?.dispatch)) {\n this.root.actions$.emit(action);\n } else if (!effect?.props || effect?.props?.dispatch) {\n this.action.emit(action);\n }\n }\n\n #effect(action: Action, scope = 'default') {\n const effect = (this._effectMap ?? new EffectMap()).get(action.id, scope);\n if (effect?.key && effect?.props?.scope === scope) {\n this[effect?.key](effect.props.accessor(action));\n }\n return effect;\n }\n}\n\nexport function Effect(id: string, {\n dispatch = false,\n scope = 'default',\n accessor = (action: Action) => action.payload,\n}: Partial<EffectProps> = {}) {\n return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n target['_effectMap'] ??= new EffectMap();\n target['_effectMap'].set(id, {key: propertyKey, props: {dispatch, scope, accessor}});\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASgB,SAAA,gBAAgB,CAC9B,QAAmB,EACnB,aAA6C,EAAA;AAE7C,IAAA,eAAe,iBAAiB,GAAA;QAC9B,IAAI,OAAO,aAAa,KAAK,UAAU,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE;YACnE,OAAO,MAAO,aAAmC,EAAE,CAAC;AACrD,SAAA;AAAM,aAAA;A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BAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,SAAS;mBAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;;AAgCzB,SAAU,MAAM,CAAC,EAAU,EAAE,EACjC,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,SAAS,EACjB,QAAQ,GAAG,CAAC,MAAc,KAAK,MAAM,CAAC,OAAO,GAAA,GACrB,EAAE,EAAA;AAC1B,IAAA,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B,EAAA;AAC/E,QAAA,MAAM,CAAC,YAAY,CAAC,KAAK,IAAI,SAAS,EAAE,CAAC;QACzC,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,EAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,EAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC,EAAC,CAAC,CAAC;AACvF,KAAC,CAAC;AACJ;;AC5FA;;AAEG;;;;"}
|
|
@@ -11,10 +11,10 @@ class IosSafariScrollBuggyfillDirective {
|
|
|
11
11
|
onTouchmove(event) {
|
|
12
12
|
event.preventDefault();
|
|
13
13
|
}
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IosSafariScrollBuggyfillDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
15
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: IosSafariScrollBuggyfillDirective, selector: "[iosSafariScrollBuggyfill]", host: { listeners: { "touchmove": "onTouchmove($event)" } }, ngImport: i0 }); }
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
IosSafariScrollBuggyfillDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: IosSafariScrollBuggyfillDirective, selector: "[iosSafariScrollBuggyfill]", host: { listeners: { "touchmove": "onTouchmove($event)" } }, ngImport: i0 });
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IosSafariScrollBuggyfillDirective, decorators: [{
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IosSafariScrollBuggyfillDirective, decorators: [{
|
|
18
18
|
type: Directive,
|
|
19
19
|
args: [{
|
|
20
20
|
selector: '[iosSafariScrollBuggyfill]'
|
|
@@ -25,11 +25,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
25
25
|
}] } });
|
|
26
26
|
|
|
27
27
|
class IosSafariScrollBuggyfillModule {
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IosSafariScrollBuggyfillModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
29
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IosSafariScrollBuggyfillModule, declarations: [IosSafariScrollBuggyfillDirective], imports: [CommonModule], exports: [IosSafariScrollBuggyfillDirective] }); }
|
|
30
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IosSafariScrollBuggyfillModule, imports: [CommonModule] }); }
|
|
28
31
|
}
|
|
29
|
-
|
|
30
|
-
IosSafariScrollBuggyfillModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: IosSafariScrollBuggyfillModule, declarations: [IosSafariScrollBuggyfillDirective], imports: [CommonModule], exports: [IosSafariScrollBuggyfillDirective] });
|
|
31
|
-
IosSafariScrollBuggyfillModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IosSafariScrollBuggyfillModule, imports: [CommonModule] });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IosSafariScrollBuggyfillModule, decorators: [{
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IosSafariScrollBuggyfillModule, decorators: [{
|
|
33
33
|
type: NgModule,
|
|
34
34
|
args: [{
|
|
35
35
|
declarations: [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.directive.ts","../../../../../packages/@ng-atomic/common/src/lib/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.module.ts","../../../../../packages/@ng-atomic/common/src/lib/directives/ios-safari-scroll-buggyfill/ng-atomic-common-directives-ios-safari-scroll-buggyfill.ts"],"sourcesContent":["import { AfterViewInit, Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[iosSafariScrollBuggyfill]'\n})\nexport class IosSafariScrollBuggyfillDirective implements AfterViewInit {\n\n ngAfterViewInit(): void {\n // this.el.nativeElement.addEventListener('touchmove', (e: Event) => {\n // e.preventDefault();\n // }, {passive: false});\n }\n\n @HostListener('touchmove', ['$event'])\n onTouchmove(event: Event) {\n event.preventDefault();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IosSafariScrollBuggyfillDirective } from './ios-safari-scroll-buggyfill.directive';\n\n\n\n@NgModule({\n declarations: [\n IosSafariScrollBuggyfillDirective,\n ],\n imports: [\n CommonModule,\n ],\n exports: [\n IosSafariScrollBuggyfillDirective,\n ]\n})\nexport class IosSafariScrollBuggyfillModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAKa,iCAAiC,CAAA;IAE5C,eAAe,GAAA;;;;KAId;AAGD,IAAA,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;kBAX1C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,iCAAiC;AAClC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,iCAAiC;AAClC,qBAAA;AACF,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-models.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/models/action.ts","../../../../../packages/@ng-atomic/common/src/lib/models/ng-atomic-common-models.ts"],"sourcesContent":["export interface Action<T = any> {\n id: string;\n payload?: T;\n name?: string;\n icon?: string;\n color?: string;\n disabled?: boolean;\n children?: Action<T>[],\n}\n\nexport type Actions = ((...args: any[]) => Action[]) | Action[];\n\nexport function resolveActions(actions: Actions, ...args: any[]) {\n if (typeof actions === 'function') {\n return actions(...args);\n }\n return actions;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAYgB,cAAc,CAAC,OAAgB,EAAE,GAAG,IAAW,EAAA;AAC7D,IAAA,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AACjC,QAAA,OAAO,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACzB,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AACjB;;ACjBA;;AAEG;;;;"}
|
|
@@ -6,10 +6,10 @@ class ActionsPipe {
|
|
|
6
6
|
transform(value, ...args) {
|
|
7
7
|
return resolveActions(value, ...args);
|
|
8
8
|
}
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
10
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ActionsPipe, isStandalone: true, name: "resolveActions" }); }
|
|
9
11
|
}
|
|
10
|
-
|
|
11
|
-
ActionsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: ActionsPipe, isStandalone: true, name: "resolveActions" });
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: ActionsPipe, decorators: [{
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActionsPipe, decorators: [{
|
|
13
13
|
type: Pipe,
|
|
14
14
|
args: [{
|
|
15
15
|
standalone: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-actions.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/actions/actions.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/actions/ng-atomic-common-pipes-actions.ts"],"sourcesContent":["import { Pipe } from \"@angular/core\";\nimport { resolveActions } from \"@ng-atomic/common/models\";\n\n@Pipe({\n standalone: true,\n name: 'resolveActions',\n pure: true\n})\nexport class ActionsPipe {\n transform(value: any, ...args: any[]): any {\n return resolveActions(value, ...args);\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAQa,WAAW,CAAA;AACtB,IAAA,SAAS,CAAC,KAAU,EAAE,GAAG,IAAW,EAAA;AAClC,QAAA,OAAO,cAAc,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;KACvC;+GAHU,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA,EAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,gBAAgB;AACtB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Pipe, Optional, Inject } from '@angular/core';
|
|
3
|
-
import
|
|
3
|
+
import get from 'lodash.get';
|
|
4
4
|
|
|
5
5
|
const DATA_ACCESSOR = new InjectionToken('DATA_ACCESSOR');
|
|
6
6
|
const defaultDataAccessor = (obj, key) => get(obj, key) ?? '';
|
|
7
7
|
class DataAccessorPipe {
|
|
8
8
|
constructor(dataAccessor) {
|
|
9
9
|
this.dataAccessor = dataAccessor;
|
|
10
|
-
this.dataAccessor
|
|
10
|
+
this.dataAccessor ??= defaultDataAccessor;
|
|
11
11
|
}
|
|
12
12
|
transform(data, key) {
|
|
13
13
|
return this.dataAccessor(data, key);
|
|
14
14
|
}
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataAccessorPipe, deps: [{ token: DATA_ACCESSOR, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
16
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DataAccessorPipe, isStandalone: true, name: "dataAccessor" }); }
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
DataAccessorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: DataAccessorPipe, isStandalone: true, name: "dataAccessor" });
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DataAccessorPipe, decorators: [{
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataAccessorPipe, decorators: [{
|
|
19
19
|
type: Pipe,
|
|
20
20
|
args: [{
|
|
21
21
|
name: 'dataAccessor',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-data-accessor.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/data-accessor/data-accessor.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/data-accessor/ng-atomic-common-pipes-data-accessor.ts"],"sourcesContent":["import { Inject, InjectionToken, Optional, Pipe } from \"@angular/core\";\nimport get from 'lodash.get';\n\nexport type DataAccessor<T> = (obj: T, key: string) => string;\nexport const DATA_ACCESSOR = new InjectionToken<DataAccessor<any>>('DATA_ACCESSOR');\nexport const defaultDataAccessor: DataAccessor<any> = (obj, key) => get(obj, key) ?? '';\n\n@Pipe({\n name: 'dataAccessor',\n pure: true,\n standalone: true,\n})\nexport class DataAccessorPipe<T> {\n\n constructor(\n @Optional() @Inject(DATA_ACCESSOR) protected dataAccessor?: DataAccessor<T>,\n ) {\n this.dataAccessor ??= defaultDataAccessor;\n }\n\n transform(data: T, key: string) {\n return this.dataAccessor(data, key);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAIa,aAAa,GAAG,IAAI,cAAc,CAAoB,eAAe,EAAE;AACvE,MAAA,mBAAmB,GAAsB,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG;MAO3E,gBAAgB,CAAA;AAE3B,IAAA,WAAA,CAC+C,YAA8B,EAAA;QAA9B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;AAE3E,QAAA,IAAI,CAAC,YAAY,KAAK,mBAAmB,CAAC;KAC3C;IAED,SAAS,CAAC,IAAO,EAAE,GAAW,EAAA;QAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;KACrC;AAVU,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,kBAGL,aAAa,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAHxB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,CAAA,EAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,cAAc;AACpB,oBAAA,IAAI,EAAE,IAAI;AACV,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;0BAII,QAAQ;;0BAAI,MAAM;2BAAC,aAAa,CAAA;;;ACfrC;;AAEG;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Pipe, Optional, Inject } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
const DOMAIN_LANG_MAP = new InjectionToken('domain lang map');
|
|
5
|
+
class DomainPipe {
|
|
6
|
+
constructor(map) {
|
|
7
|
+
this.map = map;
|
|
8
|
+
this.map ??= {};
|
|
9
|
+
}
|
|
10
|
+
transform(input) {
|
|
11
|
+
return this.map?.[input] ?? input;
|
|
12
|
+
}
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainPipe, deps: [{ token: DOMAIN_LANG_MAP, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
14
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DomainPipe, isStandalone: true, name: "domain" }); }
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainPipe, decorators: [{
|
|
17
|
+
type: Pipe,
|
|
18
|
+
args: [{
|
|
19
|
+
standalone: true,
|
|
20
|
+
name: 'domain',
|
|
21
|
+
pure: true,
|
|
22
|
+
}]
|
|
23
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
24
|
+
type: Optional
|
|
25
|
+
}, {
|
|
26
|
+
type: Inject,
|
|
27
|
+
args: [DOMAIN_LANG_MAP]
|
|
28
|
+
}] }]; } });
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Generated bundle index. Do not edit.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
export { DOMAIN_LANG_MAP, DomainPipe };
|
|
35
|
+
//# sourceMappingURL=ng-atomic-common-pipes-domain.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-domain.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/domain/domain.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/domain/ng-atomic-common-pipes-domain.ts"],"sourcesContent":["import { Inject, InjectionToken, Optional, Pipe } from '@angular/core';\n\nexport type DomainLangMap = Record<string, string>;\nexport const DOMAIN_LANG_MAP = new InjectionToken<DomainLangMap>('domain lang map');\n\n@Pipe({\n standalone: true,\n name: 'domain',\n pure: true,\n})\nexport class DomainPipe {\n constructor(@Optional() @Inject(DOMAIN_LANG_MAP) private map: DomainLangMap) {\n this.map ??= {};\n }\n\n transform(input: string) {\n return this.map?.[input] ?? input;\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,eAAe,GAAG,IAAI,cAAc,CAAgB,iBAAiB,EAAE;MAOvE,UAAU,CAAA;AACrB,IAAA,WAAA,CAAyD,GAAkB,EAAA;QAAlB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAe;AACzE,QAAA,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC;KACjB;AAED,IAAA,SAAS,CAAC,KAAa,EAAA;QACrB,OAAO,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,KAAK,CAAC;KACnC;AAPU,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,kBACW,eAAe,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GADpC,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,QAAA,EAAA,CAAA,CAAA,EAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,QAAQ;AACd,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA,CAAA;;0BAEc,QAAQ;;0BAAI,MAAM;2BAAC,eAAe,CAAA;;;ACXjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Pipe } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
const ERROR_MESSAGE_RESOLVER = new InjectionToken('[@ng-atomic/common] Error message resolver');
|
|
5
|
+
const defaultErrorMessageResolver = (errors) => {
|
|
6
|
+
if (!errors)
|
|
7
|
+
return '';
|
|
8
|
+
const value = Object.entries(errors)[0][0];
|
|
9
|
+
switch (value) {
|
|
10
|
+
case 'required':
|
|
11
|
+
return '必須項目です';
|
|
12
|
+
case 'minlength':
|
|
13
|
+
return `最低${errors[value].requiredLength}文字以上で入力してください`;
|
|
14
|
+
case 'maxlength':
|
|
15
|
+
return `最大${errors[value].requiredLength}文字以下で入力してください`;
|
|
16
|
+
case 'email':
|
|
17
|
+
return 'メールアドレスの形式で入力してください';
|
|
18
|
+
case 'pattern':
|
|
19
|
+
return '半角英数字で入力してください';
|
|
20
|
+
default:
|
|
21
|
+
return '値を確認してください';
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function provideErrorMessageResolver(resolver) {
|
|
25
|
+
return { provide: ERROR_MESSAGE_RESOLVER, useValue: resolver };
|
|
26
|
+
}
|
|
27
|
+
class ErrorPipe {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.resolver = inject(ERROR_MESSAGE_RESOLVER, { optional: true }) ?? defaultErrorMessageResolver;
|
|
30
|
+
}
|
|
31
|
+
transform(errors) {
|
|
32
|
+
return this.resolver(errors);
|
|
33
|
+
}
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
35
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ErrorPipe, isStandalone: true, name: "error" }); }
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorPipe, decorators: [{
|
|
38
|
+
type: Pipe,
|
|
39
|
+
args: [{
|
|
40
|
+
standalone: true,
|
|
41
|
+
name: 'error',
|
|
42
|
+
pure: true,
|
|
43
|
+
}]
|
|
44
|
+
}] });
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Generated bundle index. Do not edit.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
export { ERROR_MESSAGE_RESOLVER, ErrorPipe, defaultErrorMessageResolver, provideErrorMessageResolver };
|
|
51
|
+
//# sourceMappingURL=ng-atomic-common-pipes-error.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-error.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/error/error.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/error/ng-atomic-common-pipes-error.ts"],"sourcesContent":["import { InjectionToken, Pipe, inject } from \"@angular/core\";\nimport { ValidationErrors } from \"@angular/forms\";\n\nexport type ErrorMessageResolver = (errors: ValidationErrors) => string;\nexport const ERROR_MESSAGE_RESOLVER = new InjectionToken<ErrorMessageResolver>('[@ng-atomic/common] Error message resolver');\n\nexport const defaultErrorMessageResolver: ErrorMessageResolver = (errors: ValidationErrors): string => {\n if (!errors) return '';\n const value = Object.entries(errors)[0][0];\n switch (value) {\n case 'required':\n return '必須項目です';\n case 'minlength':\n return `最低${errors[value].requiredLength}文字以上で入力してください`;\n case 'maxlength':\n return `最大${errors[value].requiredLength}文字以下で入力してください`;\n case 'email':\n return 'メールアドレスの形式で入力してください';\n case 'pattern':\n return '半角英数字で入力してください';\n default:\n return '値を確認してください';\n }\n};\n\nexport function provideErrorMessageResolver(resolver: ErrorMessageResolver) {\n return {provide: ERROR_MESSAGE_RESOLVER, useValue: resolver};\n}\n\n@Pipe({\n standalone: true,\n name: 'error',\n pure: true,\n})\nexport class ErrorPipe {\n protected resolver = inject(ERROR_MESSAGE_RESOLVER, {optional: true}) ?? defaultErrorMessageResolver;\n\n transform(errors: ValidationErrors): string {\n return this.resolver(errors);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAIa,sBAAsB,GAAG,IAAI,cAAc,CAAuB,4CAA4C,EAAE;AAEhH,MAAA,2BAA2B,GAAyB,CAAC,MAAwB,KAAY;AACpG,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,EAAE,CAAC;AACvB,IAAA,MAAM,KAAK,GAAG,MA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oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,OAAO;AACb,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Pipe } from '@angular/core';
|
|
3
|
+
import { DATA_ACCESSOR, defaultDataAccessor } from '@ng-atomic/common/pipes/data-accessor';
|
|
4
|
+
|
|
5
|
+
class GroupedByPipe {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.dataAccessor = inject(DATA_ACCESSOR) ?? defaultDataAccessor;
|
|
8
|
+
}
|
|
9
|
+
transform(items, groupedBy) {
|
|
10
|
+
return (items ?? []).reduce((acc, item) => {
|
|
11
|
+
const key = this.dataAccessor(item, groupedBy);
|
|
12
|
+
acc[key] ??= [],
|
|
13
|
+
acc[key].push(item);
|
|
14
|
+
return acc;
|
|
15
|
+
}, {});
|
|
16
|
+
}
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupedByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
18
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GroupedByPipe, isStandalone: true, name: "groupedBy" }); }
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupedByPipe, decorators: [{
|
|
21
|
+
type: Pipe,
|
|
22
|
+
args: [{
|
|
23
|
+
name: 'groupedBy',
|
|
24
|
+
standalone: true,
|
|
25
|
+
pure: true,
|
|
26
|
+
}]
|
|
27
|
+
}] });
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generated bundle index. Do not edit.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export { GroupedByPipe };
|
|
34
|
+
//# sourceMappingURL=ng-atomic-common-pipes-grouped-by.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-grouped-by.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/grouped-by/grouped-by.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/grouped-by/ng-atomic-common-pipes-grouped-by.ts"],"sourcesContent":["import { Pipe, inject } from \"@angular/core\";\nimport { DATA_ACCESSOR, defaultDataAccessor } from \"@ng-atomic/common/pipes/data-accessor\";\n\n@Pipe({\n name: 'groupedBy',\n standalone: true,\n pure: true,\n})\nexport class GroupedByPipe {\n private dataAccessor = inject(DATA_ACCESSOR) ?? defaultDataAccessor;\n\n transform<T>(items: T[], groupedBy: string): { [id: string]: T[] } {\n return (items ?? []).reduce((acc, item) => {\n const key = this.dataAccessor(item, groupedBy);\n acc[key] ??= [],\n acc[key].push(item);\n return acc;\n }, {} as { [id: string]: T[] });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAQa,aAAa,CAAA;AAL1B,IAAA,WAAA,GAAA;AAMU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,mBAAmB,CAAC;AAUrE,KAAA;IARC,SAAS,CAAI,KAAU,EAAE,SAAiB,EAAA;AACxC,QAAA,OAAO,CAAC,KAAK,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAI;YACxC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC/C,YAAA,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE;gBACf,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpB,YAAA,OAAO,GAAG,CAAC;SACZ,EAAE,EAA2B,CAAC,CAAC;KACjC;+GAVU,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA,EAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AACjB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class KeysPipe {
|
|
5
|
+
transform(obj) {
|
|
6
|
+
return Object.keys(obj);
|
|
7
|
+
}
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: KeysPipe, isStandalone: true, name: "keys" }); }
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KeysPipe, decorators: [{
|
|
12
|
+
type: Pipe,
|
|
13
|
+
args: [{
|
|
14
|
+
name: 'keys',
|
|
15
|
+
standalone: true,
|
|
16
|
+
pure: true,
|
|
17
|
+
}]
|
|
18
|
+
}] });
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Generated bundle index. Do not edit.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export { KeysPipe };
|
|
25
|
+
//# sourceMappingURL=ng-atomic-common-pipes-keys.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-keys.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/keys/keys.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/keys/ng-atomic-common-pipes-keys.ts"],"sourcesContent":["import { Pipe } from \"@angular/core\";\n\n@Pipe({\n name: 'keys',\n standalone: true,\n pure: true,\n})\nexport class KeysPipe {\n transform(obj: { [id: string]: any }) {\n return Object.keys(obj);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAOa,QAAQ,CAAA;AACnB,IAAA,SAAS,CAAC,GAA0B,EAAA;AAClC,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACzB;+GAHU,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,MAAM;AACZ,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Pipe, Optional, Inject } from '@angular/core';
|
|
3
|
+
import { smartSortByTransformer } from '@ng-atomic/common/pipes/smart-sort-by';
|
|
4
|
+
|
|
5
|
+
const PAGINATION_TRANSFORMER = new InjectionToken('[@ng-atomic/pipes] Pagination Transformer');
|
|
6
|
+
function paginationTransformer(items, page) {
|
|
7
|
+
return smartSortByTransformer(items, page.key, page.order).slice(page.start, page.end);
|
|
8
|
+
}
|
|
9
|
+
class PaginationPipe {
|
|
10
|
+
constructor(transformer) {
|
|
11
|
+
this.transformer = transformer;
|
|
12
|
+
this.transformer ??= paginationTransformer;
|
|
13
|
+
}
|
|
14
|
+
transform(items, { sortKey = null, sortOrder = 'asc', start = 0, end = 0 } = {}) {
|
|
15
|
+
return this.transformer(items, { key: sortKey, order: sortOrder, start, end });
|
|
16
|
+
}
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PaginationPipe, deps: [{ token: PAGINATION_TRANSFORMER, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
18
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PaginationPipe, isStandalone: true, name: "pagination" }); }
|
|
19
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PaginationPipe, providedIn: 'root' }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PaginationPipe, decorators: [{
|
|
22
|
+
type: Injectable,
|
|
23
|
+
args: [{ providedIn: 'root' }]
|
|
24
|
+
}, {
|
|
25
|
+
type: Pipe,
|
|
26
|
+
args: [{ standalone: true, name: 'pagination', pure: true }]
|
|
27
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
28
|
+
type: Optional
|
|
29
|
+
}, {
|
|
30
|
+
type: Inject,
|
|
31
|
+
args: [PAGINATION_TRANSFORMER]
|
|
32
|
+
}] }]; } });
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Generated bundle index. Do not edit.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
export { PAGINATION_TRANSFORMER, PaginationPipe, paginationTransformer };
|
|
39
|
+
//# sourceMappingURL=ng-atomic-common-pipes-pagination.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-pagination.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/pagination/pagination.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/pagination/ng-atomic-common-pipes-pagination.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken, Optional, Pipe, PipeTransform } from '@angular/core';\nimport { smartSortByTransformer } from '@ng-atomic/common/pipes/smart-sort-by';\n\ninterface Page {\n start: number;\n end: number;\n key: string;\n order: 'asc' | 'desc';\n}\n\nexport const PAGINATION_TRANSFORMER = new InjectionToken('[@ng-atomic/pipes] Pagination Transformer');\nexport type PaginationTransformer<E> = (items: E[], page: Page) => E[];\nexport function paginationTransformer<E>(items: E[], page: Page): E[] {\n return smartSortByTransformer(items, page.key, page.order).slice(page.start, page.end);\n}\n\n@Injectable({ providedIn: 'root' })\n@Pipe({standalone: true, name: 'pagination', pure: true})\nexport class PaginationPipe<E> implements PipeTransform {\n\n constructor(\n @Optional()\n @Inject(PAGINATION_TRANSFORMER)\n private transformer: PaginationTransformer<E>,\n ) {\n this.transformer ??= paginationTransformer;\n }\n\n transform(items: E[], {\n sortKey = null, \n sortOrder = 'asc',\n start = 0,\n end = 0\n }: {sortKey?: string, sortOrder?: 'asc' | 'desc', start?: number, end?: number} = {}) {\n return this.transformer(items, { key: sortKey, order: sortOrder, start, end });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAUa,sBAAsB,GAAG,IAAI,cAAc,CAAC,2CAA2C,EAAE;AAEtF,SAAA,qBAAqB,CAAI,KAAU,EAAE,IAAU,EAAA;IAC7D,OAAO,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAA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AAA;;0BAInD,QAAQ;;0BACR,MAAM;2BAAC,sBAAsB,CAAA;;;ACtBlC;;AAEG;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable, Pipe } from '@angular/core';
|
|
3
|
+
import { QueryResolverService } from '@ng-atomic/common/services/query-resolver';
|
|
4
|
+
|
|
5
|
+
class QueryPipe {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.resolver = inject(QueryResolverService);
|
|
8
|
+
}
|
|
9
|
+
transform(items, query) {
|
|
10
|
+
return this.resolver.resolve(items, query);
|
|
11
|
+
}
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: QueryPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
13
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: QueryPipe, isStandalone: true, name: "query" }); }
|
|
14
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: QueryPipe, providedIn: 'any' }); }
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: QueryPipe, decorators: [{
|
|
17
|
+
type: Injectable,
|
|
18
|
+
args: [{ providedIn: 'any' }]
|
|
19
|
+
}, {
|
|
20
|
+
type: Pipe,
|
|
21
|
+
args: [{
|
|
22
|
+
name: 'query',
|
|
23
|
+
standalone: true,
|
|
24
|
+
pure: true,
|
|
25
|
+
}]
|
|
26
|
+
}] });
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Generated bundle index. Do not edit.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
export { QueryPipe };
|
|
33
|
+
//# sourceMappingURL=ng-atomic-common-pipes-query.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-query.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/query/query.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/query/ng-atomic-common-pipes-query.ts"],"sourcesContent":["import { Injectable, Pipe, PipeTransform, inject } from '@angular/core';\nimport { QueryResolverService } from '@ng-atomic/common/services/query-resolver';\n\n@Injectable({ providedIn: 'any' })\n@Pipe({\n name: 'query',\n standalone: true,\n pure: true,\n})\nexport class QueryPipe<E> implements PipeTransform {\n\n protected resolver = inject(QueryResolverService);\n\n transform(items: E[], query: string): E[] {\n return this.resolver.resolve(items, query);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,SAAS,CAAA;AANtB,IAAA,WAAA,GAAA;AAQY,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAMnD,KAAA;IAJC,SAAS,CAAC,KAAU,EAAE,KAAa,EAAA;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAC5C;+GANU,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,CAAA,EAAA;AAAT,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,SAAS,cANI,KAAK,EAAA,CAAA,CAAA,EAAA;;4FAMlB,SAAS,EAAA,UAAA,EAAA,CAAA;kBANrB,UAAU;mBAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA;;kBAChC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,OAAO;AACb,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -6,15 +6,15 @@ const defaultSelectId = (entity) => entity.id;
|
|
|
6
6
|
class SelectIdPipe {
|
|
7
7
|
constructor(selectId) {
|
|
8
8
|
this.selectId = selectId;
|
|
9
|
-
this.selectId
|
|
9
|
+
this.selectId ??= defaultSelectId;
|
|
10
10
|
}
|
|
11
11
|
transform(entity) {
|
|
12
12
|
return this.selectId(entity);
|
|
13
13
|
}
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectIdPipe, deps: [{ token: SELECT_ID, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
15
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SelectIdPipe, isStandalone: true, name: "selectId" }); }
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
SelectIdPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: SelectIdPipe, isStandalone: true, name: "selectId" });
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SelectIdPipe, decorators: [{
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectIdPipe, decorators: [{
|
|
18
18
|
type: Pipe,
|
|
19
19
|
args: [{
|
|
20
20
|
name: 'selectId',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-pipes-select-id.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/pipes/select-id/select-id.pipe.ts","../../../../../packages/@ng-atomic/common/src/lib/pipes/select-id/ng-atomic-common-pipes-select-id.ts"],"sourcesContent":["import { Inject, InjectionToken, Optional, Pipe } from \"@angular/core\";\n\nexport type SelectId = (entity: object) => string | number;\nexport const SELECT_ID = new InjectionToken<SelectId>('[@ng-atomic/common] Select Id');\nexport const defaultSelectId: SelectId = (entity: any) => entity.id;\n\n@Pipe({\n name: 'selectId',\n pure: true,\n standalone: true,\n})\nexport class SelectIdPipe {\n constructor(\n @Optional() @Inject(SELECT_ID) protected selectId: SelectId\n ) {\n this.selectId ??= defaultSelectId;\n }\n\n transform(entity: any): string | number {\n return this.selectId(entity);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,SAAS,GAAG,IAAI,cAAc,CAAW,+BAA+B,EAAE;AAChF,MAAM,eAAe,GAAa,CAAC,MAAW,KAAK,MAAM,CAAC,GAAG;MAOvD,YAAY,CAAA;AACvB,IAAA,WAAA,CAC2C,QAAkB,EAAA;QAAlB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AAE3D,QAAA,IAAI,CAAC,QAAQ,KAAK,eAAe,CAAC;KACnC;AAED,IAAA,SAAS,CAAC,MAAW,EAAA;AACnB,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KAC9B;AATU,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,kBAED,SAAS,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAFpB,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA,EAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,IAAI,EAAE,IAAI;AACV,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;0BAGI,QAAQ;;0BAAI,MAAM;2BAAC,SAAS,CAAA;;;ACbjC;;AAEG;;;;"}
|