@odx/angular 1.0.0-rc.1 → 1.0.0-rc.3
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/LICENSE +1 -0
- package/README.md +43 -0
- package/animations/index.d.ts +3 -2
- package/animations/{config.d.ts → lib/config.d.ts} +0 -0
- package/animations/lib/expand.d.ts +2 -0
- package/animations/{fade.d.ts → lib/fade.d.ts} +0 -0
- package/animations/{slide.d.ts → lib/slide.d.ts} +0 -0
- package/cdk/checkbox-control/README.md +3 -0
- package/cdk/checkbox-control/index.d.ts +1 -0
- package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +16 -0
- package/cdk/custom-form-control/README.md +3 -0
- package/cdk/custom-form-control/index.d.ts +2 -0
- package/{lib/directives → cdk/custom-form-control/lib}/control.directive.d.ts +1 -3
- package/{lib/controls → cdk/custom-form-control/lib}/custom-form-control.d.ts +7 -8
- package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +1 -1
- package/cdk/dynamic-view/lib/facade/dynamic-content.d.ts +1 -1
- package/cdk/dynamic-view/lib/facade/dynamic-view-ref.d.ts +1 -1
- package/cdk/dynamic-view/lib/facade/index.d.ts +0 -1
- package/cdk/dynamic-view/lib/helpers/index.d.ts +0 -2
- package/cdk/dynamic-view/lib/models/dynamic-component-ref.d.ts +5 -3
- package/cdk/dynamic-view/lib/models/dynamic-template-ref.d.ts +1 -1
- package/cdk/expandable/README.md +3 -0
- package/cdk/expandable/index.d.ts +3 -0
- package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +18 -0
- package/cdk/expandable/lib/directives/extandable-container.directive.d.ts +13 -0
- package/cdk/expandable/lib/directives/index.d.ts +2 -0
- package/cdk/expandable/lib/expandable.module.d.ts +8 -0
- package/cdk/expandable/lib/facade/expandable-container.d.ts +6 -0
- package/cdk/expandable/lib/facade/expandable-item.d.ts +7 -0
- package/cdk/expandable/lib/facade/index.d.ts +2 -0
- package/cdk/radio-group-control/README.md +3 -0
- package/cdk/radio-group-control/index.d.ts +3 -0
- package/cdk/radio-group-control/lib/radio-control.directive.d.ts +13 -0
- package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +10 -0
- package/cdk/radio-group-control/lib/radio-group-control.module.d.ts +9 -0
- package/components/accordion/README.md +3 -0
- package/components/accordion/index.d.ts +4 -0
- package/components/accordion/lib/accordion.component.d.ts +7 -0
- package/components/accordion/lib/accordion.module.d.ts +10 -0
- package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +16 -0
- package/components/accordion/lib/components/index.d.ts +1 -0
- package/components/accordion/lib/directives/accordion-item-title.d.ts +5 -0
- package/components/accordion/lib/directives/index.d.ts +1 -0
- package/components/action-group/action-group.component.d.ts +1 -3
- package/components/area-header/area-header.component.d.ts +1 -3
- package/components/area-header/area-header.module.d.ts +2 -1
- package/components/avatar/lib/avatar.component.d.ts +1 -3
- package/components/badge/lib/badge.component.d.ts +3 -5
- package/components/badge/lib/badge.directive.d.ts +4 -5
- package/components/button/lib/button.component.d.ts +8 -16
- package/components/button/lib/models/button-size.d.ts +5 -0
- package/components/button/lib/models/index.d.ts +1 -0
- package/components/button-group/README.md +3 -0
- package/components/button-group/index.d.ts +1 -0
- package/components/button-group/lib/button-group.component.d.ts +15 -0
- package/components/checkbox/lib/checkbox.component.d.ts +5 -12
- package/components/form-field/README.md +3 -0
- package/components/form-field/index.d.ts +6 -0
- package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +9 -0
- package/components/form-field/lib/components/form-group/form-group.component.d.ts +14 -0
- package/components/form-field/lib/components/index.d.ts +2 -0
- package/components/form-field/lib/directives/form-field-control.directive.d.ts +22 -0
- package/components/form-field/lib/directives/form-field-error.directive.d.ts +10 -0
- package/components/form-field/lib/directives/form-field-hint.directive.d.ts +8 -0
- package/components/form-field/lib/directives/form-field-label.directive.d.ts +6 -0
- package/components/form-field/lib/directives/form.directive.d.ts +9 -0
- package/components/form-field/lib/directives/index.d.ts +5 -0
- package/components/form-field/lib/form-field.component.d.ts +18 -0
- package/components/form-field/lib/form-field.config.d.ts +19 -0
- package/components/form-field/lib/form-field.module.d.ts +18 -0
- package/components/form-field/lib/form-field.service.d.ts +30 -0
- package/components/form-field/lib/models/form-field-error-resolver.d.ts +27 -0
- package/components/form-field/lib/models/form-field-error.d.ts +7 -0
- package/components/form-field/lib/models/index.d.ts +2 -0
- package/components/form-field/lib/services/form-field-error.service.d.ts +18 -0
- package/components/form-field/lib/services/index.d.ts +1 -0
- package/components/header/lib/header.component.d.ts +1 -3
- package/components/header/lib/header.module.d.ts +2 -1
- package/components/icon/lib/icon.component.d.ts +9 -5
- package/components/link/link.directive.d.ts +4 -6
- package/components/logo/logo.directive.d.ts +1 -3
- package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +1 -4
- package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +3 -4
- package/components/main-menu/lib/main-menu.component.d.ts +2 -4
- package/components/main-menu/lib/main-menu.module.d.ts +6 -6
- package/components/modal/README.md +3 -0
- package/components/modal/index.d.ts +9 -0
- package/components/modal/lib/components/index.d.ts +2 -0
- package/components/modal/lib/components/modal-footer/modal-footer.component.d.ts +6 -0
- package/components/modal/lib/components/modal-header/modal-header.component.d.ts +11 -0
- package/components/modal/lib/directives/index.d.ts +3 -0
- package/components/modal/lib/directives/modal-close.directive.d.ts +8 -0
- package/components/modal/lib/directives/modal-content.directive.d.ts +6 -0
- package/components/modal/lib/directives/modal-dismiss.directive.d.ts +7 -0
- package/components/modal/lib/helpers/index.d.ts +2 -0
- package/components/modal/lib/helpers/inject-modal-ref.d.ts +2 -0
- package/components/modal/lib/helpers/provide-modal-ref.d.ts +3 -0
- package/components/modal/lib/modal.component.d.ts +16 -0
- package/components/modal/lib/modal.config.d.ts +3 -0
- package/components/modal/lib/modal.directive.d.ts +14 -0
- package/components/modal/lib/modal.module.d.ts +21 -0
- package/components/modal/lib/modal.service.d.ts +20 -0
- package/components/modal/lib/models/index.d.ts +4 -0
- package/components/modal/lib/models/modal-options.d.ts +13 -0
- package/components/modal/lib/models/modal-ref.d.ts +16 -0
- package/components/modal/lib/models/modal-size.d.ts +6 -0
- package/components/modal/lib/models/modal-type.d.ts +8 -0
- package/components/modal/lib/services/index.d.ts +1 -0
- package/components/modal/lib/services/open-modal-manager.service.d.ts +15 -0
- package/components/radio-group/lib/components/radio-button/radio-button.component.d.ts +4 -11
- package/components/radio-group/lib/radio-group.component.d.ts +3 -5
- package/components/radio-group/lib/radio-group.module.d.ts +4 -4
- package/components/switch/README.md +3 -0
- package/components/switch/index.d.ts +1 -0
- package/components/switch/lib/switch.component.d.ts +6 -0
- package/components/toggle-button-group/README.md +3 -0
- package/components/toggle-button-group/index.d.ts +3 -0
- package/components/toggle-button-group/lib/components/index.d.ts +1 -0
- package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +7 -0
- package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +7 -0
- package/components/toggle-button-group/lib/toggle-button-group.module.d.ts +9 -0
- package/esm2020/animations/index.mjs +4 -3
- package/esm2020/animations/lib/config.mjs +8 -0
- package/esm2020/animations/lib/expand.mjs +12 -0
- package/esm2020/animations/lib/fade.mjs +12 -0
- package/esm2020/animations/lib/slide.mjs +34 -0
- package/esm2020/cdk/checkbox-control/index.mjs +2 -0
- package/esm2020/cdk/checkbox-control/lib/checkbox-control.directive.mjs +43 -0
- package/esm2020/cdk/checkbox-control/odx-angular-cdk-checkbox-control.mjs +5 -0
- package/esm2020/cdk/custom-form-control/index.mjs +3 -0
- package/esm2020/cdk/custom-form-control/lib/control.directive.mjs +19 -0
- package/esm2020/cdk/custom-form-control/lib/custom-form-control.mjs +121 -0
- package/esm2020/cdk/custom-form-control/odx-angular-cdk-custom-form-control.mjs +5 -0
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.component.mjs +3 -3
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.directive.mjs +11 -10
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.service.mjs +5 -5
- package/esm2020/cdk/dynamic-view/lib/facade/dynamic-content.mjs +1 -1
- package/esm2020/cdk/dynamic-view/lib/facade/dynamic-view-ref.mjs +1 -1
- package/esm2020/cdk/dynamic-view/lib/facade/index.mjs +1 -2
- package/esm2020/cdk/dynamic-view/lib/helpers/index.mjs +1 -3
- package/esm2020/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.mjs +2 -2
- package/esm2020/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +18 -8
- package/esm2020/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +6 -2
- package/esm2020/cdk/expandable/index.mjs +4 -0
- package/esm2020/cdk/expandable/lib/directives/expandable-item.directive.mjs +48 -0
- package/esm2020/cdk/expandable/lib/directives/extandable-container.directive.mjs +43 -0
- package/esm2020/cdk/expandable/lib/directives/index.mjs +3 -0
- package/esm2020/cdk/expandable/lib/expandable.module.mjs +17 -0
- package/esm2020/cdk/expandable/lib/facade/expandable-container.mjs +3 -0
- package/esm2020/cdk/expandable/lib/facade/expandable-item.mjs +3 -0
- package/esm2020/cdk/expandable/lib/facade/index.mjs +3 -0
- package/esm2020/cdk/expandable/odx-angular-cdk-expandable.mjs +5 -0
- package/esm2020/cdk/radio-group-control/index.mjs +4 -0
- package/esm2020/cdk/radio-group-control/lib/radio-control.directive.mjs +39 -0
- package/esm2020/cdk/radio-group-control/lib/radio-group-control.directive.mjs +43 -0
- package/esm2020/cdk/radio-group-control/lib/radio-group-control.module.mjs +19 -0
- package/esm2020/cdk/radio-group-control/odx-angular-cdk-radio-group-control.mjs +5 -0
- package/esm2020/components/accordion/index.mjs +5 -0
- package/esm2020/components/accordion/lib/accordion.component.mjs +24 -0
- package/esm2020/components/accordion/lib/accordion.module.mjs +20 -0
- package/esm2020/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +54 -0
- package/esm2020/components/accordion/lib/components/index.mjs +2 -0
- package/esm2020/components/accordion/lib/directives/accordion-item-title.mjs +14 -0
- package/esm2020/components/accordion/lib/directives/index.mjs +2 -0
- package/esm2020/components/accordion/odx-angular-components-accordion.mjs +5 -0
- package/esm2020/components/action-group/action-group.component.mjs +15 -18
- package/esm2020/components/area-header/area-header.component.mjs +10 -10
- package/esm2020/components/area-header/area-header.module.mjs +9 -8
- package/esm2020/components/area-header/directives/area-header-content.directive.mjs +4 -5
- package/esm2020/components/area-header/directives/area-header-subtitle.directive.mjs +4 -5
- package/esm2020/components/avatar/lib/avatar.component.mjs +10 -10
- package/esm2020/components/badge/lib/badge.component.mjs +20 -22
- package/esm2020/components/badge/lib/badge.directive.mjs +11 -11
- package/esm2020/components/button/lib/button.component.mjs +26 -33
- package/esm2020/components/button/lib/models/button-size.mjs +5 -0
- package/esm2020/components/button/lib/models/index.mjs +2 -1
- package/esm2020/components/button-group/index.mjs +2 -0
- package/esm2020/components/button-group/lib/button-group.component.mjs +54 -0
- package/esm2020/components/button-group/odx-angular-components-button-group.mjs +5 -0
- package/esm2020/components/checkbox/lib/checkbox.component.mjs +16 -33
- package/esm2020/components/content-box/lib/content-box.component.mjs +3 -3
- package/esm2020/components/content-box/lib/content-box.module.mjs +4 -4
- package/esm2020/components/content-box/lib/directives/content-box-footer-directive.mjs +4 -5
- package/esm2020/components/content-box/lib/directives/content-box-header-directive.mjs +4 -5
- package/esm2020/components/form-field/index.mjs +7 -0
- package/esm2020/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +24 -0
- package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +36 -0
- package/esm2020/components/form-field/lib/components/index.mjs +3 -0
- package/esm2020/components/form-field/lib/directives/form-field-control.directive.mjs +68 -0
- package/esm2020/components/form-field/lib/directives/form-field-error.directive.mjs +25 -0
- package/esm2020/components/form-field/lib/directives/form-field-hint.directive.mjs +23 -0
- package/esm2020/components/form-field/lib/directives/form-field-label.directive.mjs +24 -0
- package/esm2020/components/form-field/lib/directives/form.directive.mjs +28 -0
- package/esm2020/components/form-field/lib/directives/index.mjs +6 -0
- package/esm2020/components/form-field/lib/form-field.component.mjs +47 -0
- package/esm2020/components/form-field/lib/form-field.config.mjs +7 -0
- package/esm2020/components/form-field/lib/form-field.module.mjs +49 -0
- package/esm2020/components/form-field/lib/form-field.service.mjs +53 -0
- package/esm2020/components/form-field/lib/models/form-field-error-resolver.mjs +2 -0
- package/esm2020/components/form-field/lib/models/form-field-error.mjs +2 -0
- package/esm2020/components/form-field/lib/models/index.mjs +3 -0
- package/esm2020/components/form-field/lib/services/form-field-error.service.mjs +56 -0
- package/esm2020/components/form-field/lib/services/index.mjs +2 -0
- package/esm2020/components/form-field/odx-angular-components-form-field.mjs +5 -0
- package/esm2020/components/header/lib/directives/header-avatar.directive.mjs +3 -3
- package/esm2020/components/header/lib/directives/header-title.directive.mjs +4 -5
- package/esm2020/components/header/lib/header.component.mjs +11 -11
- package/esm2020/components/header/lib/header.module.mjs +9 -9
- package/esm2020/components/icon/lib/icon.component.mjs +36 -12
- package/esm2020/components/link/link.directive.mjs +14 -18
- package/esm2020/components/logo/logo.directive.mjs +10 -11
- package/esm2020/components/main-menu/lib/directives/main-menu-button.directive.mjs +12 -13
- package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +14 -14
- package/esm2020/components/main-menu/lib/main-menu.component.mjs +21 -22
- package/esm2020/components/main-menu/lib/main-menu.module.mjs +7 -7
- package/esm2020/components/main-menu/lib/main-menu.service.mjs +5 -5
- package/esm2020/components/modal/index.mjs +10 -0
- package/esm2020/components/modal/lib/components/index.mjs +3 -0
- package/esm2020/components/modal/lib/components/modal-footer/modal-footer.component.mjs +21 -0
- package/esm2020/components/modal/lib/components/modal-header/modal-header.component.mjs +38 -0
- package/esm2020/components/modal/lib/directives/index.mjs +4 -0
- package/esm2020/components/modal/lib/directives/modal-close.directive.mjs +29 -0
- package/esm2020/components/modal/lib/directives/modal-content.directive.mjs +24 -0
- package/esm2020/components/modal/lib/directives/modal-dismiss.directive.mjs +24 -0
- package/esm2020/components/modal/lib/helpers/index.mjs +3 -0
- package/esm2020/components/modal/lib/helpers/inject-modal-ref.mjs +6 -0
- package/esm2020/components/modal/lib/helpers/provide-modal-ref.mjs +5 -0
- package/esm2020/components/modal/lib/modal.component.mjs +63 -0
- package/esm2020/components/modal/lib/modal.config.mjs +8 -0
- package/esm2020/components/modal/lib/modal.directive.mjs +33 -0
- package/esm2020/components/modal/lib/modal.module.mjs +32 -0
- package/esm2020/components/modal/lib/modal.service.mjs +70 -0
- package/esm2020/components/modal/lib/models/index.mjs +5 -0
- package/esm2020/components/modal/lib/models/modal-options.mjs +2 -0
- package/esm2020/components/modal/lib/models/modal-ref.mjs +33 -0
- package/esm2020/components/modal/lib/models/modal-size.mjs +6 -0
- package/esm2020/components/modal/lib/models/modal-type.mjs +2 -0
- package/esm2020/components/modal/lib/services/index.mjs +2 -0
- package/esm2020/components/modal/lib/services/open-modal-manager.service.mjs +42 -0
- package/esm2020/components/modal/odx-angular-components-modal.mjs +5 -0
- package/esm2020/components/radio-group/lib/components/radio-button/radio-button.component.mjs +19 -38
- package/esm2020/components/radio-group/lib/radio-group.component.mjs +33 -16
- package/esm2020/components/radio-group/lib/radio-group.module.mjs +7 -7
- package/esm2020/components/switch/index.mjs +2 -0
- package/esm2020/components/switch/lib/switch.component.mjs +22 -0
- package/esm2020/components/switch/odx-angular-components-switch.mjs +5 -0
- package/esm2020/components/toggle-button-group/index.mjs +4 -0
- package/esm2020/components/toggle-button-group/lib/components/index.mjs +2 -0
- package/esm2020/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +30 -0
- package/esm2020/components/toggle-button-group/lib/toggle-button-group.component.mjs +33 -0
- package/esm2020/components/toggle-button-group/lib/toggle-button-group.module.mjs +19 -0
- package/esm2020/components/toggle-button-group/odx-angular-components-toggle-button-group.mjs +5 -0
- package/esm2020/index.mjs +1 -2
- package/esm2020/internal/decorators/css-modifier.mjs +6 -5
- package/esm2020/internal/helpers/camel-to-kebab-case.mjs +12 -0
- package/esm2020/internal/helpers/index.mjs +2 -4
- package/esm2020/internal/index.mjs +1 -4
- package/esm2020/lib/controllers/controller.mjs +37 -0
- package/esm2020/lib/controllers/disabled.controller.mjs +25 -19
- package/esm2020/lib/controllers/index.mjs +3 -1
- package/esm2020/lib/controllers/readonly.controller.mjs +68 -0
- package/esm2020/lib/core.module.mjs +11 -10
- package/esm2020/lib/directives/click-outside.directive.mjs +58 -0
- package/esm2020/lib/directives/index.mjs +2 -3
- package/esm2020/lib/services/index.mjs +1 -2
- package/esm2020/lib/services/window-ref.mjs +6 -6
- package/esm2020/rxjs/index.mjs +2 -1
- package/esm2020/rxjs/lib/mark-for-check.mjs +5 -0
- package/esm2020/utils/index.mjs +2 -1
- package/esm2020/utils/lib/helpers/angular.mjs +30 -0
- package/esm2020/utils/lib/helpers/dom.mjs +22 -0
- package/esm2020/utils/lib/helpers/index.mjs +6 -1
- package/esm2020/utils/lib/helpers/ng-changes.mjs +1 -1
- package/esm2020/utils/lib/helpers/provide-module-config.mjs +21 -0
- package/esm2020/utils/lib/helpers/type-guards.mjs +29 -0
- package/esm2020/utils/lib/helpers/until-destroyed.mjs +13 -0
- package/esm2020/utils/lib/types/get-properties.mjs +2 -0
- package/esm2020/utils/lib/types/index.mjs +2 -0
- package/fesm2015/odx-angular-animations.mjs +11 -1
- package/fesm2015/odx-angular-animations.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-checkbox-control.mjs +50 -0
- package/fesm2015/odx-angular-cdk-checkbox-control.mjs.map +1 -0
- package/fesm2015/odx-angular-cdk-custom-form-control.mjs +150 -0
- package/fesm2015/odx-angular-cdk-custom-form-control.mjs.map +1 -0
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs +48 -55
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-expandable.mjs +114 -0
- package/fesm2015/odx-angular-cdk-expandable.mjs.map +1 -0
- package/fesm2015/odx-angular-cdk-radio-group-control.mjs +99 -0
- package/fesm2015/odx-angular-cdk-radio-group-control.mjs.map +1 -0
- package/fesm2015/odx-angular-components-accordion.mjs +104 -0
- package/fesm2015/odx-angular-components-accordion.mjs.map +1 -0
- package/fesm2015/odx-angular-components-action-group.mjs +14 -17
- package/fesm2015/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2015/odx-angular-components-area-header.mjs +23 -24
- package/fesm2015/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2015/odx-angular-components-avatar.mjs +9 -9
- package/fesm2015/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2015/odx-angular-components-badge.mjs +27 -29
- package/fesm2015/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2015/odx-angular-components-button-group.mjs +60 -0
- package/fesm2015/odx-angular-components-button-group.mjs.map +1 -0
- package/fesm2015/odx-angular-components-button.mjs +30 -36
- package/fesm2015/odx-angular-components-button.mjs.map +1 -1
- package/fesm2015/odx-angular-components-checkbox.mjs +15 -31
- package/fesm2015/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2015/odx-angular-components-content-box.mjs +13 -15
- package/fesm2015/odx-angular-components-content-box.mjs.map +1 -1
- package/fesm2015/odx-angular-components-form-field.mjs +381 -0
- package/fesm2015/odx-angular-components-form-field.mjs.map +1 -0
- package/fesm2015/odx-angular-components-header.mjs +24 -25
- package/fesm2015/odx-angular-components-header.mjs.map +1 -1
- package/fesm2015/odx-angular-components-icon.mjs +35 -11
- package/fesm2015/odx-angular-components-icon.mjs.map +1 -1
- package/fesm2015/odx-angular-components-link.mjs +13 -17
- package/fesm2015/odx-angular-components-link.mjs.map +1 -1
- package/fesm2015/odx-angular-components-logo.mjs +9 -10
- package/fesm2015/odx-angular-components-logo.mjs.map +1 -1
- package/fesm2015/odx-angular-components-main-menu.mjs +48 -50
- package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2015/odx-angular-components-modal.mjs +380 -0
- package/fesm2015/odx-angular-components-modal.mjs.map +1 -0
- package/fesm2015/odx-angular-components-radio-group.mjs +64 -67
- package/fesm2015/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2015/odx-angular-components-switch.mjs +28 -0
- package/fesm2015/odx-angular-components-switch.mjs.map +1 -0
- package/fesm2015/odx-angular-components-toggle-button-group.mjs +75 -0
- package/fesm2015/odx-angular-components-toggle-button-group.mjs.map +1 -0
- package/fesm2015/odx-angular-internal.mjs +39 -104
- package/fesm2015/odx-angular-internal.mjs.map +1 -1
- package/fesm2015/odx-angular-rxjs.mjs +6 -2
- package/fesm2015/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2015/odx-angular-utils.mjs +110 -1
- package/fesm2015/odx-angular-utils.mjs.map +1 -1
- package/fesm2015/odx-angular.mjs +179 -212
- package/fesm2015/odx-angular.mjs.map +1 -1
- package/fesm2020/odx-angular-animations.mjs +11 -1
- package/fesm2020/odx-angular-animations.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-checkbox-control.mjs +50 -0
- package/fesm2020/odx-angular-cdk-checkbox-control.mjs.map +1 -0
- package/fesm2020/odx-angular-cdk-custom-form-control.mjs +144 -0
- package/fesm2020/odx-angular-cdk-custom-form-control.mjs.map +1 -0
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs +41 -37
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-expandable.mjs +113 -0
- package/fesm2020/odx-angular-cdk-expandable.mjs.map +1 -0
- package/fesm2020/odx-angular-cdk-radio-group-control.mjs +99 -0
- package/fesm2020/odx-angular-cdk-radio-group-control.mjs.map +1 -0
- package/fesm2020/odx-angular-components-accordion.mjs +103 -0
- package/fesm2020/odx-angular-components-accordion.mjs.map +1 -0
- package/fesm2020/odx-angular-components-action-group.mjs +14 -17
- package/fesm2020/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2020/odx-angular-components-area-header.mjs +23 -24
- package/fesm2020/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2020/odx-angular-components-avatar.mjs +9 -9
- package/fesm2020/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2020/odx-angular-components-badge.mjs +27 -29
- package/fesm2020/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2020/odx-angular-components-button-group.mjs +60 -0
- package/fesm2020/odx-angular-components-button-group.mjs.map +1 -0
- package/fesm2020/odx-angular-components-button.mjs +30 -32
- package/fesm2020/odx-angular-components-button.mjs.map +1 -1
- package/fesm2020/odx-angular-components-checkbox.mjs +15 -31
- package/fesm2020/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2020/odx-angular-components-content-box.mjs +13 -15
- package/fesm2020/odx-angular-components-content-box.mjs.map +1 -1
- package/fesm2020/odx-angular-components-form-field.mjs +378 -0
- package/fesm2020/odx-angular-components-form-field.mjs.map +1 -0
- package/fesm2020/odx-angular-components-header.mjs +24 -25
- package/fesm2020/odx-angular-components-header.mjs.map +1 -1
- package/fesm2020/odx-angular-components-icon.mjs +35 -11
- package/fesm2020/odx-angular-components-icon.mjs.map +1 -1
- package/fesm2020/odx-angular-components-link.mjs +13 -17
- package/fesm2020/odx-angular-components-link.mjs.map +1 -1
- package/fesm2020/odx-angular-components-logo.mjs +9 -10
- package/fesm2020/odx-angular-components-logo.mjs.map +1 -1
- package/fesm2020/odx-angular-components-main-menu.mjs +48 -50
- package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2020/odx-angular-components-modal.mjs +376 -0
- package/fesm2020/odx-angular-components-modal.mjs.map +1 -0
- package/fesm2020/odx-angular-components-radio-group.mjs +64 -66
- package/fesm2020/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2020/odx-angular-components-switch.mjs +28 -0
- package/fesm2020/odx-angular-components-switch.mjs.map +1 -0
- package/fesm2020/odx-angular-components-toggle-button-group.mjs +75 -0
- package/fesm2020/odx-angular-components-toggle-button-group.mjs.map +1 -0
- package/fesm2020/odx-angular-internal.mjs +38 -102
- package/fesm2020/odx-angular-internal.mjs.map +1 -1
- package/fesm2020/odx-angular-rxjs.mjs +6 -2
- package/fesm2020/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2020/odx-angular-utils.mjs +109 -1
- package/fesm2020/odx-angular-utils.mjs.map +1 -1
- package/fesm2020/odx-angular.mjs +175 -206
- package/fesm2020/odx-angular.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/internal/helpers/camel-to-kebab-case.d.ts +2 -0
- package/internal/helpers/index.d.ts +1 -3
- package/internal/index.d.ts +0 -3
- package/{internal/abstract → lib/controllers}/controller.d.ts +3 -2
- package/lib/controllers/disabled.controller.d.ts +5 -3
- package/lib/controllers/index.d.ts +2 -0
- package/lib/controllers/readonly.controller.d.ts +18 -0
- package/lib/core.module.d.ts +3 -3
- package/lib/directives/click-outside.directive.d.ts +18 -0
- package/lib/directives/index.d.ts +1 -2
- package/lib/services/index.d.ts +0 -1
- package/package.json +93 -10
- package/rxjs/index.d.ts +1 -0
- package/rxjs/lib/mark-for-check.d.ts +3 -0
- package/utils/index.d.ts +1 -0
- package/utils/lib/helpers/angular.d.ts +5 -0
- package/utils/lib/helpers/dom.d.ts +5 -0
- package/utils/lib/helpers/index.d.ts +5 -0
- package/utils/lib/helpers/ng-changes.d.ts +1 -1
- package/utils/lib/helpers/provide-module-config.d.ts +12 -0
- package/{internal → utils/lib}/helpers/type-guards.d.ts +2 -1
- package/utils/lib/helpers/until-destroyed.d.ts +2 -0
- package/{internal → utils/lib}/types/get-properties.d.ts +1 -1
- package/{internal → utils/lib}/types/index.d.ts +0 -0
- package/cdk/dynamic-view/lib/facade/animated-component.d.ts +0 -4
- package/cdk/dynamic-view/lib/helpers/is-animated-component.d.ts +0 -3
- package/cdk/dynamic-view/lib/helpers/wait-for-animations.d.ts +0 -3
- package/esm2020/animations/config.mjs +0 -8
- package/esm2020/animations/fade.mjs +0 -12
- package/esm2020/animations/slide.mjs +0 -34
- package/esm2020/cdk/dynamic-view/lib/facade/animated-component.mjs +0 -2
- package/esm2020/cdk/dynamic-view/lib/helpers/is-animated-component.mjs +0 -5
- package/esm2020/cdk/dynamic-view/lib/helpers/wait-for-animations.mjs +0 -9
- package/esm2020/internal/abstract/controller.mjs +0 -29
- package/esm2020/internal/abstract/index.mjs +0 -2
- package/esm2020/internal/helpers/dom.mjs +0 -7
- package/esm2020/internal/helpers/type-guards.mjs +0 -27
- package/esm2020/internal/helpers/watch.mjs +0 -8
- package/esm2020/internal/providers/index.mjs +0 -2
- package/esm2020/internal/providers/watched-controller-provider.mjs +0 -9
- package/esm2020/internal/types/get-properties.mjs +0 -2
- package/esm2020/internal/types/index.mjs +0 -2
- package/esm2020/lib/controls/custom-form-control.mjs +0 -133
- package/esm2020/lib/controls/index.mjs +0 -2
- package/esm2020/lib/directives/control.directive.mjs +0 -18
- package/esm2020/lib/directives/monitor-focus.directive.mjs +0 -34
- package/esm2020/lib/services/destroy.service.mjs +0 -18
- package/internal/abstract/index.d.ts +0 -1
- package/internal/helpers/dom.d.ts +0 -2
- package/internal/helpers/watch.d.ts +0 -4
- package/internal/providers/index.d.ts +0 -1
- package/internal/providers/watched-controller-provider.d.ts +0 -5
- package/lib/controls/index.d.ts +0 -1
- package/lib/directives/monitor-focus.directive.d.ts +0 -12
- package/lib/services/destroy.service.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-radio-group.mjs","sources":["../../../../libs/angular/components/radio-group/src/lib/radio-
|
|
1
|
+
{"version":3,"file":"odx-angular-components-radio-group.mjs","sources":["../../../../libs/angular/components/radio-group/src/lib/components/radio-button/radio-button.component.ts","../../../../libs/angular/components/radio-group/src/lib/components/radio-button/radio-button.component.html","../../../../libs/angular/components/radio-group/src/lib/radio-group.component.ts","../../../../libs/angular/components/radio-group/src/lib/radio-group.component.html","../../../../libs/angular/components/radio-group/src/lib/radio-group.module.ts","../../../../libs/angular/components/radio-group/src/odx-angular-components-radio-group.ts"],"sourcesContent":["import { ObserversModule } from '@angular/cdk/observers';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, DisabledController, ReadonlyController } from '@odx/angular';\nimport { RadioControlDirective } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('radio-button')\n@Component({\n standalone: true,\n selector: 'odx-radio-button',\n templateUrl: './radio-button.component.html',\n imports: [CoreModule, ObserversModule],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class RadioButtonComponent<T = unknown> extends RadioControlDirective<T> implements AfterViewInit {\n public readonly element = injectElement();\n\n @CSSModifier()\n protected withLabel = false;\n\n @ViewChild('content')\n public contentElement!: ElementRef<HTMLDivElement>;\n\n public ngAfterViewInit(): void {\n this.onContentChange();\n }\n\n protected onContentChange() {\n this.withLabel = !!this.contentElement.nativeElement.textContent?.trim();\n }\n}\n","<label class=\"odx-radio-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.required || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.required\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <div class=\"odx-radio-button__indicator\"></div>\n <div class=\"odx-radio-button__content\" [cdkObserveContentDisabled]=\"disabledController?.disabled\" (cdkObserveContent)=\"onContentChange()\" #content>\n <ng-content></ng-content>\n </div>\n</label>\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { RadioGroupControlDirective, RADIO_GROUP_CONTROL } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('radio-group')\n@Component({\n standalone: true,\n selector: 'odx-radio-group',\n templateUrl: 'radio-group.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: RADIO_GROUP_CONTROL,\n useExisting: RadioGroupComponent,\n multi: false,\n },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class RadioGroupComponent<T = unknown> extends RadioGroupControlDirective<T> {\n public readonly element = injectElement();\n\n @CSSModifier()\n @Input()\n public horizontal = false;\n}\n","<ng-content select=\"odx-radio-button, [odxRadioControl]\"></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RadioButtonComponent } from './components';\nimport { RadioGroupComponent } from './radio-group.component';\n\nconst modules = [RadioGroupComponent, RadioButtonComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RadioGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAiBO,IAAM,oBAAoB,GAA1B,MAAM,oBAAkC,SAAQ,qBAAwB,CAAA;AAAxE,IAAA,WAAA,GAAA;;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;QAGhC,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAY7B,KAAA;IAPQ,eAAe,GAAA;QACpB,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;IAES,eAAe,GAAA;AACvB,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;KAC1E;;iHAfU,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IA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OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
4
|
+
import { DisabledController, ReadonlyController } from '@odx/angular';
|
|
5
|
+
import { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';
|
|
6
|
+
import { ControlDirective } from '@odx/angular/cdk/custom-form-control';
|
|
7
|
+
import { CSSComponent } from '@odx/angular/internal';
|
|
8
|
+
|
|
9
|
+
let SwitchComponent = class SwitchComponent extends CheckBoxControl {
|
|
10
|
+
};
|
|
11
|
+
SwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
+
SwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: SwitchComponent, isStandalone: true, selector: "odx-switch", host: { properties: { "class.is-active": "checked" } }, providers: [DisabledController.connect(), ReadonlyController.connect()], usesInheritance: true, ngImport: i0, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"required || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content></ng-content>\n </div>\n</label>\n", dependencies: [{ kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
13
|
+
SwitchComponent = __decorate([
|
|
14
|
+
CSSComponent('switch')
|
|
15
|
+
], SwitchComponent);
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
17
|
+
type: Component,
|
|
18
|
+
args: [{ standalone: true, selector: 'odx-switch', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ControlDirective], providers: [DisabledController.connect(), ReadonlyController.connect()], host: {
|
|
19
|
+
'[class.is-active]': 'checked',
|
|
20
|
+
}, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"required || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content></ng-content>\n </div>\n</label>\n" }]
|
|
21
|
+
}] });
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Generated bundle index. Do not edit.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
export { SwitchComponent };
|
|
28
|
+
//# sourceMappingURL=odx-angular-components-switch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-switch.mjs","sources":["../../../../libs/angular/components/switch/src/lib/switch.component.ts","../../../../libs/angular/components/switch/src/lib/switch.component.html","../../../../libs/angular/components/switch/src/odx-angular-components-switch.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';\nimport { ControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { CSSComponent } from '@odx/angular/internal';\n\n@CSSComponent('switch')\n@Component({\n standalone: true,\n selector: 'odx-switch',\n templateUrl: 'switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ControlDirective],\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n host: {\n '[class.is-active]': 'checked',\n },\n})\nexport class SwitchComponent extends CheckBoxControl {}\n","<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"required || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content></ng-content>\n </div>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAmBO,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,eAAe,CAAA;;4GAAvC,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,EALf,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,kBAAkB,CAAC,OAAO,EAAE,CAAC,ECdzE,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,kpBAsBA,4CDTY,gBAAgB,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;AAMf,eAAe,GAAA,UAAA,CAAA;IAb3B,YAAY,CAAC,QAAQ,CAAC;AAaV,CAAA,EAAA,eAAe,CAA2B,CAAA;2FAA1C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,YAAY,EAAA,eAAA,EAEL,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,gBAAgB,CAAC,EAChB,SAAA,EAAA,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,kBAAkB,CAAC,OAAO,EAAE,CAAC,EACjE,IAAA,EAAA;AACJ,wBAAA,mBAAmB,EAAE,SAAS;AAC/B,qBAAA,EAAA,QAAA,EAAA,kpBAAA,EAAA,CAAA;;;AEjBH;;AAEG;;;;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
4
|
+
import { DisabledController, ReadonlyController, CoreModule } from '@odx/angular';
|
|
5
|
+
import { RadioControlDirective, RadioGroupControlDirective, RADIO_GROUP_CONTROL } from '@odx/angular/cdk/radio-group-control';
|
|
6
|
+
import { CSSComponent } from '@odx/angular/internal';
|
|
7
|
+
import { injectElement } from '@odx/angular/utils';
|
|
8
|
+
|
|
9
|
+
let ToggleButtonComponent = class ToggleButtonComponent extends RadioControlDirective {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.element = injectElement();
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
ToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
+
ToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ToggleButtonComponent, isStandalone: true, selector: "odx-toggle-button", host: { attributes: { "role": "button" }, properties: { "class.is-active": "isActive", "class.is-disabled": "disabledController?.disabled", "class.is-readonly": "readonlyController?.readonly", "class.has-error": "radioGroupControl.hasError" } }, providers: [DisabledController.connect(), ReadonlyController.connect()], usesInheritance: true, ngImport: i0, template: "<label class=\"odx-toggle-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.required || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.required\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <ng-content></ng-content>\n</label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
17
|
+
ToggleButtonComponent = __decorate([
|
|
18
|
+
CSSComponent('toggle-button')
|
|
19
|
+
], ToggleButtonComponent);
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonComponent, decorators: [{
|
|
21
|
+
type: Component,
|
|
22
|
+
args: [{ standalone: true, selector: 'odx-toggle-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
23
|
+
'[class.is-active]': 'isActive',
|
|
24
|
+
'[class.is-disabled]': 'disabledController?.disabled',
|
|
25
|
+
'[class.is-readonly]': 'readonlyController?.readonly',
|
|
26
|
+
'[class.has-error]': 'radioGroupControl.hasError',
|
|
27
|
+
role: 'button',
|
|
28
|
+
}, providers: [DisabledController.connect(), ReadonlyController.connect()], template: "<label class=\"odx-toggle-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.required || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.required\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <ng-content></ng-content>\n</label>\n" }]
|
|
29
|
+
}] });
|
|
30
|
+
|
|
31
|
+
var ToggleButtonGroupComponent_1;
|
|
32
|
+
let ToggleButtonGroupComponent = ToggleButtonGroupComponent_1 = class ToggleButtonGroupComponent extends RadioGroupControlDirective {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.element = injectElement();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
ToggleButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
ToggleButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ToggleButtonGroupComponent, isStandalone: true, selector: "odx-toggle-button-group", providers: [
|
|
40
|
+
{ provide: RADIO_GROUP_CONTROL, useExisting: ToggleButtonGroupComponent_1, multi: false },
|
|
41
|
+
DisabledController.connect(),
|
|
42
|
+
ReadonlyController.connect(),
|
|
43
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
44
|
+
ToggleButtonGroupComponent = ToggleButtonGroupComponent_1 = __decorate([
|
|
45
|
+
CSSComponent('toggle-button-group')
|
|
46
|
+
], ToggleButtonGroupComponent);
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonGroupComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ standalone: true, selector: 'odx-toggle-button-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
50
|
+
{ provide: RADIO_GROUP_CONTROL, useExisting: ToggleButtonGroupComponent, multi: false },
|
|
51
|
+
DisabledController.connect(),
|
|
52
|
+
ReadonlyController.connect(),
|
|
53
|
+
], template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n" }]
|
|
54
|
+
}] });
|
|
55
|
+
|
|
56
|
+
const modules = [ToggleButtonGroupComponent, ToggleButtonComponent];
|
|
57
|
+
class ToggleButtonGroupModule {
|
|
58
|
+
}
|
|
59
|
+
ToggleButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
60
|
+
ToggleButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonGroupModule, imports: [ToggleButtonGroupComponent, ToggleButtonComponent], exports: [CoreModule, ToggleButtonGroupComponent, ToggleButtonComponent] });
|
|
61
|
+
ToggleButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonGroupModule, imports: [modules, CoreModule] });
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleButtonGroupModule, decorators: [{
|
|
63
|
+
type: NgModule,
|
|
64
|
+
args: [{
|
|
65
|
+
imports: modules,
|
|
66
|
+
exports: [CoreModule, ...modules],
|
|
67
|
+
}]
|
|
68
|
+
}] });
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Generated bundle index. Do not edit.
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
export { ToggleButtonComponent, ToggleButtonGroupComponent, ToggleButtonGroupModule };
|
|
75
|
+
//# sourceMappingURL=odx-angular-components-toggle-button-group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-toggle-button-group.mjs","sources":["../../../../libs/angular/components/toggle-button-group/src/lib/components/toggle-button/toggle-button.component.ts","../../../../libs/angular/components/toggle-button-group/src/lib/components/toggle-button/toggle-button.component.html","../../../../libs/angular/components/toggle-button-group/src/lib/toggle-button-group.component.ts","../../../../libs/angular/components/toggle-button-group/src/lib/toggle-button-group.component.html","../../../../libs/angular/components/toggle-button-group/src/lib/toggle-button-group.module.ts","../../../../libs/angular/components/toggle-button-group/src/odx-angular-components-toggle-button-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { RadioControlDirective } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('toggle-button')\n@Component({\n standalone: true,\n selector: 'odx-toggle-button',\n templateUrl: './toggle-button.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.is-active]': 'isActive',\n '[class.is-disabled]': 'disabledController?.disabled',\n '[class.is-readonly]': 'readonlyController?.readonly',\n '[class.has-error]': 'radioGroupControl.hasError',\n role: 'button',\n },\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class ToggleButtonComponent<T = unknown> extends RadioControlDirective<T> {\n public readonly element = injectElement();\n}\n","<label class=\"odx-toggle-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.required || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.required\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <ng-content></ng-content>\n</label>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { RadioGroupControlDirective, RADIO_GROUP_CONTROL } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('toggle-button-group')\n@Component({\n standalone: true,\n selector: 'odx-toggle-button-group',\n templateUrl: './toggle-button-group.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: RADIO_GROUP_CONTROL, useExisting: ToggleButtonGroupComponent, multi: false },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class ToggleButtonGroupComponent<T = unknown> extends RadioGroupControlDirective<T> {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-toggle-button\"> </ng-content>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ToggleButtonComponent } from './components';\nimport { ToggleButtonGroupComponent } from './toggle-button-group.component';\n\nconst modules = [ToggleButtonGroupComponent, ToggleButtonComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class ToggleButtonGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAsBO,IAAM,qBAAqB,GAA3B,MAAM,qBAAmC,SAAQ,qBAAwB,CAAA;AAAzE,IAAA,WAAA,GAAA;;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAC3C,KAAA;;kHAFY,qBAAqB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,EAFrB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,8BAAA,EAAA,mBAAA,EAAA,8BAAA,EAAA,iBAAA,EAAA,4BAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,kBAAkB,CAAC,OAAO,EAAE,CAAC,iDCpBzE,+sBAkBA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;ADIa,qBAAqB,GAAA,UAAA,CAAA;IAhBj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AAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,13 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
const CSS_COMPONENT_NAME = Symbol('__CSSComponentName__');
|
|
2
|
+
const CSS_COMPONENT_MODIFIERS = Symbol('__CSSComponentModifiers__');
|
|
3
|
+
/** @internal */
|
|
4
|
+
/* istanbul ignore next */
|
|
5
|
+
function CSSComponent(name, prefix = 'odx') {
|
|
6
|
+
return (target) => {
|
|
7
|
+
const cssClass = `${prefix}-${name}`;
|
|
8
|
+
Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {
|
|
9
|
+
value: cssClass,
|
|
10
|
+
});
|
|
11
|
+
(function (ngOnInit) {
|
|
12
|
+
target.prototype.ngOnInit = function () {
|
|
13
|
+
this.element.nativeElement.classList.add(cssClass);
|
|
14
|
+
ngOnInit?.call(this);
|
|
15
|
+
if (Array.isArray(this[CSS_COMPONENT_MODIFIERS])) {
|
|
16
|
+
for (const property of this[CSS_COMPONENT_MODIFIERS]) {
|
|
17
|
+
this[property] ?? (this[property] = null);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
})(target.prototype.ngOnInit);
|
|
22
|
+
};
|
|
8
23
|
}
|
|
9
|
-
|
|
10
|
-
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
/* istanbul ignore next */
|
|
27
|
+
function camelToKebabCase(value) {
|
|
28
|
+
if (value !== value.toLowerCase()) {
|
|
29
|
+
return value.replace(/[A-Z]/g, (match, index) => {
|
|
30
|
+
const char = match.toLowerCase();
|
|
31
|
+
return index === 0 ? char : `-${char}`;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return value;
|
|
11
35
|
}
|
|
12
36
|
|
|
13
37
|
/* istanbul ignore next */
|
|
@@ -45,39 +69,6 @@ function getEnumValues(e) {
|
|
|
45
69
|
return keys.filter((key) => e[key] !== undefined).map((key) => e[key]);
|
|
46
70
|
}
|
|
47
71
|
|
|
48
|
-
function isViewContainer(value) {
|
|
49
|
-
return isFunction(value?.createComponent);
|
|
50
|
-
}
|
|
51
|
-
function isTemplateRef(value) {
|
|
52
|
-
return value instanceof TemplateRef;
|
|
53
|
-
}
|
|
54
|
-
function isComponent(value) {
|
|
55
|
-
return isFunction(value);
|
|
56
|
-
}
|
|
57
|
-
function isString(value) {
|
|
58
|
-
return typeof value === 'string';
|
|
59
|
-
}
|
|
60
|
-
function isNonEmptyString(value) {
|
|
61
|
-
return isString(value) && value.length > 0;
|
|
62
|
-
}
|
|
63
|
-
function isBoolean(value) {
|
|
64
|
-
return typeof value === 'boolean';
|
|
65
|
-
}
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
67
|
-
function isFunction(value) {
|
|
68
|
-
return typeof value === 'function';
|
|
69
|
-
}
|
|
70
|
-
function isPresent(value) {
|
|
71
|
-
return value !== null && value !== undefined;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/** @internal */
|
|
75
|
-
function watch(changeDetectorRef) {
|
|
76
|
-
return tap(() => {
|
|
77
|
-
changeDetectorRef.markForCheck();
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
72
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
82
73
|
/** @internal */
|
|
83
74
|
/* istanbul ignore next */
|
|
@@ -115,55 +106,6 @@ function ɵwithMultipleDescriptors(target, key, symbol) {
|
|
|
115
106
|
};
|
|
116
107
|
}
|
|
117
108
|
|
|
118
|
-
function detectControllerChanges(changeDetector, ...controllers) {
|
|
119
|
-
return combineLatest(controllers.reduce((changes, controller) => (controller ? changes.concat(controller.change$) : changes), [])).pipe(watch(changeDetector));
|
|
120
|
-
}
|
|
121
|
-
/** @internal */
|
|
122
|
-
class Controller {
|
|
123
|
-
constructor() {
|
|
124
|
-
this.change$$ = new BehaviorSubject(undefined);
|
|
125
|
-
this.change$ = this.change$$.pipe(shareReplay({ refCount: true }));
|
|
126
|
-
}
|
|
127
|
-
ngOnChanges() {
|
|
128
|
-
this.triggerControllerChange();
|
|
129
|
-
}
|
|
130
|
-
ngOnDestroy() {
|
|
131
|
-
this.change$$.complete();
|
|
132
|
-
}
|
|
133
|
-
triggerControllerChange() {
|
|
134
|
-
this.change$$.next();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
Controller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: Controller, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
138
|
-
Controller.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: Controller, usesOnChanges: true, ngImport: i0 });
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: Controller, decorators: [{
|
|
140
|
-
type: Directive
|
|
141
|
-
}] });
|
|
142
|
-
|
|
143
|
-
const CSS_COMPONENT_NAME = Symbol('__CSSComponentName__');
|
|
144
|
-
const CSS_COMPONENT_MODIFIERS = Symbol('__CSSComponentModifiers__');
|
|
145
|
-
/** @internal */
|
|
146
|
-
/* istanbul ignore next */
|
|
147
|
-
function CSSComponent(name, prefix = 'odx') {
|
|
148
|
-
return (target) => {
|
|
149
|
-
const cssClass = `${prefix}-${name}`;
|
|
150
|
-
Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {
|
|
151
|
-
value: cssClass,
|
|
152
|
-
});
|
|
153
|
-
(function (ngOnInit) {
|
|
154
|
-
target.prototype.ngOnInit = function () {
|
|
155
|
-
this.element.nativeElement.classList.add(cssClass);
|
|
156
|
-
ngOnInit?.call(this);
|
|
157
|
-
if (Array.isArray(this[CSS_COMPONENT_MODIFIERS])) {
|
|
158
|
-
for (const property of this[CSS_COMPONENT_MODIFIERS]) {
|
|
159
|
-
this[property] ?? (this[property] = null);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
})(target.prototype.ngOnInit);
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
|
|
167
109
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
168
110
|
/** @internal */
|
|
169
111
|
/* istanbul ignore next */
|
|
@@ -171,10 +113,11 @@ function CSSModifier(options) {
|
|
|
171
113
|
return (target, propertyKey) => {
|
|
172
114
|
const propertySymbol = Symbol(`__CSSModifier{${propertyKey.toString()}}__`);
|
|
173
115
|
const descriptors = ɵwithMultipleDescriptors(target, propertyKey, propertySymbol);
|
|
116
|
+
const propertyKeyKebabCase = camelToKebabCase(propertyKey.toString());
|
|
174
117
|
function createModifierClass(value) {
|
|
175
118
|
value = value ?? options?.default ?? null;
|
|
176
|
-
if (
|
|
177
|
-
let modifier =
|
|
119
|
+
if (typeof value === 'boolean' || (typeof value === 'string' && value.length > 0)) {
|
|
120
|
+
let modifier = typeof value === 'boolean' ? propertyKeyKebabCase : value;
|
|
178
121
|
if (options?.withPrefix) {
|
|
179
122
|
modifier = [propertyKey, modifier].join('-');
|
|
180
123
|
}
|
|
@@ -197,7 +140,7 @@ function CSSModifier(options) {
|
|
|
197
140
|
}
|
|
198
141
|
this[propertySymbol][i] = currentValue;
|
|
199
142
|
const newModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);
|
|
200
|
-
if (newModifierClass !== null && (
|
|
143
|
+
if (newModifierClass !== null && (typeof currentValue === 'boolean' ? currentValue : true)) {
|
|
201
144
|
this.element.nativeElement.classList.add(newModifierClass);
|
|
202
145
|
}
|
|
203
146
|
}
|
|
@@ -212,16 +155,9 @@ function CSSModifier(options) {
|
|
|
212
155
|
};
|
|
213
156
|
}
|
|
214
157
|
|
|
215
|
-
/** @internal */
|
|
216
|
-
function watchedControllerFactory(controller, changeDetectorRef, destroy$) {
|
|
217
|
-
const changes$ = controller?.change$ ?? EMPTY;
|
|
218
|
-
changes$.pipe(watch(changeDetectorRef), takeUntil(destroy$)).subscribe();
|
|
219
|
-
return controller;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
158
|
/**
|
|
223
159
|
* Generated bundle index. Do not edit.
|
|
224
160
|
*/
|
|
225
161
|
|
|
226
|
-
export { CSSComponent, CSSModifier, CSS_COMPONENT_MODIFIERS, CSS_COMPONENT_NAME,
|
|
162
|
+
export { CSSComponent, CSSModifier, CSS_COMPONENT_MODIFIERS, CSS_COMPONENT_NAME, camelToKebabCase, getCSSVariables, getEnumValues, ɵwithMultipleDescriptors };
|
|
227
163
|
//# sourceMappingURL=odx-angular-internal.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-internal.mjs","sources":["../../../../libs/angular/internal/src/helpers/dom.ts","../../../../libs/angular/internal/src/helpers/get-css-variables.ts","../../../../libs/angular/internal/src/helpers/get-enum-values.ts","../../../../libs/angular/internal/src/helpers/type-guards.ts","../../../../libs/angular/internal/src/helpers/watch.ts","../../../../libs/angular/internal/src/helpers/with-mutiple-descriptors.ts","../../../../libs/angular/internal/src/abstract/controller.ts","../../../../libs/angular/internal/src/decorators/css-component.ts","../../../../libs/angular/internal/src/decorators/css-modifier.ts","../../../../libs/angular/internal/src/providers/watched-controller-provider.ts","../../../../libs/angular/internal/src/odx-angular-internal.ts"],"sourcesContent":["export function px(value: number): string {\n return `${Math.round(value)}px`;\n}\n\nexport function applyStyles(element: HTMLElement, styles: Partial<CSSStyleDeclaration | Record<keyof CSSStyleDeclaration, string | null>>): void {\n Object.assign(element.style, styles);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface ColorDefinition {\n name: string;\n variableName: string;\n value: string;\n}\n\n/* istanbul ignore next */\nfunction isSameDomain(styleSheet: StyleSheet): boolean {\n if (!styleSheet.href) {\n return true;\n }\n\n return styleSheet.href.indexOf(window.location.origin) === 0;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function getCSSVariables(filter: RegExp): ColorDefinition[] {\n const stylesheets = Array.from(document.styleSheets).filter(isSameDomain);\n return stylesheets.reduce<any[]>((variables, { cssRules }) => {\n for (const { style, type } of Array.from(cssRules) as any[]) {\n if (type === 1) {\n for (const prop of Array.from(style ?? []) as string[]) {\n const name = prop.trim();\n if (name.startsWith('--') && filter.test(name)) {\n variables.push({\n name: name,\n value: style.getPropertyValue(prop).trim(),\n });\n }\n }\n }\n }\n return variables;\n }, []);\n}\n","/** @internal */\nexport function getEnumValues<TEnum, TKeys extends string>(e: { [key in TKeys]: TEnum }): TEnum[] {\n const keys = Object.keys(e) as TKeys[];\n return keys.filter((key) => e[key] !== undefined).map((key) => e[key]);\n}\n","import { TemplateRef, Type, ViewContainerRef } from '@angular/core';\n\nexport function isViewContainer(value: unknown): value is ViewContainerRef {\n return isFunction((value as ViewContainerRef)?.createComponent);\n}\n\nexport function isTemplateRef<T = unknown>(value: unknown): value is TemplateRef<T> {\n return value instanceof TemplateRef;\n}\n\nexport function isComponent<T = unknown>(value: unknown): value is Type<T> {\n return isFunction(value);\n}\n\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\nexport function isNonEmptyString(value: unknown): value is string {\n return isString(value) && value.length > 0;\n}\n\nexport function isBoolean(value: unknown): value is boolean {\n return typeof value === 'boolean';\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(value: unknown): value is Function {\n return typeof value === 'function';\n}\n\nexport function isPresent<T>(value: T | null | undefined): value is NonNullable<T> {\n return value !== null && value !== undefined;\n}\n","import { ChangeDetectorRef } from '@angular/core';\nimport { MonoTypeOperatorFunction } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n/** @internal */\nexport function watch<T>(changeDetectorRef: ChangeDetectorRef): MonoTypeOperatorFunction<T> {\n return tap(() => {\n changeDetectorRef.markForCheck();\n });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** @internal */\ninterface DescriptiorManager {\n addGetter: (value: any) => void;\n addSetter: (value: any) => void;\n init: () => void;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function ɵwithMultipleDescriptors(target: any, key: PropertyKey, symbol: symbol): DescriptiorManager {\n const setters = (target[`__propSetters__${target.constructor}__${key.toString()}`] ??= []);\n const getters = (target[`__propGetters__${target.constructor}__${key.toString()}`] ??= []);\n const propertyValue = `__propValue_${String(key)}__`;\n return {\n addSetter(fn: (this: any, value: any) => void) {\n setters.push({ fn, propertySymbol: symbol });\n },\n addGetter(fn: (this: any, value: any) => void) {\n getters.push({ fn });\n },\n init() {\n Object.defineProperty(target, key, {\n set(value) {\n this[propertyValue] = setters.reduce((result: any, { fn, propertySymbol }: any) => {\n fn.call(this, result);\n return this[propertySymbol];\n }, value);\n },\n get() {\n if (Array.isArray(getters)) {\n return getters.reduce((_: any, { fn }: any) => fn.call(this), this[propertyValue]);\n } else {\n return this[propertyValue];\n }\n },\n configurable: true,\n });\n },\n };\n}\n","import { ChangeDetectorRef, Directive, OnChanges, OnDestroy } from '@angular/core';\nimport { BehaviorSubject, combineLatest, Observable, shareReplay } from 'rxjs';\nimport { watch } from '../helpers';\n\nexport function detectControllerChanges(changeDetector: ChangeDetectorRef, ...controllers: Array<Controller | undefined | null>): Observable<void[]> {\n return combineLatest(controllers.reduce<Observable<void>[]>((changes, controller) => (controller ? changes.concat(controller.change$) : changes), [])).pipe(\n watch(changeDetector)\n );\n}\n\n/** @internal */\n@Directive()\nexport abstract class Controller implements OnChanges, OnDestroy {\n private readonly change$$ = new BehaviorSubject<void>(undefined);\n\n public readonly change$ = this.change$$.pipe(shareReplay({ refCount: true }));\n\n public ngOnChanges(): void {\n this.triggerControllerChange();\n }\n\n public ngOnDestroy(): void {\n this.change$$.complete();\n }\n\n protected triggerControllerChange() {\n this.change$$.next();\n }\n}\n","import { ElementRef, Type } from '@angular/core';\n\nexport const CSS_COMPONENT_NAME = Symbol('__CSSComponentName__');\n\nexport const CSS_COMPONENT_MODIFIERS = Symbol('__CSSComponentModifiers__');\n\n/** @internal */\nexport interface CSSComponent {\n readonly element: ElementRef<unknown>;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSComponent(name: string, prefix = 'odx') {\n return (target: Type<CSSComponent>) => {\n const cssClass = `${prefix}-${name}`;\n Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {\n value: cssClass,\n });\n\n (function (this: unknown, ngOnInit?: () => void) {\n target.prototype.ngOnInit = function () {\n this.element.nativeElement.classList.add(cssClass);\n ngOnInit?.call(this);\n\n if (Array.isArray(this[CSS_COMPONENT_MODIFIERS])) {\n for (const property of this[CSS_COMPONENT_MODIFIERS]) {\n this[property] ??= null;\n }\n }\n };\n })(target.prototype.ngOnInit);\n };\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isBoolean, isNonEmptyString, ɵwithMultipleDescriptors } from '../helpers';\nimport { CSS_COMPONENT_MODIFIERS, CSS_COMPONENT_NAME } from './css-component';\n\n/** @internal */\ninterface CSSModifierOptions {\n isArray?: boolean;\n withComponentPrefix?: boolean;\n default?: string;\n withPrefix?: boolean;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSModifier(options?: CSSModifierOptions) {\n return (target: any, propertyKey: PropertyKey) => {\n const propertySymbol = Symbol(`__CSSModifier{${propertyKey.toString()}}__`);\n const descriptors = ɵwithMultipleDescriptors(target, propertyKey, propertySymbol);\n\n function createModifierClass(this: any, value: any) {\n value = value ?? options?.default ?? null;\n\n if (isBoolean(value) || isNonEmptyString(value)) {\n let modifier = isBoolean(value) ? propertyKey.toString() : value;\n if (options?.withPrefix) {\n modifier = [propertyKey, modifier].join('-');\n }\n return [options?.withComponentPrefix ?? true ? this[CSS_COMPONENT_NAME] : null, modifier].filter(Boolean).join('--');\n }\n return null;\n }\n\n if (options?.default) {\n target[CSS_COMPONENT_MODIFIERS] = (target[CSS_COMPONENT_MODIFIERS] || []).concat(propertyKey);\n }\n\n function setter(this: any, value: any) {\n const values = options?.isArray ? value : [value];\n this[propertySymbol] = this[propertySymbol] || [];\n for (let i = 0; i < values.length; ++i) {\n const currentValue = values[i];\n if (this[propertySymbol].length < 1 || currentValue !== this[propertySymbol][i]) {\n const currentModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);\n if (currentModifierClass !== null) {\n this.element.nativeElement.classList.remove(currentModifierClass);\n }\n this[propertySymbol][i] = currentValue;\n const newModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);\n if (newModifierClass !== null && (isBoolean(currentValue) ? currentValue : true)) {\n this.element.nativeElement.classList.add(newModifierClass);\n }\n }\n }\n }\n\n function getter(this: any) {\n return options?.isArray ? this[propertySymbol] : this[propertySymbol]?.[0];\n }\n\n descriptors.addSetter(setter);\n descriptors.addGetter(getter);\n descriptors.init();\n };\n}\n","import { ChangeDetectorRef } from '@angular/core';\nimport { EMPTY, Observable, takeUntil } from 'rxjs';\nimport { Controller } from '../abstract';\nimport { watch } from '../helpers';\n\n/** @internal */\nexport function watchedControllerFactory(controller: Controller | null, changeDetectorRef: ChangeDetectorRef, destroy$: Observable<void>): Controller | null {\n const changes$ = controller?.change$ ?? EMPTY;\n changes$.pipe(watch(changeDetectorRef), takeUntil(destroy$)).subscribe();\n\n return controller;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAM,SAAU,EAAE,CAAC,KAAa,EAAA;IAC9B,OAAO,CAAA,EAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;AAClC,CAAC;AAEe,SAAA,WAAW,CAAC,OAAoB,EAAE,MAAuF,EAAA;IACvI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACvC;;ACCA;AACA,SAAS,YAAY,CAAC,UAAsB,EAAA;AAC1C,IAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AACpB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,OAAO,UAAU,CAAC,IAAI,CAA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AA0B,EAAA;AACtI,IAAA,MAAM,QAAQ,GAAG,UAAU,EAAE,OAAO,IAAI,KAAK,CAAC;AAC9C,IAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AAEzE,IAAA,OAAO,UAAU,CAAC;AACpB;;ACXA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-internal.mjs","sources":["../../../../libs/angular/internal/src/decorators/css-component.ts","../../../../libs/angular/internal/src/helpers/camel-to-kebab-case.ts","../../../../libs/angular/internal/src/helpers/get-css-variables.ts","../../../../libs/angular/internal/src/helpers/get-enum-values.ts","../../../../libs/angular/internal/src/helpers/with-mutiple-descriptors.ts","../../../../libs/angular/internal/src/decorators/css-modifier.ts","../../../../libs/angular/internal/src/odx-angular-internal.ts"],"sourcesContent":["import { ElementRef, Type } from '@angular/core';\n\nexport const CSS_COMPONENT_NAME = Symbol('__CSSComponentName__');\n\nexport const CSS_COMPONENT_MODIFIERS = Symbol('__CSSComponentModifiers__');\n\n/** @internal */\nexport interface CSSComponent {\n readonly element: ElementRef<unknown>;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSComponent(name: string, prefix = 'odx') {\n return (target: Type<CSSComponent>) => {\n const cssClass = `${prefix}-${name}`;\n Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {\n value: cssClass,\n });\n\n (function (this: unknown, ngOnInit?: () => void) {\n target.prototype.ngOnInit = function () {\n this.element.nativeElement.classList.add(cssClass);\n ngOnInit?.call(this);\n\n if (Array.isArray(this[CSS_COMPONENT_MODIFIERS])) {\n for (const property of this[CSS_COMPONENT_MODIFIERS]) {\n this[property] ??= null;\n }\n }\n };\n })(target.prototype.ngOnInit);\n };\n}\n","/** @internal */\n/* istanbul ignore next */\nexport function camelToKebabCase(value: string): string {\n if (value !== value.toLowerCase()) {\n return value.replace(/[A-Z]/g, (match, index) => {\n const char = match.toLowerCase();\n\n return index === 0 ? char : `-${char}`;\n });\n }\n return value;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface ColorDefinition {\n name: string;\n variableName: string;\n value: string;\n}\n\n/* istanbul ignore next */\nfunction isSameDomain(styleSheet: StyleSheet): boolean {\n if (!styleSheet.href) {\n return true;\n }\n\n return styleSheet.href.indexOf(window.location.origin) === 0;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function getCSSVariables(filter: RegExp): ColorDefinition[] {\n const stylesheets = Array.from(document.styleSheets).filter(isSameDomain);\n return stylesheets.reduce<any[]>((variables, { cssRules }) => {\n for (const { style, type } of Array.from(cssRules) as any[]) {\n if (type === 1) {\n for (const prop of Array.from(style ?? []) as string[]) {\n const name = prop.trim();\n if (name.startsWith('--') && filter.test(name)) {\n variables.push({\n name: name,\n value: style.getPropertyValue(prop).trim(),\n });\n }\n }\n }\n }\n return variables;\n }, []);\n}\n","/** @internal */\nexport function getEnumValues<TEnum, TKeys extends string>(e: { [key in TKeys]: TEnum }): TEnum[] {\n const keys = Object.keys(e) as TKeys[];\n return keys.filter((key) => e[key] !== undefined).map((key) => e[key]);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** @internal */\ninterface DescriptiorManager {\n addGetter: (value: any) => void;\n addSetter: (value: any) => void;\n init: () => void;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function ɵwithMultipleDescriptors(target: any, key: PropertyKey, symbol: symbol): DescriptiorManager {\n const setters = (target[`__propSetters__${target.constructor}__${key.toString()}`] ??= []);\n const getters = (target[`__propGetters__${target.constructor}__${key.toString()}`] ??= []);\n const propertyValue = `__propValue_${String(key)}__`;\n return {\n addSetter(fn: (this: any, value: any) => void) {\n setters.push({ fn, propertySymbol: symbol });\n },\n addGetter(fn: (this: any, value: any) => void) {\n getters.push({ fn });\n },\n init() {\n Object.defineProperty(target, key, {\n set(value) {\n this[propertyValue] = setters.reduce((result: any, { fn, propertySymbol }: any) => {\n fn.call(this, result);\n return this[propertySymbol];\n }, value);\n },\n get() {\n if (Array.isArray(getters)) {\n return getters.reduce((_: any, { fn }: any) => fn.call(this), this[propertyValue]);\n } else {\n return this[propertyValue];\n }\n },\n configurable: true,\n });\n },\n };\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { camelToKebabCase, ɵwithMultipleDescriptors } from '../helpers';\nimport { CSS_COMPONENT_MODIFIERS, CSS_COMPONENT_NAME } from './css-component';\n\n/** @internal */\ninterface CSSModifierOptions {\n isArray?: boolean;\n withComponentPrefix?: boolean;\n default?: string;\n withPrefix?: boolean;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSModifier(options?: CSSModifierOptions) {\n return (target: any, propertyKey: PropertyKey) => {\n const propertySymbol = Symbol(`__CSSModifier{${propertyKey.toString()}}__`);\n const descriptors = ɵwithMultipleDescriptors(target, propertyKey, propertySymbol);\n const propertyKeyKebabCase = camelToKebabCase(propertyKey.toString());\n\n function createModifierClass(this: any, value: any) {\n value = value ?? options?.default ?? null;\n\n if (typeof value === 'boolean' || (typeof value === 'string' && value.length > 0)) {\n let modifier = typeof value === 'boolean' ? propertyKeyKebabCase : value;\n if (options?.withPrefix) {\n modifier = [propertyKey, modifier].join('-');\n }\n return [options?.withComponentPrefix ?? true ? this[CSS_COMPONENT_NAME] : null, modifier].filter(Boolean).join('--');\n }\n return null;\n }\n\n if (options?.default) {\n target[CSS_COMPONENT_MODIFIERS] = (target[CSS_COMPONENT_MODIFIERS] || []).concat(propertyKey);\n }\n\n function setter(this: any, value: any) {\n const values = options?.isArray ? value : [value];\n this[propertySymbol] = this[propertySymbol] || [];\n for (let i = 0; i < values.length; ++i) {\n const currentValue = values[i];\n if (this[propertySymbol].length < 1 || currentValue !== this[propertySymbol][i]) {\n const currentModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);\n if (currentModifierClass !== null) {\n this.element.nativeElement.classList.remove(currentModifierClass);\n }\n this[propertySymbol][i] = currentValue;\n const newModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);\n if (newModifierClass !== null && (typeof currentValue === 'boolean' ? currentValue : true)) {\n this.element.nativeElement.classList.add(newModifierClass);\n }\n }\n }\n }\n\n function getter(this: any) {\n return options?.isArray ? this[propertySymbol] : this[propertySymbol]?.[0];\n }\n\n descriptors.addSetter(setter);\n descriptors.addGetter(getter);\n descriptors.init();\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"MAEa,kBAAkB,GAAG,MAAM,CAAC,sBAAsB,EAAE;MAEpD,uBAAuB,GAAG,MAAM,CAAC,2BAA2B,EAAE;AAO3E;AACA;SACgB,YAAY,CAAC,IAAY,EAAE,MAAM,GAAG,KAAK,EAAA;IACvD,OAAO,CAAC,MAA0B,KAAI;AACpC,QAAA,MAAM,QAAQ,GAAG,CAAA,EAAG,MAAM,CAAI,CAAA,EAAA,IAAI,EAAE,CAAC;QACrC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,kBAAkB,EAAE;AAC1D,YAAA,KAAK,EAAE,QAAQ;AAChB,SAAA,CAAC,CAAC;AAEH,QAAA,CAAC,UAAyB,QAAqB,EAAA;AAC7C,YAAA,MAAM,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAA;gBAC1B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACnD,gBAAA,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBAErB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,EAAE;AAChD,oBAAA,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,uBAAuB,CAAC,EAAE;wBACpD,IAAI,CAAC,QAAQ,CAAb,KAAA,IAAI,CAAC,QAAQ,CAAA,GAAM,IAAI,CAAC,CAAA;AACzB,qBAAA;AACF,iBAAA;AACH,aAAC,CAAC;SACH,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AAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAC9B,QAAA,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC9B,WAAW,CAAC,IAAI,EAAE,CAAC;AACrB,KAAC,CAAC;AACJ;;AChEA;;AAEG;;;;"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { merge, fromEvent } from 'rxjs';
|
|
1
|
+
import { merge, fromEvent, tap } from 'rxjs';
|
|
2
2
|
|
|
3
3
|
function fromEvents(target, ...events) {
|
|
4
4
|
return merge(...events.map((event) => fromEvent(target, event)));
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
function markForCheck(changeDetectorRef) {
|
|
8
|
+
return tap(() => changeDetectorRef.markForCheck());
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
/**
|
|
8
12
|
* Generated bundle index. Do not edit.
|
|
9
13
|
*/
|
|
10
14
|
|
|
11
|
-
export { fromEvents };
|
|
15
|
+
export { fromEvents, markForCheck };
|
|
12
16
|
//# sourceMappingURL=odx-angular-rxjs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-rxjs.mjs","sources":["../../../../libs/angular/rxjs/src/lib/from-events.ts","../../../../libs/angular/rxjs/src/odx-angular-rxjs.ts"],"sourcesContent":["import { fromEvent, merge, Observable } from 'rxjs';\nimport { HasEventTargetAddRemove } from 'rxjs/internal/observable/fromEvent';\n\nexport function fromEvents<T>(target: HasEventTargetAddRemove<T> | HasEventTargetAddRemove<T>[], ...events: string[]): Observable<T> {\n return merge(...events.map((event) => fromEvent(target, event)));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;SAGgB,UAAU,CAAI,MAAiE,EAAE,GAAG,MAAgB,EAAA;IAClH,OAAO,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACnE;;ACLA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-rxjs.mjs","sources":["../../../../libs/angular/rxjs/src/lib/from-events.ts","../../../../libs/angular/rxjs/src/lib/mark-for-check.ts","../../../../libs/angular/rxjs/src/odx-angular-rxjs.ts"],"sourcesContent":["import { fromEvent, merge, Observable } from 'rxjs';\nimport { HasEventTargetAddRemove } from 'rxjs/internal/observable/fromEvent';\n\nexport function fromEvents<T>(target: HasEventTargetAddRemove<T> | HasEventTargetAddRemove<T>[], ...events: string[]): Observable<T> {\n return merge(...events.map((event) => fromEvent(target, event)));\n}\n","import { ChangeDetectorRef } from '@angular/core';\nimport { MonoTypeOperatorFunction, tap } from 'rxjs';\n\nexport function markForCheck<T>(changeDetectorRef: ChangeDetectorRef): MonoTypeOperatorFunction<T> {\n return tap(() => changeDetectorRef.markForCheck());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;SAGgB,UAAU,CAAI,MAAiE,EAAE,GAAG,MAAgB,EAAA;IAClH,OAAO,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACnE;;ACFM,SAAU,YAAY,CAAI,iBAAoC,EAAA;IAClE,OAAO,GAAG,CAAC,MAAM,iBAAiB,CAAC,YAAY,EAAE,CAAC,CAAC;AACrD;;ACLA;;AAEG;;;;"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ɵwithMultipleDescriptors } from '@odx/angular/internal';
|
|
2
|
+
import { TemplateRef, inject, ChangeDetectorRef, ElementRef, InjectionToken } from '@angular/core';
|
|
3
|
+
import { Subject, takeUntil, tap } from 'rxjs';
|
|
4
|
+
import { deepmerge } from 'deepmerge-ts';
|
|
2
5
|
|
|
3
6
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
7
|
function Transform(transformer) {
|
|
@@ -13,6 +16,92 @@ function Transform(transformer) {
|
|
|
13
16
|
};
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
function isViewContainer(value) {
|
|
20
|
+
return isFunction(value?.createComponent);
|
|
21
|
+
}
|
|
22
|
+
function isTemplateRef(value) {
|
|
23
|
+
return value instanceof TemplateRef;
|
|
24
|
+
}
|
|
25
|
+
function isComponent(value) {
|
|
26
|
+
return isFunction(value);
|
|
27
|
+
}
|
|
28
|
+
function isString(value) {
|
|
29
|
+
return typeof value === 'string';
|
|
30
|
+
}
|
|
31
|
+
function isNonEmptyString(value) {
|
|
32
|
+
return isString(value) && value.length > 0;
|
|
33
|
+
}
|
|
34
|
+
function isBoolean(value) {
|
|
35
|
+
return value === true || value === false;
|
|
36
|
+
}
|
|
37
|
+
function isFunction(value) {
|
|
38
|
+
return typeof value === 'function';
|
|
39
|
+
}
|
|
40
|
+
function isPresent(value) {
|
|
41
|
+
return value !== null && value !== undefined;
|
|
42
|
+
}
|
|
43
|
+
function isNumber(value) {
|
|
44
|
+
return typeof value === 'number';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function applyStyles(element, styles) {
|
|
48
|
+
Object.assign(element.style, styles);
|
|
49
|
+
}
|
|
50
|
+
function booleanToAttributeString(state) {
|
|
51
|
+
return booleanToOptionalAttributeString(state) ?? 'false';
|
|
52
|
+
}
|
|
53
|
+
function booleanToOptionalAttributeString(state) {
|
|
54
|
+
return state ? 'true' : null;
|
|
55
|
+
}
|
|
56
|
+
function px(value) {
|
|
57
|
+
return isNumber(value) ? `${Math.round(value)}px` : '0px';
|
|
58
|
+
}
|
|
59
|
+
function setAttribute(element, attribute, value) {
|
|
60
|
+
if (isString(value)) {
|
|
61
|
+
element.setAttribute(attribute, value);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
element.toggleAttribute(attribute, !!value);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function untilDestroyed() {
|
|
69
|
+
const destroyed$$ = new Subject();
|
|
70
|
+
const viewRef = inject(ChangeDetectorRef);
|
|
71
|
+
function onDestroy() {
|
|
72
|
+
destroyed$$.next();
|
|
73
|
+
destroyed$$.complete();
|
|
74
|
+
}
|
|
75
|
+
Promise.resolve().then(() => (viewRef.destroyed ? onDestroy() : viewRef.onDestroy(onDestroy)));
|
|
76
|
+
return () => takeUntil(destroyed$$.asObservable());
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function reactiveBinding(updateFn) {
|
|
80
|
+
const takeUntilDestroyed = untilDestroyed();
|
|
81
|
+
return (source$) => source$.pipe(tap((state) => updateFn(state)), takeUntilDestroyed());
|
|
82
|
+
}
|
|
83
|
+
function reactiveClassBinding(source$, cssClass) {
|
|
84
|
+
const { nativeElement } = injectElement();
|
|
85
|
+
if (source$) {
|
|
86
|
+
source$.pipe(reactiveBinding((state) => nativeElement.classList.toggle(cssClass, !!state))).subscribe();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function reactiveAttributeBinding(source$, ...attributes) {
|
|
90
|
+
const { nativeElement } = injectElement();
|
|
91
|
+
if (source$) {
|
|
92
|
+
source$
|
|
93
|
+
.pipe(reactiveBinding((value) => {
|
|
94
|
+
for (const attribute of attributes) {
|
|
95
|
+
setAttribute(nativeElement, attribute, value);
|
|
96
|
+
}
|
|
97
|
+
}))
|
|
98
|
+
.subscribe();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function injectElement() {
|
|
102
|
+
return inject(ElementRef);
|
|
103
|
+
}
|
|
104
|
+
|
|
16
105
|
function pluckFromArray(arr, key) {
|
|
17
106
|
return arr.map((value) => value[key]);
|
|
18
107
|
}
|
|
@@ -31,9 +120,28 @@ function hasChanged(changes, keyOrKeys, ignoreFirstChange = true) {
|
|
|
31
120
|
}
|
|
32
121
|
}
|
|
33
122
|
|
|
123
|
+
function provideModuleConfig(token, config) {
|
|
124
|
+
if ('useFactory' in config) {
|
|
125
|
+
return { provide: token, useFactory: config.useFactory, deps: config.deps };
|
|
126
|
+
}
|
|
127
|
+
return { provide: token, useValue: config };
|
|
128
|
+
}
|
|
129
|
+
function createModuleConfigTokens(name, prefix, defaultValue) {
|
|
130
|
+
const moduleConfig = `${name}ModuleConfig`;
|
|
131
|
+
const defaultModuleConfig = `${name}DefaultModuleConfig`;
|
|
132
|
+
const injectModuleConfig = `inject${name}ModuleConfig`;
|
|
133
|
+
const tokenName = `${prefix}::${moduleConfig}`;
|
|
134
|
+
const token = new InjectionToken(tokenName, { providedIn: 'root', factory: () => defaultValue });
|
|
135
|
+
return {
|
|
136
|
+
[moduleConfig]: token,
|
|
137
|
+
[defaultModuleConfig]: defaultValue,
|
|
138
|
+
[injectModuleConfig]: () => deepmerge(defaultValue, inject(token)),
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
34
142
|
/**
|
|
35
143
|
* Generated bundle index. Do not edit.
|
|
36
144
|
*/
|
|
37
145
|
|
|
38
|
-
export { Transform, hasChanged, pluckFromArray };
|
|
146
|
+
export { Transform, applyStyles, booleanToAttributeString, booleanToOptionalAttributeString, createModuleConfigTokens, hasChanged, injectElement, isBoolean, isComponent, isFunction, isNonEmptyString, isNumber, isPresent, isString, isTemplateRef, isViewContainer, pluckFromArray, provideModuleConfig, px, reactiveAttributeBinding, reactiveClassBinding, setAttribute, untilDestroyed };
|
|
39
147
|
//# sourceMappingURL=odx-angular-utils.mjs.map
|