ngwr 2.2.0 → 4.0.0
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/README.md +8 -7
- package/alert/alert-type.d.ts +7 -0
- package/alert/alert.component.d.ts +21 -0
- package/alert/alert.module.d.ts +7 -0
- package/alert/index.d.ts +5 -0
- package/alert/public-api.d.ts +9 -0
- package/alert/styles/_index.scss +58 -0
- package/alert/styles/theming.scss +26 -0
- package/alert/styles/vars.scss +11 -0
- package/avatar/avatar.component.d.ts +27 -0
- package/avatar/avatar.module.d.ts +7 -0
- package/avatar/index.d.ts +5 -0
- package/avatar/public-api.d.ts +8 -0
- package/avatar/styles/_index.scss +39 -0
- package/button/button-group.component.d.ts +12 -0
- package/button/button.component.d.ts +26 -58
- package/button/button.module.d.ts +2 -1
- package/button/index.d.ts +5 -2
- package/button/public-api.d.ts +9 -0
- package/button/styles/_index.scss +187 -0
- package/button/styles/vars.scss +13 -0
- package/{core/abstract/base.d.ts → cdk/base.directive.d.ts} +7 -1
- package/cdk/index.d.ts +5 -0
- package/cdk/public-api.d.ts +7 -0
- package/cdk/rxjs/index.d.ts +5 -0
- package/cdk/rxjs/is-array.d.ts +8 -0
- package/cdk/rxjs/is-defined.d.ts +8 -0
- package/cdk/rxjs/is-not-empty-array.d.ts +8 -0
- package/cdk/rxjs/is-observable.d.ts +9 -0
- package/cdk/rxjs/public-api.d.ts +10 -0
- package/cdk/types/index.d.ts +5 -0
- package/cdk/types/maybe.d.ts +7 -0
- package/cdk/types/public-api.d.ts +9 -0
- package/cdk/types/safe-any.d.ts +7 -0
- package/{core/color/color.d.ts → cdk/types/theme-color.d.ts} +6 -0
- package/cdk/utils/generate-random-id.d.ts +12 -0
- package/cdk/utils/index.d.ts +5 -0
- package/cdk/utils/public-api.d.ts +7 -0
- package/checkbox/checkbox.component.d.ts +24 -45
- package/checkbox/checkbox.module.d.ts +1 -1
- package/checkbox/index.d.ts +5 -2
- package/checkbox/public-api.d.ts +8 -0
- package/checkbox/styles/_index.scss +86 -0
- package/checkbox/styles/vars.scss +16 -0
- package/dialog/dialog-animations.d.ts +7 -1
- package/dialog/{dialog-base.d.ts → dialog-base.directive.d.ts} +13 -7
- package/dialog/dialog-close.directive.d.ts +9 -0
- package/dialog/dialog-content.directive.d.ts +6 -0
- package/dialog/dialog-data.token.d.ts +8 -0
- package/dialog/dialog-footer.directive.d.ts +8 -0
- package/dialog/dialog-options.d.ts +19 -0
- package/dialog/dialog-ref.d.ts +19 -13
- package/dialog/dialog-title.directive.d.ts +6 -0
- package/dialog/dialog.component.d.ts +28 -0
- package/dialog/dialog.module.d.ts +11 -0
- package/dialog/dialog.service.d.ts +28 -0
- package/dialog/index.d.ts +5 -9
- package/dialog/public-api.d.ts +18 -0
- package/dialog/{dialog.scss → styles/_index.scss} +2 -0
- package/dialog/styles/vars.scss +7 -0
- package/divider/divider.component.d.ts +8 -35
- package/divider/divider.module.d.ts +1 -1
- package/divider/index.d.ts +5 -2
- package/divider/public-api.d.ts +8 -0
- package/divider/{divider.scss → styles/_index.scss} +1 -1
- package/esm2022/alert/alert-type.mjs +8 -0
- package/esm2022/alert/alert.component.mjs +54 -0
- package/esm2022/alert/alert.module.mjs +22 -0
- package/esm2022/alert/ngwr-alert.mjs +5 -0
- package/esm2022/alert/public-api.mjs +10 -0
- package/esm2022/avatar/avatar.component.mjs +77 -0
- package/esm2022/avatar/avatar.module.mjs +22 -0
- package/esm2022/avatar/ngwr-avatar.mjs +5 -0
- package/esm2022/avatar/public-api.mjs +9 -0
- package/esm2022/button/button-group.component.mjs +36 -0
- package/esm2022/button/button.component.mjs +55 -163
- package/esm2022/button/button.module.mjs +15 -8
- package/esm2022/button/ngwr-button.mjs +2 -2
- package/esm2022/button/public-api.mjs +10 -0
- package/esm2022/cdk/base.directive.mjs +27 -0
- package/esm2022/cdk/ngwr-cdk.mjs +5 -0
- package/esm2022/cdk/public-api.mjs +8 -0
- package/esm2022/cdk/rxjs/is-array.mjs +10 -0
- package/esm2022/cdk/rxjs/is-defined.mjs +10 -0
- package/esm2022/cdk/rxjs/is-not-empty-array.mjs +10 -0
- package/esm2022/cdk/rxjs/is-observable.mjs +10 -0
- package/esm2022/cdk/rxjs/ngwr-cdk-rxjs.mjs +5 -0
- package/esm2022/cdk/rxjs/public-api.mjs +11 -0
- package/esm2022/cdk/types/maybe.mjs +8 -0
- package/esm2022/cdk/types/ngwr-cdk-types.mjs +5 -0
- package/esm2022/cdk/types/public-api.mjs +10 -0
- package/esm2022/cdk/types/safe-any.mjs +8 -0
- package/esm2022/cdk/types/theme-color.mjs +17 -0
- package/esm2022/cdk/utils/generate-random-id.mjs +17 -0
- package/esm2022/cdk/utils/ngwr-cdk-utils.mjs +5 -0
- package/esm2022/cdk/utils/public-api.mjs +8 -0
- package/esm2022/checkbox/checkbox.component.mjs +54 -120
- package/esm2022/checkbox/checkbox.module.mjs +14 -8
- package/esm2022/checkbox/ngwr-checkbox.mjs +2 -2
- package/esm2022/checkbox/public-api.mjs +9 -0
- package/esm2022/dialog/dialog-animations.mjs +8 -2
- package/esm2022/dialog/dialog-base.directive.mjs +95 -0
- package/esm2022/dialog/dialog-close.directive.mjs +33 -0
- package/esm2022/dialog/dialog-content.directive.mjs +25 -0
- package/esm2022/dialog/dialog-data.token.mjs +9 -0
- package/esm2022/dialog/dialog-footer.directive.mjs +36 -0
- package/esm2022/dialog/dialog-options.mjs +9 -0
- package/esm2022/dialog/dialog-ref.mjs +22 -16
- package/esm2022/dialog/dialog-title.directive.mjs +25 -0
- package/esm2022/dialog/dialog.component.mjs +57 -0
- package/esm2022/dialog/dialog.module.mjs +38 -0
- package/esm2022/dialog/dialog.service.mjs +107 -0
- package/esm2022/dialog/ngwr-dialog.mjs +2 -2
- package/esm2022/dialog/public-api.mjs +19 -0
- package/esm2022/divider/divider.component.mjs +16 -57
- package/esm2022/divider/divider.module.mjs +8 -8
- package/esm2022/divider/ngwr-divider.mjs +2 -2
- package/esm2022/divider/public-api.mjs +9 -0
- package/esm2022/form/form-error.component.mjs +33 -0
- package/esm2022/form/form-item.component.mjs +43 -0
- package/esm2022/form/form.module.mjs +23 -0
- package/esm2022/form/ngwr-form.mjs +2 -2
- package/esm2022/form/public-api.mjs +10 -0
- package/esm2022/icon/icon.component.mjs +82 -0
- package/esm2022/icon/icon.module.mjs +22 -0
- package/esm2022/icon/icon.service.mjs +40 -0
- package/esm2022/icon/icons.mjs +289 -279
- package/esm2022/icon/ngwr-icon.mjs +2 -2
- package/esm2022/icon/provide-wr-icons.mjs +17 -0
- package/esm2022/icon/public-api.mjs +12 -0
- package/esm2022/input/input-types.mjs +1 -1
- package/esm2022/input/input.component.mjs +119 -0
- package/esm2022/input/input.module.mjs +22 -0
- package/esm2022/input/ngwr-input.mjs +2 -2
- package/esm2022/input/public-api.mjs +10 -0
- package/esm2022/ngwr.mjs +2 -2
- package/esm2022/pipes/new-array.pipe.mjs +23 -0
- package/esm2022/pipes/ngwr-pipes.mjs +5 -0
- package/esm2022/pipes/pipes.module.mjs +22 -0
- package/esm2022/pipes/public-api.mjs +9 -0
- package/esm2022/progress/ngwr-progress.mjs +5 -0
- package/esm2022/progress/progress.component.mjs +42 -0
- package/esm2022/progress/progress.module.mjs +22 -0
- package/esm2022/progress/public-api.mjs +9 -0
- package/esm2022/public-api.mjs +3 -0
- package/esm2022/qr/generator.mjs +84 -0
- package/esm2022/qr/ngwr-qr.mjs +5 -0
- package/esm2022/qr/public-api.mjs +9 -0
- package/esm2022/qr/qr.component.mjs +90 -0
- package/esm2022/qr/qr.module.mjs +22 -0
- package/esm2022/qr/qrcodegen.mjs +872 -0
- package/esm2022/skeleton/index.mjs +3 -3
- package/esm2022/skeleton/skeleton.component.mjs +43 -0
- package/esm2022/skeleton/skeleton.module.mjs +16 -0
- package/esm2022/spinner/index.mjs +3 -3
- package/esm2022/spinner/spinner.component.mjs +33 -0
- package/esm2022/spinner/spinner.module.mjs +22 -0
- package/esm2022/tag/ngwr-tag.mjs +2 -2
- package/esm2022/tag/public-api.mjs +9 -0
- package/esm2022/tag/tag.component.mjs +74 -0
- package/esm2022/tag/tag.module.mjs +16 -0
- package/fesm2022/ngwr-alert.mjs +94 -0
- package/fesm2022/ngwr-alert.mjs.map +1 -0
- package/fesm2022/ngwr-avatar.mjs +110 -0
- package/fesm2022/ngwr-avatar.mjs.map +1 -0
- package/fesm2022/ngwr-button.mjs +108 -169
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-cdk-rxjs.mjs +53 -0
- package/fesm2022/ngwr-cdk-rxjs.mjs.map +1 -0
- package/fesm2022/ngwr-cdk-types.mjs +44 -0
- package/fesm2022/ngwr-cdk-types.mjs.map +1 -0
- package/fesm2022/ngwr-cdk-utils.mjs +30 -0
- package/fesm2022/ngwr-cdk-utils.mjs.map +1 -0
- package/fesm2022/ngwr-cdk.mjs +41 -0
- package/fesm2022/ngwr-cdk.mjs.map +1 -0
- package/fesm2022/ngwr-checkbox.mjs +73 -126
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +225 -165
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +29 -63
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +72 -54
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +445 -368
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +97 -208
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +56 -0
- package/fesm2022/ngwr-pipes.mjs.map +1 -0
- package/fesm2022/ngwr-progress.mjs +75 -0
- package/fesm2022/ngwr-progress.mjs.map +1 -0
- package/fesm2022/{ngwr-qrcode.mjs → ngwr-qr.mjs} +72 -113
- package/fesm2022/ngwr-qr.mjs.map +1 -0
- package/fesm2022/ngwr-skeleton.mjs +19 -22
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +35 -19
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-tag.mjs +46 -49
- package/fesm2022/ngwr-tag.mjs.map +1 -1
- package/fesm2022/ngwr.mjs +1 -1
- package/fesm2022/ngwr.mjs.map +1 -1
- package/form/form-error.component.d.ts +11 -0
- package/form/form-item.component.d.ts +14 -0
- package/form/form.module.d.ts +8 -0
- package/form/index.d.ts +5 -3
- package/form/public-api.d.ts +9 -0
- package/icon/icon.component.d.ts +19 -0
- package/icon/icon.module.d.ts +7 -0
- package/icon/icon.service.d.ts +23 -0
- package/icon/icons.d.ts +115 -101
- package/icon/index.d.ts +5 -4
- package/icon/provide-wr-icons.d.ts +9 -0
- package/icon/public-api.d.ts +11 -0
- package/icon/{icon.scss → styles/_index.scss} +4 -2
- package/icon/styles/vars.scss +3 -0
- package/index.d.ts +5 -2
- package/input/index.d.ts +5 -2
- package/input/input-types.d.ts +0 -2
- package/input/input.component.d.ts +43 -0
- package/input/input.module.d.ts +7 -0
- package/input/public-api.d.ts +9 -0
- package/input/styles/_index.scss +107 -0
- package/input/styles/vars.scss +16 -0
- package/package.json +110 -57
- package/pipes/index.d.ts +5 -0
- package/pipes/new-array.pipe.d.ts +13 -0
- package/pipes/pipes.module.d.ts +7 -0
- package/pipes/public-api.d.ts +8 -0
- package/progress/index.d.ts +5 -0
- package/progress/progress.component.d.ts +10 -0
- package/progress/progress.module.d.ts +7 -0
- package/progress/public-api.d.ts +8 -0
- package/progress/styles/_index.scss +24 -0
- package/progress/styles/theming.scss +8 -0
- package/progress/styles/vars.scss +6 -0
- package/public-api.d.ts +2 -0
- package/qr/index.d.ts +5 -0
- package/qr/public-api.d.ts +8 -0
- package/qr/qr.component.d.ts +31 -0
- package/qr/qr.module.d.ts +7 -0
- package/skeleton/index.d.ts +2 -2
- package/skeleton/skeleton.component.d.ts +10 -0
- package/skeleton/{skeleton-module.d.ts → skeleton.module.d.ts} +2 -3
- package/skeleton/{skeleton.scss → styles/_index.scss} +1 -1
- package/spinner/index.d.ts +2 -2
- package/spinner/spinner.component.d.ts +11 -0
- package/spinner/{spinner-module.d.ts → spinner.module.d.ts} +2 -2
- package/spinner/{spinner.scss → styles/_index.scss} +2 -1
- package/styles/animations.scss +4 -4
- package/styles/cdk.scss +4 -0
- package/styles/colors.scss +72 -0
- package/styles/grid.scss +1 -2
- package/styles/reset.scss +2 -2
- package/styles/variables.scss +78 -0
- package/styles.scss +23 -0
- package/tag/index.d.ts +5 -2
- package/tag/public-api.d.ts +8 -0
- package/tag/styles/_index.scss +32 -0
- package/tag/styles/theming.scss +21 -0
- package/tag/styles/vars.scss +12 -0
- package/tag/tag.component.d.ts +21 -0
- package/tag/tag.module.d.ts +7 -0
- package/_grid.scss +0 -2
- package/_index.scss +0 -31
- package/backdrop/backdrop.scss +0 -3
- package/button/button.scss +0 -160
- package/checkbox/checkbox.scss +0 -103
- package/core/abstract/index.d.ts +0 -1
- package/core/color/index.d.ts +0 -2
- package/core/color/is-theme-color.d.ts +0 -2
- package/core/decorators/index.d.ts +0 -1
- package/core/decorators/input-boolean.d.ts +0 -1
- package/core/overlay/connected-overlay-directive.d.ts +0 -16
- package/core/overlay/get-placement-name.d.ts +0 -2
- package/core/overlay/index.d.ts +0 -5
- package/core/overlay/overlay-module.d.ts +0 -7
- package/core/overlay/overlay.scss +0 -9
- package/core/overlay/position-map.d.ts +0 -17
- package/core/overlay/position-type.d.ts +0 -2
- package/core/types/index.d.ts +0 -3
- package/core/types/on-change-type.d.ts +0 -2
- package/core/types/on-touched-type.d.ts +0 -2
- package/core/types/safe-any.d.ts +0 -1
- package/dialog/dialog-config.d.ts +0 -11
- package/dialog/dialog-container.d.ts +0 -22
- package/dialog/dialog-content-directives.d.ts +0 -31
- package/dialog/dialog-module.d.ts +0 -12
- package/dialog/dialog-service.d.ts +0 -27
- package/dialog/dialog-tokens.d.ts +0 -2
- package/esm2022/button/index.mjs +0 -3
- package/esm2022/checkbox/index.mjs +0 -3
- package/esm2022/core/abstract/base.mjs +0 -18
- package/esm2022/core/abstract/index.mjs +0 -2
- package/esm2022/core/abstract/ngwr-core-abstract.mjs +0 -5
- package/esm2022/core/color/color.mjs +0 -11
- package/esm2022/core/color/index.mjs +0 -3
- package/esm2022/core/color/is-theme-color.mjs +0 -9
- package/esm2022/core/color/ngwr-core-color.mjs +0 -5
- package/esm2022/core/decorators/index.mjs +0 -2
- package/esm2022/core/decorators/input-boolean.mjs +0 -15
- package/esm2022/core/decorators/ngwr-core-decorators.mjs +0 -5
- package/esm2022/core/overlay/connected-overlay-directive.mjs +0 -98
- package/esm2022/core/overlay/get-placement-name.mjs +0 -13
- package/esm2022/core/overlay/index.mjs +0 -5
- package/esm2022/core/overlay/ngwr-core-overlay.mjs +0 -5
- package/esm2022/core/overlay/overlay-module.mjs +0 -16
- package/esm2022/core/overlay/position-map.mjs +0 -18
- package/esm2022/core/overlay/position-type.mjs +0 -2
- package/esm2022/core/types/index.mjs +0 -4
- package/esm2022/core/types/ngwr-core-types.mjs +0 -5
- package/esm2022/core/types/on-change-type.mjs +0 -2
- package/esm2022/core/types/on-touched-type.mjs +0 -2
- package/esm2022/core/types/safe-any.mjs +0 -2
- package/esm2022/dialog/dialog-base.mjs +0 -92
- package/esm2022/dialog/dialog-config.mjs +0 -3
- package/esm2022/dialog/dialog-container.mjs +0 -58
- package/esm2022/dialog/dialog-content-directives.mjs +0 -98
- package/esm2022/dialog/dialog-module.mjs +0 -24
- package/esm2022/dialog/dialog-service.mjs +0 -109
- package/esm2022/dialog/dialog-tokens.mjs +0 -3
- package/esm2022/dialog/index.mjs +0 -10
- package/esm2022/divider/index.mjs +0 -3
- package/esm2022/form/form-error.mjs +0 -23
- package/esm2022/form/form-item.mjs +0 -46
- package/esm2022/form/form-module.mjs +0 -19
- package/esm2022/form/index.mjs +0 -4
- package/esm2022/icon/icon-module.mjs +0 -21
- package/esm2022/icon/icon-service.mjs +0 -21
- package/esm2022/icon/icon.mjs +0 -60
- package/esm2022/icon/index.mjs +0 -5
- package/esm2022/index.mjs +0 -3
- package/esm2022/input/index.mjs +0 -3
- package/esm2022/input/input-module.mjs +0 -20
- package/esm2022/input/input.mjs +0 -240
- package/esm2022/qrcode/generator.mjs +0 -84
- package/esm2022/qrcode/index.mjs +0 -3
- package/esm2022/qrcode/ngwr-qrcode.mjs +0 -5
- package/esm2022/qrcode/qrcode-module.mjs +0 -19
- package/esm2022/qrcode/qrcode.mjs +0 -142
- package/esm2022/qrcode/qrcodegen.mjs +0 -872
- package/esm2022/skeleton/skeleton-module.mjs +0 -18
- package/esm2022/skeleton/skeleton.mjs +0 -44
- package/esm2022/spinner/spinner-module.mjs +0 -16
- package/esm2022/spinner/spinner.mjs +0 -23
- package/esm2022/tag/index.mjs +0 -3
- package/esm2022/tag/tag-module.mjs +0 -20
- package/esm2022/tag/tag.mjs +0 -80
- package/esm2022/tooltip/index.mjs +0 -5
- package/esm2022/tooltip/ngwr-tooltip.mjs +0 -5
- package/esm2022/tooltip/tooltip-component.mjs +0 -93
- package/esm2022/tooltip/tooltip-default-positions.mjs +0 -8
- package/esm2022/tooltip/tooltip-directive.mjs +0 -85
- package/esm2022/tooltip/tooltip-module.mjs +0 -21
- package/esm2022/tooltip/tooltip-trigger.mjs +0 -2
- package/fesm2022/ngwr-core-abstract.mjs +0 -25
- package/fesm2022/ngwr-core-abstract.mjs.map +0 -1
- package/fesm2022/ngwr-core-color.mjs +0 -25
- package/fesm2022/ngwr-core-color.mjs.map +0 -1
- package/fesm2022/ngwr-core-decorators.mjs +0 -22
- package/fesm2022/ngwr-core-decorators.mjs.map +0 -1
- package/fesm2022/ngwr-core-overlay.mjs +0 -146
- package/fesm2022/ngwr-core-overlay.mjs.map +0 -1
- package/fesm2022/ngwr-core-types.mjs +0 -4
- package/fesm2022/ngwr-core-types.mjs.map +0 -1
- package/fesm2022/ngwr-qrcode.mjs.map +0 -1
- package/fesm2022/ngwr-tooltip.mjs +0 -204
- package/fesm2022/ngwr-tooltip.mjs.map +0 -1
- package/form/form-error.d.ts +0 -6
- package/form/form-item.d.ts +0 -15
- package/form/form-module.d.ts +0 -9
- package/icon/icon-module.d.ts +0 -9
- package/icon/icon-service.d.ts +0 -8
- package/icon/icon.d.ts +0 -20
- package/input/input-module.d.ts +0 -10
- package/input/input.d.ts +0 -65
- package/input/input.scss +0 -163
- package/qrcode/index.d.ts +0 -2
- package/qrcode/qrcode-module.d.ts +0 -9
- package/qrcode/qrcode.d.ts +0 -46
- package/skeleton/skeleton.d.ts +0 -11
- package/spinner/spinner.d.ts +0 -6
- package/styles/root.scss +0 -172
- package/tag/tag-module.d.ts +0 -10
- package/tag/tag.d.ts +0 -18
- package/tag/tag.scss +0 -106
- package/tooltip/index.d.ts +0 -5
- package/tooltip/tooltip-component.d.ts +0 -31
- package/tooltip/tooltip-default-positions.d.ts +0 -1
- package/tooltip/tooltip-directive.d.ts +0 -22
- package/tooltip/tooltip-module.d.ts +0 -11
- package/tooltip/tooltip-trigger.d.ts +0 -1
- package/tooltip/tooltip.scss +0 -67
- /package/form/{form.scss → styles/_index.scss} +0 -0
- /package/{qrcode → qr}/generator.d.ts +0 -0
- /package/{qrcode → qr}/qrcodegen.d.ts +0 -0
- /package/{qrcode/qrcode.scss → qr/styles/_index.scss} +0 -0
package/fesm2022/ngwr-button.mjs
CHANGED
|
@@ -1,103 +1,36 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { InputBoolean } from 'ngwr/core/decorators';
|
|
8
|
-
import * as i1 from 'ngwr/icon';
|
|
9
|
-
import { WrIconModule } from 'ngwr/icon';
|
|
10
|
-
import * as i2 from 'ngwr/spinner';
|
|
2
|
+
import { booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
|
|
3
|
+
import { WrIconComponent } from 'ngwr/icon';
|
|
4
|
+
import * as i1 from 'ngwr/spinner';
|
|
11
5
|
import { WrSpinnerModule } from 'ngwr/spinner';
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
this.cdr.markForCheck();
|
|
37
|
-
}
|
|
38
|
-
/** Set rounded state of `wr-btn`; */
|
|
39
|
-
get rounded() {
|
|
40
|
-
return this._rounded;
|
|
41
|
-
}
|
|
42
|
-
set rounded(value) {
|
|
43
|
-
this._rounded = coerceBooleanProperty(value);
|
|
44
|
-
this.cdr.markForCheck();
|
|
45
|
-
}
|
|
46
|
-
/** Set fullwidth state of `wr-btn`; */
|
|
47
|
-
get fullWidth() {
|
|
48
|
-
return this._fullWidth;
|
|
49
|
-
}
|
|
50
|
-
set fullWidth(value) {
|
|
51
|
-
this._fullWidth = coerceBooleanProperty(value);
|
|
52
|
-
this.cdr.markForCheck();
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated use fullWidth instead
|
|
56
|
-
*/
|
|
57
|
-
get fullwidth() {
|
|
58
|
-
return this._fullWidth;
|
|
59
|
-
}
|
|
60
|
-
set fullwidth(value) {
|
|
61
|
-
this._fullWidth = coerceBooleanProperty(value);
|
|
62
|
-
this.cdr.markForCheck();
|
|
63
|
-
}
|
|
64
|
-
/** Set loading state of `wr-btn`; */
|
|
65
|
-
get loading() {
|
|
66
|
-
return this._loading;
|
|
67
|
-
}
|
|
68
|
-
set loading(value) {
|
|
69
|
-
this._loading = coerceBooleanProperty(value);
|
|
70
|
-
this.cdr.markForCheck();
|
|
71
|
-
}
|
|
72
|
-
/** Set disabled state of `wr-btn`; */
|
|
73
|
-
get disabled() {
|
|
74
|
-
return this._disabled;
|
|
75
|
-
}
|
|
76
|
-
set disabled(value) {
|
|
77
|
-
this._disabled = coerceBooleanProperty(value);
|
|
78
|
-
this.cdr.markForCheck();
|
|
79
|
-
}
|
|
80
|
-
/** Set icon of `wr-btn`; */
|
|
81
|
-
get icon() {
|
|
82
|
-
return this._icon;
|
|
83
|
-
}
|
|
84
|
-
set icon(value) {
|
|
85
|
-
this._icon = value;
|
|
86
|
-
this.cdr.markForCheck();
|
|
87
|
-
}
|
|
88
|
-
/** Set icon position of `wr-btn`; */
|
|
89
|
-
get iconPosition() {
|
|
90
|
-
return this._iconPosition;
|
|
91
|
-
}
|
|
92
|
-
set iconPosition(value) {
|
|
93
|
-
this._iconPosition = value;
|
|
94
|
-
this.cdr.markForCheck();
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
*
|
|
10
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* NGWR button component.
|
|
15
|
+
* Trigger an operation or perform an action.
|
|
16
|
+
*
|
|
17
|
+
* {@tutorial} [How to use wr-btn]{@link http://ngwr.dev/docs/components/button}
|
|
18
|
+
*/
|
|
19
|
+
class WrButtonComponent {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.size = 'default';
|
|
22
|
+
this.icon = null;
|
|
23
|
+
this.iconPosition = 'start';
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
this.outlined = false;
|
|
26
|
+
this.rounded = false;
|
|
27
|
+
this.block = false;
|
|
28
|
+
this.loading = false;
|
|
29
|
+
this.isDisabledWhenLoading = true;
|
|
95
30
|
}
|
|
96
|
-
/** Set element disabled attribute */
|
|
97
31
|
get nativeDisabled() {
|
|
98
|
-
return this.
|
|
32
|
+
return this.disabled ? '' : null;
|
|
99
33
|
}
|
|
100
|
-
/** Set element classes */
|
|
101
34
|
get elClasses() {
|
|
102
35
|
return {
|
|
103
36
|
'wr-btn': true,
|
|
@@ -109,90 +42,49 @@ class WrButton extends WrAbstractBase {
|
|
|
109
42
|
'wr-btn--color-light': this.color === 'light',
|
|
110
43
|
'wr-btn--color-medium': this.color === 'medium',
|
|
111
44
|
'wr-btn--color-dark': this.color === 'dark',
|
|
112
|
-
'wr-btn--
|
|
45
|
+
'wr-btn--small': this.size === 'small',
|
|
46
|
+
'wr-btn--block': this.block,
|
|
113
47
|
'wr-btn--rounded': this.rounded,
|
|
48
|
+
'wr-btn--icon': this.icon,
|
|
114
49
|
'wr-btn--icon-start': this.icon && this.iconPosition === 'start',
|
|
115
50
|
'wr-btn--icon-end': this.icon && this.iconPosition === 'end',
|
|
116
51
|
'wr-btn--outlined': this.outlined,
|
|
117
52
|
'wr-btn--loading': this.loading,
|
|
118
|
-
'wr-btn--
|
|
53
|
+
'wr-btn--loading--disabled': this.loading && this.isDisabledWhenLoading,
|
|
119
54
|
};
|
|
120
55
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
this.cdr = cdr;
|
|
124
|
-
this.elRef = elRef;
|
|
125
|
-
this.ngZone = ngZone;
|
|
126
|
-
this._color = 'primary';
|
|
127
|
-
this._size = 'default';
|
|
128
|
-
this._outlined = false;
|
|
129
|
-
this._rounded = false;
|
|
130
|
-
this._fullWidth = false;
|
|
131
|
-
this._loading = false;
|
|
132
|
-
this._disabled = false;
|
|
133
|
-
this._icon = null;
|
|
134
|
-
this._iconPosition = 'start';
|
|
135
|
-
/* A disabled button shouldn't apply any actions */
|
|
136
|
-
this.preventEventsWhenDisabled = (event) => {
|
|
137
|
-
if (this.disabled) {
|
|
138
|
-
event.preventDefault();
|
|
139
|
-
event.stopImmediatePropagation();
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
ngOnInit() {
|
|
144
|
-
this.ngZone.runOutsideAngular(() => {
|
|
145
|
-
this.elRef.nativeElement.addEventListener('click', this.preventEventsWhenDisabled);
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
ngOnDestroy() {
|
|
149
|
-
super.ngOnDestroy();
|
|
150
|
-
this.elRef.nativeElement.removeEventListener('click', this.preventEventsWhenDisabled);
|
|
151
|
-
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WrButton, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: WrButton, isStandalone: true, selector: "wr-btn, button[wr-btn], a[wr-btn]", inputs: { color: "color", size: "size", outlined: "outlined", rounded: "rounded", fullWidth: "fullWidth", fullwidth: "fullwidth", loading: "loading", disabled: "disabled", icon: "icon", iconPosition: "iconPosition" }, host: { properties: { "attr.disabled": "this.nativeDisabled", "class": "this.elClasses" } }, exportAs: ["wrBtn"], usesInheritance: true, ngImport: i0, template: "@if (loading) {\n <wr-spin class=\"wr-btn__spin\"></wr-spin>\n}\n@if (icon && iconPosition === 'start') {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\"></wr-icon>\n}\n<span class=\"wr-btn__text\"><ng-content></ng-content></span>\n@if (icon && iconPosition === 'end') {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\"></wr-icon>\n}\n", dependencies: [{ kind: "ngmodule", type: WrIconModule }, { kind: "directive", type: i1.WrIcon, selector: "wr-icon[name]", inputs: ["name"], exportAs: ["wrIcon"] }, { kind: "ngmodule", type: WrSpinnerModule }, { kind: "component", type: i2.WrSpinner, selector: "wr-spin", exportAs: ["wrSpin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.4", type: WrButtonComponent, isStandalone: true, selector: "wr-btn, button[wr-btn], a[wr-btn]", inputs: { color: "color", size: "size", icon: "icon", iconPosition: "iconPosition", disabled: ["disabled", "disabled", booleanAttribute], outlined: ["outlined", "outlined", booleanAttribute], rounded: ["rounded", "rounded", booleanAttribute], block: ["block", "block", booleanAttribute], loading: ["loading", "loading", booleanAttribute], isDisabledWhenLoading: ["isDisabledWhenLoading", "isDisabledWhenLoading", booleanAttribute] }, host: { properties: { "attr.disabled": "this.nativeDisabled", "class": "this.elClasses" } }, ngImport: i0, template: "@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n", dependencies: [{ kind: "component", type: WrIconComponent, selector: "wr-icon", inputs: ["name"] }, { kind: "ngmodule", type: WrSpinnerModule }, { kind: "component", type: i1.WrSpinnerComponent, selector: "wr-spinner" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
154
58
|
}
|
|
155
|
-
|
|
156
|
-
InputBoolean()
|
|
157
|
-
], WrButton.prototype, "outlined", null);
|
|
158
|
-
__decorate([
|
|
159
|
-
InputBoolean()
|
|
160
|
-
], WrButton.prototype, "rounded", null);
|
|
161
|
-
__decorate([
|
|
162
|
-
InputBoolean()
|
|
163
|
-
], WrButton.prototype, "fullWidth", null);
|
|
164
|
-
__decorate([
|
|
165
|
-
InputBoolean()
|
|
166
|
-
], WrButton.prototype, "fullwidth", null);
|
|
167
|
-
__decorate([
|
|
168
|
-
InputBoolean()
|
|
169
|
-
], WrButton.prototype, "loading", null);
|
|
170
|
-
__decorate([
|
|
171
|
-
InputBoolean()
|
|
172
|
-
], WrButton.prototype, "disabled", null);
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WrButton, decorators: [{
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrButtonComponent, decorators: [{
|
|
174
60
|
type: Component,
|
|
175
|
-
args: [{ selector: 'wr-btn, button[wr-btn], a[wr-btn]',
|
|
176
|
-
}],
|
|
61
|
+
args: [{ standalone: true, selector: 'wr-btn, button[wr-btn], a[wr-btn]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [WrIconComponent, WrSpinnerModule], template: "@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n" }]
|
|
62
|
+
}], propDecorators: { color: [{
|
|
177
63
|
type: Input
|
|
178
64
|
}], size: [{
|
|
179
65
|
type: Input
|
|
180
|
-
}], outlined: [{
|
|
181
|
-
type: Input
|
|
182
|
-
}], rounded: [{
|
|
183
|
-
type: Input
|
|
184
|
-
}], fullWidth: [{
|
|
185
|
-
type: Input
|
|
186
|
-
}], fullwidth: [{
|
|
187
|
-
type: Input
|
|
188
|
-
}], loading: [{
|
|
189
|
-
type: Input
|
|
190
|
-
}], disabled: [{
|
|
191
|
-
type: Input
|
|
192
66
|
}], icon: [{
|
|
193
67
|
type: Input
|
|
194
68
|
}], iconPosition: [{
|
|
195
69
|
type: Input
|
|
70
|
+
}], disabled: [{
|
|
71
|
+
type: Input,
|
|
72
|
+
args: [{ transform: booleanAttribute }]
|
|
73
|
+
}], outlined: [{
|
|
74
|
+
type: Input,
|
|
75
|
+
args: [{ transform: booleanAttribute }]
|
|
76
|
+
}], rounded: [{
|
|
77
|
+
type: Input,
|
|
78
|
+
args: [{ transform: booleanAttribute }]
|
|
79
|
+
}], block: [{
|
|
80
|
+
type: Input,
|
|
81
|
+
args: [{ transform: booleanAttribute }]
|
|
82
|
+
}], loading: [{
|
|
83
|
+
type: Input,
|
|
84
|
+
args: [{ transform: booleanAttribute }]
|
|
85
|
+
}], isDisabledWhenLoading: [{
|
|
86
|
+
type: Input,
|
|
87
|
+
args: [{ transform: booleanAttribute }]
|
|
196
88
|
}], nativeDisabled: [{
|
|
197
89
|
type: HostBinding,
|
|
198
90
|
args: ['attr.disabled']
|
|
@@ -201,22 +93,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
201
93
|
args: ['class']
|
|
202
94
|
}] } });
|
|
203
95
|
|
|
96
|
+
/**
|
|
97
|
+
* @license
|
|
98
|
+
*
|
|
99
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
100
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
101
|
+
*/
|
|
102
|
+
/**
|
|
103
|
+
* NGWR button group.
|
|
104
|
+
*
|
|
105
|
+
* {@tutorial} [How to use wr-btn-group]{@link http://ngwr.dev/docs/components/button-group}
|
|
106
|
+
*/
|
|
107
|
+
class WrButtonGroupComponent {
|
|
108
|
+
get classes() {
|
|
109
|
+
return {
|
|
110
|
+
'wr-btn-group': true,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.4", type: WrButtonGroupComponent, isStandalone: true, selector: "wr-btn-group", host: { properties: { "class": "this.classes" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
115
|
+
}
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrButtonGroupComponent, decorators: [{
|
|
117
|
+
type: Component,
|
|
118
|
+
args: [{
|
|
119
|
+
standalone: true,
|
|
120
|
+
selector: 'wr-btn-group',
|
|
121
|
+
template: '<ng-content />',
|
|
122
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
123
|
+
encapsulation: ViewEncapsulation.None,
|
|
124
|
+
}]
|
|
125
|
+
}], propDecorators: { classes: [{
|
|
126
|
+
type: HostBinding,
|
|
127
|
+
args: ['class']
|
|
128
|
+
}] } });
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @license
|
|
132
|
+
*
|
|
133
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
134
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
135
|
+
*/
|
|
204
136
|
class WrButtonModule {
|
|
205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
206
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
207
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
138
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.4", ngImport: i0, type: WrButtonModule, imports: [WrButtonComponent, WrButtonGroupComponent], exports: [WrButtonComponent, WrButtonGroupComponent] }); }
|
|
139
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrButtonModule, imports: [WrButtonComponent] }); }
|
|
208
140
|
}
|
|
209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrButtonModule, decorators: [{
|
|
210
142
|
type: NgModule,
|
|
211
143
|
args: [{
|
|
212
|
-
imports: [
|
|
213
|
-
exports: [
|
|
144
|
+
imports: [WrButtonComponent, WrButtonGroupComponent],
|
|
145
|
+
exports: [WrButtonComponent, WrButtonGroupComponent],
|
|
214
146
|
}]
|
|
215
147
|
}] });
|
|
216
148
|
|
|
149
|
+
/**
|
|
150
|
+
* @license
|
|
151
|
+
*
|
|
152
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
153
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
154
|
+
*/
|
|
155
|
+
|
|
217
156
|
/**
|
|
218
157
|
* Generated bundle index. Do not edit.
|
|
219
158
|
*/
|
|
220
159
|
|
|
221
|
-
export {
|
|
160
|
+
export { WrButtonComponent, WrButtonGroupComponent, WrButtonModule };
|
|
222
161
|
//# sourceMappingURL=ngwr-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-button.mjs","sources":["../../../projects/lib/button/button.component.ts","../../../projects/lib/button/button.template.html","../../../projects/lib/button/button.module.ts","../../../projects/lib/button/ngwr-button.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { WrAbstractBase } from 'ngwr/core/abstract';\nimport { isThemeColor, WrThemeColor } from 'ngwr/core/color';\nimport { InputBoolean } from 'ngwr/core/decorators';\nimport { SafeAny } from 'ngwr/core/types';\nimport { WrIconModule, wrIconName } from 'ngwr/icon';\nimport { WrSpinnerModule } from 'ngwr/spinner';\n\n@Component({\n selector: 'wr-btn, button[wr-btn], a[wr-btn]',\n exportAs: 'wrBtn',\n templateUrl: 'button.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [WrIconModule, WrSpinnerModule],\n})\nexport class WrButton extends WrAbstractBase implements OnInit, OnDestroy {\n /** Set color of `wr-btn`; */\n @Input()\n get color(): WrThemeColor {\n return this._color;\n }\n set color(value: WrThemeColor) {\n this._color = isThemeColor(value) ? value : 'primary';\n this.cdr.markForCheck();\n }\n private _color: WrThemeColor = 'primary';\n\n /** Set size of `wr-btn`; */\n @Input()\n get size(): 'default' | 'small' {\n return this._size;\n }\n set size(value: 'default' | 'small') {\n this._size = value;\n this.cdr.markForCheck();\n }\n private _size: 'default' | 'small' = 'default';\n\n /** Set outlined state of `wr-btn`; */\n @Input()\n @InputBoolean()\n get outlined(): boolean {\n return this._outlined;\n }\n set outlined(value: BooleanInput) {\n this._outlined = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _outlined: boolean = false;\n\n /** Set rounded state of `wr-btn`; */\n @Input()\n @InputBoolean()\n get rounded(): boolean {\n return this._rounded;\n }\n set rounded(value: BooleanInput) {\n this._rounded = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _rounded: boolean = false;\n\n /** Set fullwidth state of `wr-btn`; */\n @Input()\n @InputBoolean()\n get fullWidth(): boolean {\n return this._fullWidth;\n }\n set fullWidth(value: BooleanInput) {\n this._fullWidth = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n\n /**\n * @deprecated use fullWidth instead\n */\n @Input()\n @InputBoolean()\n get fullwidth(): boolean {\n return this._fullWidth;\n }\n set fullwidth(value: BooleanInput) {\n this._fullWidth = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n\n private _fullWidth: boolean = false;\n\n /** Set loading state of `wr-btn`; */\n @Input()\n @InputBoolean()\n get loading(): boolean {\n return this._loading;\n }\n set loading(value: BooleanInput) {\n this._loading = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _loading: boolean = false;\n\n /** Set disabled state of `wr-btn`; */\n @Input()\n @InputBoolean()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _disabled: boolean = false;\n\n /** Set icon of `wr-btn`; */\n @Input()\n get icon(): wrIconName | null {\n return this._icon;\n }\n set icon(value: wrIconName | null) {\n this._icon = value;\n this.cdr.markForCheck();\n }\n private _icon: wrIconName | null = null;\n\n /** Set icon position of `wr-btn`; */\n @Input()\n get iconPosition(): 'start' | 'end' {\n return this._iconPosition;\n }\n set iconPosition(value: 'start' | 'end') {\n this._iconPosition = value;\n this.cdr.markForCheck();\n }\n private _iconPosition: 'start' | 'end' = 'start';\n\n /** Set element disabled attribute */\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this._disabled ? '' : null;\n }\n\n /** Set element classes */\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-btn': true,\n 'wr-btn--color-primary': this.color === 'primary',\n 'wr-btn--color-secondary': this.color === 'secondary',\n 'wr-btn--color-success': this.color === 'success',\n 'wr-btn--color-warning': this.color === 'warning',\n 'wr-btn--color-danger': this.color === 'danger',\n 'wr-btn--color-light': this.color === 'light',\n 'wr-btn--color-medium': this.color === 'medium',\n 'wr-btn--color-dark': this.color === 'dark',\n 'wr-btn--size-small': this.size === 'small',\n 'wr-btn--rounded': this.rounded,\n 'wr-btn--icon-start': this.icon && this.iconPosition === 'start',\n 'wr-btn--icon-end': this.icon && this.iconPosition === 'end',\n 'wr-btn--outlined': this.outlined,\n 'wr-btn--loading': this.loading,\n 'wr-btn--full-width': this.fullWidth,\n };\n }\n\n constructor(\n private readonly cdr: ChangeDetectorRef,\n private readonly elRef: ElementRef<HTMLButtonElement | HTMLLinkElement | HTMLAnchorElement | HTMLElement>,\n private readonly ngZone: NgZone\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.ngZone.runOutsideAngular(() => {\n this.elRef.nativeElement.addEventListener('click', this.preventEventsWhenDisabled);\n });\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this.elRef.nativeElement.removeEventListener('click', this.preventEventsWhenDisabled);\n }\n\n /* A disabled button shouldn't apply any actions */\n private preventEventsWhenDisabled = (event: Event): void => {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n}\n","@if (loading) {\n <wr-spin class=\"wr-btn__spin\"></wr-spin>\n}\n@if (icon && iconPosition === 'start') {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\"></wr-icon>\n}\n<span class=\"wr-btn__text\"><ng-content></ng-content></span>\n@if (icon && iconPosition === 'end') {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\"></wr-icon>\n}\n","import { NgModule } from '@angular/core';\n\nimport { WrButton } from './button.component';\n\n@NgModule({\n imports: [WrButton],\n exports: [WrButton],\n})\nexport class WrButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BM,MAAO,QAAS,SAAQ,cAAc,CAAA;;AAE1C,IAAA,IACI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IACD,IAAI,KAAK,CAAC,KAAmB,EAAA;AAC3B,QAAA,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,SAAS,CAAC;AACtD,QAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;KACzB;;AAID,IAAA,IACI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;IACD,IAAI,IAAI,CAAC,KAA0B,EAAA;AACjC,QAAA,IAAI,CAAC,KA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;2FAGP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,QAAQ,CAAC;oBACnB,OAAO,EAAE,CAAC,QAAQ,CAAC;AACpB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-button.mjs","sources":["../../../projects/lib/button/button.component.ts","../../../projects/lib/button/button.component.html","../../../projects/lib/button/button-group.component.ts","../../../projects/lib/button/button.module.ts","../../../projects/lib/button/public-api.ts","../../../projects/lib/button/ngwr-button.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny, WrThemeColor } from 'ngwr/cdk/types';\nimport { WrIconComponent, wrIconName } from 'ngwr/icon';\nimport { WrSpinnerModule } from 'ngwr/spinner';\n\n/**\n * NGWR button component.\n * Trigger an operation or perform an action.\n *\n * {@tutorial} [How to use wr-btn]{@link http://ngwr.dev/docs/components/button}\n */\n@Component({\n standalone: true,\n selector: 'wr-btn, button[wr-btn], a[wr-btn]',\n templateUrl: './button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconComponent, WrSpinnerModule],\n})\nexport class WrButtonComponent {\n @Input() color?: WrThemeColor | null;\n @Input() size: 'default' | 'small' = 'default';\n @Input() icon: wrIconName | null = null;\n @Input() iconPosition: 'start' | 'end' = 'start';\n @Input({ transform: booleanAttribute }) disabled = false;\n @Input({ transform: booleanAttribute }) outlined = false;\n @Input({ transform: booleanAttribute }) rounded = false;\n @Input({ transform: booleanAttribute }) block = false;\n @Input({ transform: booleanAttribute }) loading = false;\n @Input({ transform: booleanAttribute }) isDisabledWhenLoading = true;\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.disabled ? '' : null;\n }\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-btn': true,\n 'wr-btn--color-primary': this.color === 'primary',\n 'wr-btn--color-secondary': this.color === 'secondary',\n 'wr-btn--color-success': this.color === 'success',\n 'wr-btn--color-warning': this.color === 'warning',\n 'wr-btn--color-danger': this.color === 'danger',\n 'wr-btn--color-light': this.color === 'light',\n 'wr-btn--color-medium': this.color === 'medium',\n 'wr-btn--color-dark': this.color === 'dark',\n 'wr-btn--small': this.size === 'small',\n 'wr-btn--block': this.block,\n 'wr-btn--rounded': this.rounded,\n 'wr-btn--icon': this.icon,\n 'wr-btn--icon-start': this.icon && this.iconPosition === 'start',\n 'wr-btn--icon-end': this.icon && this.iconPosition === 'end',\n 'wr-btn--outlined': this.outlined,\n 'wr-btn--loading': this.loading,\n 'wr-btn--loading--disabled': this.loading && this.isDisabledWhenLoading,\n };\n }\n}\n","@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\n\n/**\n * NGWR button group.\n *\n * {@tutorial} [How to use wr-btn-group]{@link http://ngwr.dev/docs/components/button-group}\n */\n@Component({\n standalone: true,\n selector: 'wr-btn-group',\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrButtonGroupComponent {\n @HostBinding('class')\n get classes(): SafeAny {\n return {\n 'wr-btn-group': true,\n };\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrButtonGroupComponent } from './button-group.component';\nimport { WrButtonComponent } from './button.component';\n\n@NgModule({\n imports: [WrButtonComponent, WrButtonGroupComponent],\n exports: [WrButtonComponent, WrButtonGroupComponent],\n})\nexport class WrButtonModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './button.component';\nexport * from './button-group.component';\nexport * from './button.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAeH;;;;;AAKG;MASU,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;QAUW,IAAI,CAAA,IAAA,GAAwB,SAAS,CAAC;QACtC,IAAI,CAAA,IAAA,GAAsB,IAAI,CAAC;QAC/B,IAAY,CAAA,YAAA,GAAoB,OAAO,CAAC;QACT,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;QAChB,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;QACd,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;QAChB,IAAqB,CAAA,qBAAA,GAAG,IAAI,CAAC;AA8BtE,KAAA;AA5BC,IAAA,IACI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC;KAClC;AAED,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,uBAAuB,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS;AACjD,YAAA,yBAAyB,EAAE,IAAI,CAAC,KAAK,KAAK,WAAW;AACrD,YAAA,uBA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AAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACtC,iBAAA,CAAA;8BAGK,OAAO,EAAA,CAAA;sBADV,WAAW;uBAAC,OAAO,CAAA;;;ACxBtB;;;;;AAKG;MAWU,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,iBAAiB,EAAE,sBAAsB,CACzC,EAAA,OAAA,EAAA,CAAA,iBAAiB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA,EAAA;AAExC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGhB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AACrD,iBAAA,CAAA;;;ACfD;;;;;AAKG;;ACLH;;AAEG;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
function isArray(val) {
|
|
8
|
+
return Array.isArray(val);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @license
|
|
13
|
+
*
|
|
14
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
15
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
16
|
+
*/
|
|
17
|
+
function isDefined(value) {
|
|
18
|
+
return value != null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
*
|
|
24
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
25
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
26
|
+
*/
|
|
27
|
+
function isNotEmptyArray(val) {
|
|
28
|
+
return !Array.isArray(val) || val.length !== 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @license
|
|
33
|
+
*
|
|
34
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
35
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
36
|
+
*/
|
|
37
|
+
function isObservable(obj) {
|
|
38
|
+
return !!obj && typeof obj.subscribe === 'function';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @license
|
|
43
|
+
*
|
|
44
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
45
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Generated bundle index. Do not edit.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
export { isArray, isDefined, isNotEmptyArray, isObservable };
|
|
53
|
+
//# sourceMappingURL=ngwr-cdk-rxjs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngwr-cdk-rxjs.mjs","sources":["../../../projects/lib/cdk/rxjs/is-array.ts","../../../projects/lib/cdk/rxjs/is-defined.ts","../../../projects/lib/cdk/rxjs/is-not-empty-array.ts","../../../projects/lib/cdk/rxjs/is-observable.ts","../../../projects/lib/cdk/rxjs/public-api.ts","../../../projects/lib/cdk/rxjs/ngwr-cdk-rxjs.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isArray<T>(val: Maybe<T>): val is T {\n return Array.isArray(val);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isDefined<T>(value: Maybe<T>): value is T {\n return value != null;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isNotEmptyArray<T>(val: Maybe<T>): val is T {\n return !Array.isArray(val) || val.length !== 0;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Observable } from 'rxjs';\n\nimport { SafeAny } from 'ngwr/cdk/types';\n\nexport function isObservable(obj: SafeAny | Observable<SafeAny>): obj is Observable<SafeAny> {\n return !!obj && typeof obj.subscribe === 'function';\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './is-array';\nexport * from './is-defined';\nexport * from './is-not-empty-array';\nexport * from './is-observable';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAIG,SAAU,OAAO,CAAI,GAAa,EAAA;AACtC,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC5B;;ACXA;;;;;AAKG;AAIG,SAAU,SAAS,CAAI,KAAe,EAAA;IAC1C,OAAO,KAAK,IAAI,IAAI,CAAC;AACvB;;ACXA;;;;;AAKG;AAIG,SAAU,eAAe,CAAI,GAAa,EAAA;AAC9C,IAAA,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;AACjD;;ACXA;;;;;AAKG;AAMG,SAAU,YAAY,CAAC,GAAkC,EAAA;IAC7D,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,UAAU,CAAC;AACtD;;ACbA;;;;;AAKG;;ACLH;;AAEG;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
*
|
|
11
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
12
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
*
|
|
18
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
19
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
20
|
+
*/
|
|
21
|
+
const wrThemeColors = [
|
|
22
|
+
'primary',
|
|
23
|
+
'secondary',
|
|
24
|
+
'success',
|
|
25
|
+
'warning',
|
|
26
|
+
'danger',
|
|
27
|
+
'light',
|
|
28
|
+
'medium',
|
|
29
|
+
'dark',
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @license
|
|
34
|
+
*
|
|
35
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
36
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generated bundle index. Do not edit.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
export { wrThemeColors };
|
|
44
|
+
//# sourceMappingURL=ngwr-cdk-types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngwr-cdk-types.mjs","sources":["../../../projects/lib/cdk/types/maybe.ts","../../../projects/lib/cdk/types/safe-any.ts","../../../projects/lib/cdk/types/theme-color.ts","../../../projects/lib/cdk/types/public-api.ts","../../../projects/lib/cdk/types/ngwr-cdk-types.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport type Maybe<T> = T | undefined | null;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type SafeAny = any;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport const wrThemeColors = [\n 'primary',\n 'secondary',\n 'success',\n 'warning',\n 'danger',\n 'light',\n 'medium',\n 'dark',\n] as const;\n\nexport type WrThemeColor = (typeof wrThemeColors)[number];\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './maybe';\nexport * from './safe-any';\nexport * from './theme-color';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;;ACLH;;;;;AAKG;;ACLH;;;;;AAKG;AAEU,MAAA,aAAa,GAAG;IAC3B,SAAS;IACT,WAAW;IACX,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;;;ACfR;;;;;AAKG;;ACLH;;AAEG;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generates random ID
|
|
9
|
+
*
|
|
10
|
+
* @return {string}
|
|
11
|
+
*/
|
|
12
|
+
function generateRandomId() {
|
|
13
|
+
const dateRandomizer = Date.now().toString(36);
|
|
14
|
+
const mathRandomizer = Math.random().toString(36).substring(2);
|
|
15
|
+
return `${dateRandomizer}${mathRandomizer}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
*
|
|
21
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
22
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generated bundle index. Do not edit.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export { generateRandomId };
|
|
30
|
+
//# sourceMappingURL=ngwr-cdk-utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngwr-cdk-utils.mjs","sources":["../../../projects/lib/cdk/utils/generate-random-id.ts","../../../projects/lib/cdk/utils/public-api.ts","../../../projects/lib/cdk/utils/ngwr-cdk-utils.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Generates random ID\n *\n * @return {string}\n */\nexport function generateRandomId(): string {\n const dateRandomizer = Date.now().toString(36);\n const mathRandomizer = Math.random().toString(36).substring(2);\n return `${dateRandomizer}${mathRandomizer}`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './generate-random-id';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;;;;AAIG;SACa,gBAAgB,GAAA;IAC9B,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC/C,IAAA,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAA,OAAO,CAAG,EAAA,cAAc,CAAG,EAAA,cAAc,EAAE,CAAC;AAC9C;;AChBA;;;;;AAKG;;ACLH;;AAEG;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
*
|
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
10
|
+
*/
|
|
11
|
+
class WrAbstractBase {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.destroyed$ = new Subject();
|
|
14
|
+
}
|
|
15
|
+
ngOnDestroy() {
|
|
16
|
+
this.destroyed$.next();
|
|
17
|
+
this.destroyed$.complete();
|
|
18
|
+
}
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrAbstractBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
20
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: WrAbstractBase, isStandalone: true, ngImport: i0 }); }
|
|
21
|
+
}
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: WrAbstractBase, decorators: [{
|
|
23
|
+
type: Directive,
|
|
24
|
+
args: [{
|
|
25
|
+
standalone: true,
|
|
26
|
+
}]
|
|
27
|
+
}] });
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @license
|
|
31
|
+
*
|
|
32
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
33
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Generated bundle index. Do not edit.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
export { WrAbstractBase };
|
|
41
|
+
//# sourceMappingURL=ngwr-cdk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngwr-cdk.mjs","sources":["../../../projects/lib/cdk/base.directive.ts","../../../projects/lib/cdk/public-api.ts","../../../projects/lib/cdk/ngwr-cdk.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, OnDestroy } from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\n@Directive({\n standalone: true,\n})\nexport abstract class WrAbstractBase implements OnDestroy {\n protected readonly destroyed$: Subject<void> = new Subject<void>();\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './base.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;MASmB,cAAc,CAAA;AAHpC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,UAAU,GAAkB,IAAI,OAAO,EAAQ,CAAC;AAMpE,KAAA;IAJC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;AACvB,QAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;KAC5B;8GANmB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;;ACbD;;;;;AAKG;;ACLH;;AAEG;;;;"}
|