@wavemaker-ai/app-ng-runtime 12.0.0-rc.335 → 12.0.1-rc.338
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/build-task/bundles/index.umd.js +15 -16
- package/build-task/fesm2022/index.mjs +15 -16
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/bundles/index.umd.js +9 -9
- package/components/advanced/carousel/fesm2022/index.mjs +9 -9
- package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/types/index.d.ts +7 -7
- package/components/advanced/custom/bundles/index.umd.js +9 -10
- package/components/advanced/custom/fesm2022/index.mjs +9 -10
- package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- package/components/advanced/custom/types/index.d.ts +3 -3
- package/components/advanced/login/bundles/index.umd.js +3 -3
- package/components/advanced/login/fesm2022/index.mjs +3 -3
- package/components/advanced/login/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/types/index.d.ts +1 -1
- package/components/advanced/marquee/bundles/index.umd.js +3 -3
- package/components/advanced/marquee/fesm2022/index.mjs +3 -3
- package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
- package/components/advanced/marquee/types/index.d.ts +1 -1
- package/components/base/bundles/index.umd.js +40 -46
- package/components/base/fesm2022/index.mjs +40 -46
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/types/index.d.ts +47 -46
- package/components/basic/anchor/bundles/index.umd.js +3 -3
- package/components/basic/anchor/fesm2022/index.mjs +3 -3
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/anchor/types/index.d.ts +3 -3
- package/components/basic/audio/bundles/index.umd.js +3 -3
- package/components/basic/audio/fesm2022/index.mjs +3 -3
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/types/index.d.ts +1 -1
- package/components/basic/html/bundles/index.umd.js +10 -11
- package/components/basic/html/fesm2022/index.mjs +10 -11
- package/components/basic/html/fesm2022/index.mjs.map +1 -1
- package/components/basic/html/types/index.d.ts +3 -3
- package/components/basic/icon/bundles/index.umd.js +3 -3
- package/components/basic/icon/fesm2022/index.mjs +3 -3
- package/components/basic/icon/fesm2022/index.mjs.map +1 -1
- package/components/basic/icon/types/index.d.ts +1 -1
- package/components/basic/iframe/bundles/index.umd.js +5 -5
- package/components/basic/iframe/fesm2022/index.mjs +5 -5
- package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
- package/components/basic/iframe/types/index.d.ts +3 -3
- package/components/basic/label/bundles/index.umd.js +10 -11
- package/components/basic/label/fesm2022/index.mjs +10 -11
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/basic/label/types/index.d.ts +1 -1
- package/components/basic/picture/bundles/index.umd.js +3 -3
- package/components/basic/picture/fesm2022/index.mjs +3 -3
- package/components/basic/picture/fesm2022/index.mjs.map +1 -1
- package/components/basic/picture/types/index.d.ts +2 -2
- package/components/basic/progress/progress-bar/bundles/index.umd.js +8 -10
- package/components/basic/progress/progress-bar/fesm2022/index.mjs +8 -10
- package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-bar/types/index.d.ts +2 -2
- package/components/basic/progress/progress-circle/bundles/index.umd.js +3 -3
- package/components/basic/progress/progress-circle/fesm2022/index.mjs +3 -3
- package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-circle/types/index.d.ts +2 -2
- package/components/basic/rich-text-editor/bundles/index.umd.js +3 -3
- package/components/basic/rich-text-editor/fesm2022/index.mjs +3 -3
- package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- package/components/basic/rich-text-editor/types/index.d.ts +3 -3
- package/components/basic/search/bundles/index.umd.js +40 -42
- package/components/basic/search/fesm2022/index.mjs +40 -42
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/types/index.d.ts +13 -13
- package/components/basic/spinner/bundles/index.umd.js +3 -3
- package/components/basic/spinner/fesm2022/index.mjs +3 -3
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/types/index.d.ts +3 -3
- package/components/basic/tree/bundles/index.umd.js +9 -9
- package/components/basic/tree/fesm2022/index.mjs +9 -9
- package/components/basic/tree/fesm2022/index.mjs.map +1 -1
- package/components/basic/tree/types/index.d.ts +7 -7
- package/components/basic/video/bundles/index.umd.js +3 -3
- package/components/basic/video/fesm2022/index.mjs +3 -3
- package/components/basic/video/fesm2022/index.mjs.map +1 -1
- package/components/basic/video/types/index.d.ts +2 -2
- package/components/chart/bundles/index.umd.js +19 -22
- package/components/chart/fesm2022/index.mjs +20 -23
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/chart/types/index.d.ts +9 -9
- package/components/containers/accordion/bundles/index.umd.js +10 -12
- package/components/containers/accordion/fesm2022/index.mjs +10 -12
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/types/index.d.ts +9 -9
- package/components/containers/layout-grid/bundles/index.umd.js +9 -9
- package/components/containers/layout-grid/fesm2022/index.mjs +9 -9
- package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
- package/components/containers/layout-grid/types/index.d.ts +4 -4
- package/components/containers/linear-layout/bundles/index.umd.js +6 -6
- package/components/containers/linear-layout/fesm2022/index.mjs +6 -6
- package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
- package/components/containers/linear-layout/types/index.d.ts +2 -2
- package/components/containers/panel/bundles/index.umd.js +3 -3
- package/components/containers/panel/fesm2022/index.mjs +3 -3
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/types/index.d.ts +3 -3
- package/components/containers/tabs/bundles/index.umd.js +9 -9
- package/components/containers/tabs/fesm2022/index.mjs +9 -9
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/types/index.d.ts +8 -8
- package/components/containers/tile/bundles/index.umd.js +3 -3
- package/components/containers/tile/fesm2022/index.mjs +3 -3
- package/components/containers/tile/fesm2022/index.mjs.map +1 -1
- package/components/containers/tile/types/index.d.ts +1 -1
- package/components/containers/wizard/bundles/index.umd.js +18 -18
- package/components/containers/wizard/fesm2022/index.mjs +18 -18
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/types/index.d.ts +8 -8
- package/components/data/card/bundles/index.umd.js +12 -12
- package/components/data/card/fesm2022/index.mjs +12 -12
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/card/types/index.d.ts +6 -6
- package/components/data/form/bundles/index.umd.js +72 -75
- package/components/data/form/fesm2022/index.mjs +72 -77
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/types/index.d.ts +29 -29
- package/components/data/list/bundles/index.umd.js +22 -27
- package/components/data/list/fesm2022/index.mjs +22 -27
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/types/index.d.ts +23 -23
- package/components/data/live-table/bundles/index.umd.js +3 -3
- package/components/data/live-table/fesm2022/index.mjs +3 -3
- package/components/data/live-table/fesm2022/index.mjs.map +1 -1
- package/components/data/live-table/types/index.d.ts +5 -5
- package/components/data/pagination/bundles/index.umd.js +27 -28
- package/components/data/pagination/fesm2022/index.mjs +27 -28
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/types/index.d.ts +1 -1
- package/components/data/table/bundles/index.umd.js +131 -142
- package/components/data/table/fesm2022/index.mjs +131 -143
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/types/index.d.ts +20 -20
- package/components/dialogs/alert-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/alert-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/alert-dialog/types/index.d.ts +1 -1
- package/components/dialogs/confirm-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/confirm-dialog/types/index.d.ts +1 -1
- package/components/dialogs/default/bundles/index.umd.js +12 -12
- package/components/dialogs/default/fesm2022/index.mjs +12 -12
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/default/types/index.d.ts +3 -3
- package/components/dialogs/design-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/design-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/design-dialog/types/index.d.ts +1 -1
- package/components/dialogs/iframe-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/types/index.d.ts +1 -1
- package/components/dialogs/login-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/login-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/login-dialog/types/index.d.ts +2 -2
- package/components/dialogs/partial-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/partial-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/partial-dialog/types/index.d.ts +1 -1
- package/components/input/base-form/bundles/index.umd.js +4 -4
- package/components/input/base-form/fesm2022/index.mjs +4 -4
- package/components/input/base-form/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form-custom/bundles/index.umd.js +3 -3
- package/components/input/base-form-custom/fesm2022/index.mjs +3 -3
- package/components/input/button/bundles/index.umd.js +3 -3
- package/components/input/button/fesm2022/index.mjs +3 -3
- package/components/input/button/fesm2022/index.mjs.map +1 -1
- package/components/input/button/types/index.d.ts +1 -1
- package/components/input/button-group/bundles/index.umd.js +3 -3
- package/components/input/button-group/fesm2022/index.mjs +3 -3
- package/components/input/button-group/fesm2022/index.mjs.map +1 -1
- package/components/input/button-group/types/index.d.ts +1 -1
- package/components/input/calendar/bundles/index.umd.js +4 -4
- package/components/input/calendar/fesm2022/index.mjs +4 -5
- package/components/input/calendar/fesm2022/index.mjs.map +1 -1
- package/components/input/calendar/types/index.d.ts +9 -9
- package/components/input/caption-position/bundles/index.umd.js +5 -5
- package/components/input/caption-position/fesm2022/index.mjs +5 -5
- package/components/input/caption-position/fesm2022/index.mjs.map +1 -1
- package/components/input/caption-position/types/index.d.ts +4 -4
- package/components/input/checkbox/bundles/index.umd.js +3 -3
- package/components/input/checkbox/fesm2022/index.mjs +3 -3
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/types/index.d.ts +2 -2
- package/components/input/checkboxset/bundles/index.umd.js +4 -4
- package/components/input/checkboxset/fesm2022/index.mjs +4 -4
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
- package/components/input/checkboxset/types/index.d.ts +2 -2
- package/components/input/chips/bundles/index.umd.js +5 -5
- package/components/input/chips/fesm2022/index.mjs +5 -5
- package/components/input/chips/fesm2022/index.mjs.map +1 -1
- package/components/input/chips/types/index.d.ts +14 -14
- package/components/input/color-picker/bundles/index.umd.js +3 -3
- package/components/input/color-picker/fesm2022/index.mjs +3 -3
- package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/color-picker/types/index.d.ts +2 -2
- package/components/input/composite/bundles/index.umd.js +3 -3
- package/components/input/composite/fesm2022/index.mjs +3 -3
- package/components/input/composite/fesm2022/index.mjs.map +1 -1
- package/components/input/composite/types/index.d.ts +1 -1
- package/components/input/currency/bundles/index.umd.js +3 -3
- package/components/input/currency/fesm2022/index.mjs +3 -3
- package/components/input/currency/fesm2022/index.mjs.map +1 -1
- package/components/input/currency/types/index.d.ts +3 -3
- package/components/input/dataset-aware-form/bundles/index.umd.js +7 -7
- package/components/input/dataset-aware-form/fesm2022/index.mjs +7 -7
- package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
- package/components/input/dataset-aware-form/types/index.d.ts +1 -1
- package/components/input/epoch/base-date-time/bundles/index.umd.js +10 -15
- package/components/input/epoch/base-date-time/fesm2022/index.mjs +10 -15
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/base-date-time/types/index.d.ts +2 -2
- package/components/input/epoch/date/bundles/index.umd.js +5 -5
- package/components/input/epoch/date/fesm2022/index.mjs +5 -5
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date/types/index.d.ts +4 -4
- package/components/input/epoch/date-time/bundles/index.umd.js +3 -3
- package/components/input/epoch/date-time/fesm2022/index.mjs +3 -3
- package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time/types/index.d.ts +8 -8
- package/components/input/epoch/date-time-picker/bundles/index.umd.js +8 -8
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs +8 -8
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time-picker/types/index.d.ts +6 -7
- package/components/input/epoch/picker/bundles/index.umd.js +6 -6
- package/components/input/epoch/picker/fesm2022/index.mjs +6 -6
- package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/bundles/index.umd.js +4 -5
- package/components/input/epoch/time/fesm2022/index.mjs +5 -6
- package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/types/index.d.ts +4 -4
- package/components/input/file-upload/bundles/index.umd.js +4 -4
- package/components/input/file-upload/fesm2022/index.mjs +4 -4
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/types/index.d.ts +5 -5
- package/components/input/number/bundles/index.umd.js +3 -3
- package/components/input/number/fesm2022/index.mjs +3 -3
- package/components/input/number/fesm2022/index.mjs.map +1 -1
- package/components/input/number/types/index.d.ts +1 -1
- package/components/input/radioset/bundles/index.umd.js +4 -4
- package/components/input/radioset/fesm2022/index.mjs +4 -4
- package/components/input/radioset/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/types/index.d.ts +2 -2
- package/components/input/rating/bundles/index.umd.js +9 -11
- package/components/input/rating/fesm2022/index.mjs +9 -11
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/types/index.d.ts +2 -2
- package/components/input/select/bundles/index.umd.js +4 -4
- package/components/input/select/fesm2022/index.mjs +4 -4
- package/components/input/select/fesm2022/index.mjs.map +1 -1
- package/components/input/select/types/index.d.ts +1 -1
- package/components/input/slider/bundles/index.umd.js +3 -3
- package/components/input/slider/fesm2022/index.mjs +3 -3
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/types/index.d.ts +1 -1
- package/components/input/switch/bundles/index.umd.js +3 -3
- package/components/input/switch/fesm2022/index.mjs +3 -3
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/types/index.d.ts +1 -1
- package/components/input/text/bundles/index.umd.js +31 -35
- package/components/input/text/fesm2022/index.mjs +31 -35
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/types/index.d.ts +12 -12
- package/components/input/textarea/bundles/index.umd.js +3 -3
- package/components/input/textarea/fesm2022/index.mjs +3 -3
- package/components/input/textarea/fesm2022/index.mjs.map +1 -1
- package/components/input/textarea/types/index.d.ts +2 -2
- package/components/navigation/breadcrumb/bundles/index.umd.js +3 -3
- package/components/navigation/breadcrumb/fesm2022/index.mjs +3 -3
- package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- package/components/navigation/breadcrumb/types/index.d.ts +4 -4
- package/components/navigation/menu/bundles/index.umd.js +25 -33
- package/components/navigation/menu/fesm2022/index.mjs +25 -33
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/types/index.d.ts +21 -21
- package/components/navigation/navbar/bundles/index.umd.js +3 -3
- package/components/navigation/navbar/fesm2022/index.mjs +3 -3
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/types/index.d.ts +1 -1
- package/components/navigation/popover/bundles/index.umd.js +4 -4
- package/components/navigation/popover/fesm2022/index.mjs +4 -4
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/types/index.d.ts +4 -4
- package/components/page/default/bundles/index.umd.js +23 -23
- package/components/page/default/fesm2022/index.mjs +23 -23
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/default/types/index.d.ts +14 -14
- package/components/page/footer/bundles/index.umd.js +3 -3
- package/components/page/footer/fesm2022/index.mjs +3 -3
- package/components/page/footer/fesm2022/index.mjs.map +1 -1
- package/components/page/footer/types/index.d.ts +1 -1
- package/components/page/header/bundles/index.umd.js +3 -3
- package/components/page/header/fesm2022/index.mjs +3 -3
- package/components/page/header/fesm2022/index.mjs.map +1 -1
- package/components/page/header/types/index.d.ts +1 -1
- package/components/page/left-panel/bundles/index.umd.js +5 -5
- package/components/page/left-panel/fesm2022/index.mjs +5 -5
- package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/left-panel/types/index.d.ts +3 -3
- package/components/page/right-panel/bundles/index.umd.js +3 -3
- package/components/page/right-panel/fesm2022/index.mjs +3 -3
- package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/right-panel/types/index.d.ts +1 -1
- package/components/page/top-nav/bundles/index.umd.js +3 -3
- package/components/page/top-nav/fesm2022/index.mjs +3 -3
- package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
- package/components/page/top-nav/types/index.d.ts +1 -1
- package/components/prefab/bundles/index.umd.js +7 -7
- package/components/prefab/fesm2022/index.mjs +7 -7
- package/components/prefab/fesm2022/index.mjs.map +1 -1
- package/components/prefab/types/index.d.ts +3 -3
- package/core/bundles/index.umd.js +84 -89
- package/core/fesm2022/index.mjs +84 -89
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/types/index.d.ts +11 -11
- package/http/bundles/index.umd.js +6 -6
- package/http/fesm2022/index.mjs +6 -6
- package/http/fesm2022/index.mjs.map +1 -1
- package/http/types/index.d.ts +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/bundles/index.umd.js +17 -21
- package/oAuth/fesm2022/index.mjs +17 -21
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/oAuth/types/index.d.ts +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +253 -275
- package/runtime/base/fesm2022/index.mjs +253 -275
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +90 -96
- package/runtime/dynamic/bundles/index.umd.js +28 -28
- package/runtime/dynamic/fesm2022/index.mjs +28 -28
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/runtime/dynamic/types/index.d.ts +22 -22
- package/scripts/datatable/datatable.js +293 -271
- package/scripts/tree-keyboard-navigation/keyboard-navigation.js +68 -56
- package/security/bundles/index.umd.js +6 -6
- package/security/fesm2022/index.mjs +6 -6
- package/security/fesm2022/index.mjs.map +1 -1
- package/security/types/index.d.ts +5 -5
- package/transpiler/bundles/index.umd.js +3 -5
- package/transpiler/fesm2022/index.mjs +3 -5
- package/transpiler/fesm2022/index.mjs.map +1 -1
- package/variables/bundles/index.umd.js +69 -71
- package/variables/fesm2022/index.mjs +69 -72
- package/variables/fesm2022/index.mjs.map +1 -1
- package/variables/types/index.d.ts +9 -9
|
@@ -4,7 +4,8 @@ import { DecimalPipe, DatePipe } from '@angular/common';
|
|
|
4
4
|
import { CustomPipeManager, App, AbstractI18nService, PartialRefProvider, CustomWidgetRefProvider, Viewport, IDGenerator } from '@wm/core';
|
|
5
5
|
import * as _wavemaker_focus_trap from '@wavemaker/focus-trap';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
7
|
-
import
|
|
7
|
+
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
8
|
+
import { EventManager, DomSanitizer, SafeValue, SafeHtml } from '@angular/platform-browser';
|
|
8
9
|
import * as lodash from 'lodash';
|
|
9
10
|
import { SwipeAnimation } from '@swipey';
|
|
10
11
|
|
|
@@ -190,7 +191,7 @@ declare function applyFilterOnField(dataSource: any, filterDef: any, formFields:
|
|
|
190
191
|
declare function transformData(dataObject: any, variableName: any): any;
|
|
191
192
|
|
|
192
193
|
declare class WmPipe {
|
|
193
|
-
private pipeName;
|
|
194
|
+
private readonly pipeName;
|
|
194
195
|
protected customPipeManager: CustomPipeManager;
|
|
195
196
|
protected pipeRef: any;
|
|
196
197
|
protected isCustomPipe: any;
|
|
@@ -199,16 +200,16 @@ declare class WmPipe {
|
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
declare class TrailingZeroDecimalPipe implements PipeTransform {
|
|
202
|
-
private decimalPipe;
|
|
203
|
+
private readonly decimalPipe;
|
|
203
204
|
transform(value: any, selectedLocale: string, numberfilter: string, localefilter: any, trailingzero: boolean, decimalValue: string, skipTrailingZeroCheck?: boolean, formattedLocale?: any): any;
|
|
204
205
|
constructor(decimalPipe: DecimalPipe);
|
|
205
206
|
static ɵfac: i0.ɵɵFactoryDeclaration<TrailingZeroDecimalPipe, never>;
|
|
206
207
|
static ɵpipe: i0.ɵɵPipeDeclaration<TrailingZeroDecimalPipe, "trailingZeroDecimalPipe", true>;
|
|
207
208
|
}
|
|
208
209
|
declare class ToDatePipe extends WmPipe implements PipeTransform {
|
|
209
|
-
private datePipe;
|
|
210
|
-
private i18nService;
|
|
211
|
-
private app;
|
|
210
|
+
private readonly datePipe;
|
|
211
|
+
private readonly i18nService;
|
|
212
|
+
private readonly app;
|
|
212
213
|
protected customPipeManager: CustomPipeManager;
|
|
213
214
|
returnFn(data: any, args: any, variables: any): any;
|
|
214
215
|
transform(data: any, format: any, timezone?: any, compInstance?: any): any;
|
|
@@ -217,16 +218,16 @@ declare class ToDatePipe extends WmPipe implements PipeTransform {
|
|
|
217
218
|
static ɵpipe: i0.ɵɵPipeDeclaration<ToDatePipe, "toDate", true>;
|
|
218
219
|
}
|
|
219
220
|
declare class ToNumberPipe implements PipeTransform {
|
|
220
|
-
private decimalPipe;
|
|
221
|
-
private i18nService;
|
|
221
|
+
private readonly decimalPipe;
|
|
222
|
+
private readonly i18nService;
|
|
222
223
|
transform(data: any, fracSize: any): string;
|
|
223
224
|
constructor(decimalPipe: DecimalPipe, i18nService: AbstractI18nService);
|
|
224
225
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToNumberPipe, never>;
|
|
225
226
|
static ɵpipe: i0.ɵɵPipeDeclaration<ToNumberPipe, "toNumber", true>;
|
|
226
227
|
}
|
|
227
228
|
declare class ToCurrencyPipe implements PipeTransform {
|
|
228
|
-
private decimalPipe;
|
|
229
|
-
private i18nService;
|
|
229
|
+
private readonly decimalPipe;
|
|
230
|
+
private readonly i18nService;
|
|
230
231
|
transform(data: any, currencySymbol: any, fracSize: any): string;
|
|
231
232
|
constructor(decimalPipe: DecimalPipe, i18nService: AbstractI18nService);
|
|
232
233
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToCurrencyPipe, never>;
|
|
@@ -246,8 +247,8 @@ declare class SuffixPipe implements PipeTransform {
|
|
|
246
247
|
* Custom pipe: It is work as interceptor between the user custom pipe function and angular pipe
|
|
247
248
|
*/
|
|
248
249
|
declare class CustomPipe implements PipeTransform {
|
|
249
|
-
private app;
|
|
250
|
-
private custmeUserPipe;
|
|
250
|
+
private readonly app;
|
|
251
|
+
private readonly custmeUserPipe;
|
|
251
252
|
constructor(app: App, custmeUserPipe: CustomPipeManager);
|
|
252
253
|
transform(data: any, pipename: any): any;
|
|
253
254
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomPipe, never>;
|
|
@@ -536,7 +537,7 @@ declare abstract class BaseComponent implements OnDestroy, OnInit, AfterViewInit
|
|
|
536
537
|
/**
|
|
537
538
|
* Map of event handler callbacks
|
|
538
539
|
*/
|
|
539
|
-
private eventHandlers;
|
|
540
|
+
private readonly eventHandlers;
|
|
540
541
|
/**
|
|
541
542
|
* context of the widget
|
|
542
543
|
* when the widget is preset inside a repeater this context will have the repeater related properties
|
|
@@ -561,10 +562,10 @@ declare abstract class BaseComponent implements OnDestroy, OnInit, AfterViewInit
|
|
|
561
562
|
* Holds the event registration functions.
|
|
562
563
|
* these functions needs to be executed after onViewInit
|
|
563
564
|
*/
|
|
564
|
-
private toBeSetupEventsQueue;
|
|
565
|
+
private readonly toBeSetupEventsQueue;
|
|
565
566
|
__cloneable__: boolean;
|
|
566
567
|
widgetProps: Map<string, any>;
|
|
567
|
-
private $attrs;
|
|
568
|
+
private readonly $attrs;
|
|
568
569
|
private isMuted;
|
|
569
570
|
viewContainerRef: ViewContainerRef;
|
|
570
571
|
viewParentApp: App;
|
|
@@ -824,10 +825,10 @@ declare abstract class DatasetAwareNavComponent extends StylableComponent implem
|
|
|
824
825
|
private binditemtarget;
|
|
825
826
|
private binduserrole;
|
|
826
827
|
private bindisactive;
|
|
827
|
-
private securityService;
|
|
828
|
+
private readonly securityService;
|
|
828
829
|
protected binditemid: string | null;
|
|
829
830
|
protected nodes$: Subject<unknown>;
|
|
830
|
-
private cancelLocaleChangeSubscription;
|
|
831
|
+
private readonly cancelLocaleChangeSubscription;
|
|
831
832
|
constructor(inj: Injector, WIDGET_CONFIG: any, explicitContext: any);
|
|
832
833
|
/**
|
|
833
834
|
* constructs individual node for the widget model.
|
|
@@ -1008,9 +1009,9 @@ declare class PartialContainerDirective implements OnDestroy {
|
|
|
1008
1009
|
vcRef: ViewContainerRef;
|
|
1009
1010
|
elRef: ElementRef;
|
|
1010
1011
|
inj: Injector;
|
|
1011
|
-
private envInjector;
|
|
1012
|
-
private app;
|
|
1013
|
-
private partialRefProvider;
|
|
1012
|
+
private readonly envInjector;
|
|
1013
|
+
private readonly app;
|
|
1014
|
+
private readonly partialRefProvider;
|
|
1014
1015
|
private contentInitialized;
|
|
1015
1016
|
private $target;
|
|
1016
1017
|
private instanceRef;
|
|
@@ -1034,9 +1035,9 @@ declare class CustomWidgetContainerDirective implements OnDestroy {
|
|
|
1034
1035
|
vcRef: ViewContainerRef;
|
|
1035
1036
|
elRef: ElementRef;
|
|
1036
1037
|
inj: Injector;
|
|
1037
|
-
private envInjector;
|
|
1038
|
-
private app;
|
|
1039
|
-
private customWidgetRefProvider;
|
|
1038
|
+
private readonly envInjector;
|
|
1039
|
+
private readonly app;
|
|
1040
|
+
private readonly customWidgetRefProvider;
|
|
1040
1041
|
constructor(componentInstance: any, vcRef: ViewContainerRef, elRef: ElementRef, inj: Injector, envInjector: EnvironmentInjector, app: App, widgetname: string, customWidgetRefProvider: CustomWidgetRefProvider);
|
|
1041
1042
|
private loadCustomWidget;
|
|
1042
1043
|
ngOnDestroy(): void;
|
|
@@ -1048,10 +1049,10 @@ declare class BaseFieldValidations {
|
|
|
1048
1049
|
private hasValidators;
|
|
1049
1050
|
private instance;
|
|
1050
1051
|
formwidget: any;
|
|
1051
|
-
private widgettype;
|
|
1052
|
+
private readonly widgettype;
|
|
1052
1053
|
private widgetControl;
|
|
1053
1054
|
private widgetContext;
|
|
1054
|
-
private tableFieldType;
|
|
1055
|
+
private readonly tableFieldType;
|
|
1055
1056
|
private defaultValidatorMessages;
|
|
1056
1057
|
private _syncValidators;
|
|
1057
1058
|
private _asyncValidatorFn;
|
|
@@ -1085,8 +1086,8 @@ declare class BaseFieldValidations {
|
|
|
1085
1086
|
*/
|
|
1086
1087
|
|
|
1087
1088
|
declare class ItemTemplateDirective extends StylableComponent implements OnInit, OnDestroy {
|
|
1088
|
-
private app;
|
|
1089
|
-
static initializeProps: void;
|
|
1089
|
+
private readonly app;
|
|
1090
|
+
static readonly initializeProps: void;
|
|
1090
1091
|
context: any;
|
|
1091
1092
|
content: any;
|
|
1092
1093
|
partialParams: any;
|
|
@@ -1103,14 +1104,14 @@ declare class ItemTemplateDirective extends StylableComponent implements OnInit,
|
|
|
1103
1104
|
}
|
|
1104
1105
|
|
|
1105
1106
|
declare class RepeatTemplateDirective extends StylableComponent {
|
|
1106
|
-
static initializeProps: void;
|
|
1107
|
+
static readonly initializeProps: void;
|
|
1107
1108
|
constructor(inj: Injector, explicitContext: any);
|
|
1108
1109
|
static ɵfac: i0.ɵɵFactoryDeclaration<RepeatTemplateDirective, [null, { optional: true; }]>;
|
|
1109
1110
|
static ɵdir: i0.ɵɵDirectiveDeclaration<RepeatTemplateDirective, "[wmRepeatTemplate]", ["repeatItemRef"], {}, {}, never, never, true, never>;
|
|
1110
1111
|
}
|
|
1111
1112
|
|
|
1112
1113
|
declare class MessageComponent extends StylableComponent {
|
|
1113
|
-
static initializeProps: void;
|
|
1114
|
+
static readonly initializeProps: void;
|
|
1114
1115
|
messageClass: string;
|
|
1115
1116
|
messageIconClass: string;
|
|
1116
1117
|
type: string;
|
|
@@ -1127,9 +1128,9 @@ declare class MessageComponent extends StylableComponent {
|
|
|
1127
1128
|
}
|
|
1128
1129
|
|
|
1129
1130
|
declare class PullToRefresh extends SwipeAnimation {
|
|
1130
|
-
private $el;
|
|
1131
|
-
private app;
|
|
1132
|
-
private onPullToRefresh;
|
|
1131
|
+
private readonly $el;
|
|
1132
|
+
private readonly app;
|
|
1133
|
+
private readonly onPullToRefresh;
|
|
1133
1134
|
private infoContainer;
|
|
1134
1135
|
private runAnimation;
|
|
1135
1136
|
private count;
|
|
@@ -1174,8 +1175,8 @@ declare class PullToRefresh extends SwipeAnimation {
|
|
|
1174
1175
|
}
|
|
1175
1176
|
|
|
1176
1177
|
declare class PartialDirective extends StylableComponent implements OnDestroy {
|
|
1177
|
-
private viewport;
|
|
1178
|
-
static initializeProps: void;
|
|
1178
|
+
private readonly viewport;
|
|
1179
|
+
static readonly initializeProps: void;
|
|
1179
1180
|
constructor(inj: Injector, viewport: Viewport, explicitContext: any);
|
|
1180
1181
|
private callback;
|
|
1181
1182
|
ngOnAttach(): void;
|
|
@@ -1291,7 +1292,7 @@ declare class DialogServiceImpl {
|
|
|
1291
1292
|
* @type {Map<any, any>}
|
|
1292
1293
|
* Ex Map[[dialogName, [[dialogScope, dialogRef]]]]
|
|
1293
1294
|
*/
|
|
1294
|
-
private dialogRefsCollection;
|
|
1295
|
+
private readonly dialogRefsCollection;
|
|
1295
1296
|
private appConfirmDialog;
|
|
1296
1297
|
constructor();
|
|
1297
1298
|
/**
|
|
@@ -1340,15 +1341,15 @@ declare class DialogServiceImpl {
|
|
|
1340
1341
|
}
|
|
1341
1342
|
|
|
1342
1343
|
declare class TrustAsPipe implements PipeTransform {
|
|
1343
|
-
private domSanitizer;
|
|
1344
|
+
private readonly domSanitizer;
|
|
1344
1345
|
constructor(domSanitizer: DomSanitizer);
|
|
1345
|
-
transform(content: string, context: string | SecurityContext): SafeHtml;
|
|
1346
|
+
transform(content: string, context: string | SecurityContext): _angular_platform_browser.SafeHtml;
|
|
1346
1347
|
static ɵfac: i0.ɵɵFactoryDeclaration<TrustAsPipe, never>;
|
|
1347
1348
|
static ɵpipe: i0.ɵɵPipeDeclaration<TrustAsPipe, "trustAs", true>;
|
|
1348
1349
|
}
|
|
1349
1350
|
|
|
1350
1351
|
declare class SanitizePipe implements PipeTransform {
|
|
1351
|
-
private domSanitizer;
|
|
1352
|
+
private readonly domSanitizer;
|
|
1352
1353
|
constructor(domSanitizer: DomSanitizer);
|
|
1353
1354
|
transform(content: string | SafeValue, context: string | SecurityContext): string;
|
|
1354
1355
|
static ɵfac: i0.ɵɵFactoryDeclaration<SanitizePipe, never>;
|
|
@@ -1363,7 +1364,7 @@ declare class ImagePipe implements PipeTransform {
|
|
|
1363
1364
|
|
|
1364
1365
|
declare class ContainerDirective extends BaseContainerComponent {
|
|
1365
1366
|
app?: App;
|
|
1366
|
-
static initializeProps: void;
|
|
1367
|
+
static readonly initializeProps: void;
|
|
1367
1368
|
isPrism: boolean;
|
|
1368
1369
|
constructor(inj: Injector, explicitContext?: any, app?: App);
|
|
1369
1370
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContainerDirective, [null, { optional: true; }, null]>;
|
|
@@ -1371,8 +1372,8 @@ declare class ContainerDirective extends BaseContainerComponent {
|
|
|
1371
1372
|
}
|
|
1372
1373
|
|
|
1373
1374
|
declare class LazyLoadDirective implements OnDestroy {
|
|
1374
|
-
private templateRef;
|
|
1375
|
-
private viewContainer;
|
|
1375
|
+
private readonly templateRef;
|
|
1376
|
+
private readonly viewContainer;
|
|
1376
1377
|
private readonly viewParent;
|
|
1377
1378
|
private context;
|
|
1378
1379
|
private embeddedView;
|
|
@@ -1385,7 +1386,7 @@ declare class LazyLoadDirective implements OnDestroy {
|
|
|
1385
1386
|
}
|
|
1386
1387
|
|
|
1387
1388
|
declare class PartialParamHandlerDirective implements OnDestroy {
|
|
1388
|
-
private widgetRef;
|
|
1389
|
+
private readonly widgetRef;
|
|
1389
1390
|
constructor(widgetRef: any);
|
|
1390
1391
|
registerParams(name: string, value: string, bindExpr: string, type: string): void;
|
|
1391
1392
|
ngOnDestroy(): void;
|
|
@@ -1395,7 +1396,7 @@ declare class PartialParamHandlerDirective implements OnDestroy {
|
|
|
1395
1396
|
declare class PartialParamDirective implements OnInit {
|
|
1396
1397
|
bindValue: any;
|
|
1397
1398
|
type: any;
|
|
1398
|
-
private partialParamsProvider;
|
|
1399
|
+
private readonly partialParamsProvider;
|
|
1399
1400
|
name: string;
|
|
1400
1401
|
value: any;
|
|
1401
1402
|
constructor(bindValue: any, type: any, partialParamsProvider: PartialParamHandlerDirective);
|
|
@@ -1405,7 +1406,7 @@ declare class PartialParamDirective implements OnInit {
|
|
|
1405
1406
|
}
|
|
1406
1407
|
|
|
1407
1408
|
declare class TextContentDirective {
|
|
1408
|
-
private elRef;
|
|
1409
|
+
private readonly elRef;
|
|
1409
1410
|
set textContent(nv: any);
|
|
1410
1411
|
constructor(elRef: ElementRef);
|
|
1411
1412
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextContentDirective, never>;
|
|
@@ -1413,8 +1414,8 @@ declare class TextContentDirective {
|
|
|
1413
1414
|
}
|
|
1414
1415
|
|
|
1415
1416
|
declare class ShowInDeviceDirective implements OnDestroy {
|
|
1416
|
-
private viewContainerRef;
|
|
1417
|
-
private templateRef;
|
|
1417
|
+
private readonly viewContainerRef;
|
|
1418
|
+
private readonly templateRef;
|
|
1418
1419
|
private context;
|
|
1419
1420
|
private devices;
|
|
1420
1421
|
private embeddedView;
|
|
@@ -171,12 +171,12 @@
|
|
|
171
171
|
}
|
|
172
172
|
super.ngOnDestroy();
|
|
173
173
|
}
|
|
174
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
175
|
-
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
174
|
+
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: AnchorComponent, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace.App }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
175
|
+
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: AnchorComponent, isStandalone: true, selector: "a[wmAnchor]", host: { properties: { "target": "this.target", "attr.accesskey": "this.shortcutkey", "attr.icon-position": "this.iconposition" } }, providers: [
|
|
176
176
|
base.provideAsWidgetRef(AnchorComponent)
|
|
177
177
|
], exportAs: ["wmAnchor"], usesInheritance: true, ngImport: i0__namespace, template: "\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n", dependencies: [{ kind: "ngmodule", type: common.CommonModule }, { kind: "directive", type: base.TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: base.WmAppIconComponent, selector: "wm-app-icon", inputs: ["icon", "iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
178
178
|
}
|
|
179
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
179
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: AnchorComponent, decorators: [{
|
|
180
180
|
type: i0.Component,
|
|
181
181
|
args: [{ standalone: true, imports: [common.CommonModule, base.TextContentDirective, base.WmAppIconComponent], selector: 'a[wmAnchor]', providers: [
|
|
182
182
|
base.provideAsWidgetRef(AnchorComponent)
|
|
@@ -152,12 +152,12 @@ class AnchorComponent extends StylableComponent {
|
|
|
152
152
|
}
|
|
153
153
|
super.ngOnDestroy();
|
|
154
154
|
}
|
|
155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
156
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: AnchorComponent, deps: [{ token: i0.Injector }, { token: i1.App }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
156
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: AnchorComponent, isStandalone: true, selector: "a[wmAnchor]", host: { properties: { "target": "this.target", "attr.accesskey": "this.shortcutkey", "attr.icon-position": "this.iconposition" } }, providers: [
|
|
157
157
|
provideAsWidgetRef(AnchorComponent)
|
|
158
158
|
], exportAs: ["wmAnchor"], usesInheritance: true, ngImport: i0, template: "\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["icon", "iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
159
159
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: AnchorComponent, decorators: [{
|
|
161
161
|
type: Component,
|
|
162
162
|
args: [{ standalone: true, imports: [CommonModule, TextContentDirective, WmAppIconComponent], selector: 'a[wmAnchor]', providers: [
|
|
163
163
|
provideAsWidgetRef(AnchorComponent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/anchor/src/anchor.props.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.html","../../../../../projects/components/widgets/basic/anchor/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-anchor',\n new Map(\n [\n ['animation', PROP_STRING],\n ['badgevalue', PROP_STRING],\n ['caption', {value: 'Link', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['encodeurl', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['hyperlink', {value: '', ...PROP_STRING}],\n ['iconclass', PROP_STRING],\n ['iconheight', PROP_STRING],\n ['iconmargin', PROP_STRING],\n ['iconposition', PROP_STRING],\n ['iconurl', PROP_STRING],\n ['iconwidth', PROP_STRING],\n ['name', PROP_STRING],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['target', {value: '_self', ...PROP_STRING}]\n ]\n )\n );\n};\n","import { CommonModule } from '@angular/common';\nimport {AfterViewInit, Component, HostBinding, Inject, Injector, OnDestroy, Optional} from '@angular/core';\n\nimport {\n addClass,\n App,\n encodeUrl,\n EventNotifier,\n getRouteNameFromLink,\n removeAttr,\n removeClass,\n setAttr\n} from '@wm/core';\nimport {DISPLAY_TYPE, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TextContentDirective, WmAppIconComponent} from '@wm/components/base';\n\nimport {registerProps} from './anchor.props'; \n\nconst DEFAULT_CLS = 'app-anchor';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-anchor',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\nconst regex = /Actions.goToPage_(\\w+)\\.invoke\\(\\)/g;\nexport const disableContextMenu = ($event: Event) => {\n $event.preventDefault();\n};\n\n@Component({\n standalone: true,\n imports: [CommonModule, TextContentDirective, WmAppIconComponent],\n selector: 'a[wmAnchor]',\n templateUrl: './anchor.component.html',\n providers: [\n provideAsWidgetRef(AnchorComponent)\n ],\n exportAs: 'wmAnchor'\n})\nexport class AnchorComponent extends StylableComponent implements AfterViewInit, OnDestroy {\n static initializeProps = registerProps();\n\n private hasNavigationToCurrentPageExpr: boolean;\n private hasGoToPageExpr: boolean;\n private goToPageName: string;\n private cancelSubscription: any;\n\n public encodeurl;\n public hyperlink;\n public iconheight: string;\n public iconwidth: string;\n public iconmargin: string;\n public iconurl: string;\n public iconclass: string;\n public caption: any;\n public badgevalue: string;\n public arialabel: string;\n\n @HostBinding('target') target: string;\n @HostBinding('attr.accesskey') shortcutkey: string;\n @HostBinding('attr.icon-position') iconposition: string;\n private _eventNotifier = new EventNotifier();\n\n constructor(\n inj: Injector,\n private app: App,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n\n protected processEventAttr(eventName: string, expr: string, meta?: string) {\n\n super.processEventAttr(eventName, expr, meta);\n\n if (!this.hasNavigationToCurrentPageExpr) {\n const app = this.inj.get(App);\n const fns = expr.split(';').map(Function.prototype.call, String.prototype.trim);\n if (fns.some(fn => {\n regex.lastIndex = 0;\n const matches = regex.exec(fn);\n\n const hasGoToPageExpr = matches && (matches.length > 0);\n if(hasGoToPageExpr && !this.hasGoToPageExpr) {\n this.hasGoToPageExpr = true;\n this.goToPageName = matches[1];\n }\n\n return hasGoToPageExpr && matches[1] === app.activePageName;\n })) {\n this.hasNavigationToCurrentPageExpr = true;\n }\n }\n }\n\n public onActive(callback: (data: any) =>void) {\n this._eventNotifier.subscribe('on-active', callback);\n }\n\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any, meta?: string) {\n super.handleEvent(\n node,\n eventName,\n e => {\n if (this.hasGoToPageExpr && locals.$event) {\n locals.$event.preventDefault();\n }\n eventCallback();\n },\n locals,\n meta\n );\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'hyperlink') {\n if (!nv) {\n setAttr(this.nativeElement, 'href', 'javascript:void(0)');\n this.nativeElement.addEventListener('contextmenu', disableContextMenu);\n return;\n }\n if (this.encodeurl) {\n nv = encodeUrl(nv);\n }\n // if hyperlink starts with 'www.' append '//' in the beginning\n if (nv.startsWith('www.')) {\n nv = `//${nv}`;\n }\n setAttr(this.nativeElement, 'href', nv);\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n init() {\n if (this.hasNavigationToCurrentPageExpr) {\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n if (this.hyperlink && getRouteNameFromLink(this.hyperlink) === `/${this.app.activePageName}`\n || this.hasNavigationToCurrentPageExpr) {\n this._eventNotifier.notify(\"on-active\", {});\n }\n }\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.init();\n if(this.hasGoToPageExpr) {\n // Clean up any existing subscription before creating a new one\n if (this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // In SPA, it highlights active page link when we navigate within the same layout\n this.cancelSubscription = this.app.subscribe(\"highlightActiveLink\", (data) => {\n if(this.hasNavigationToCurrentPageExpr && this.goToPageName !== this.app.activePageName) {\n this.hasNavigationToCurrentPageExpr = false;\n removeClass(this.nativeElement, 'active');\n removeAttr(this.nativeElement, 'aria-current');\n }\n if (this.goToPageName === data.pageName) {\n this.hasNavigationToCurrentPageExpr = true;\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n });\n }\n }\n\n ngOnAttach() {\n this.init();\n super.ngOnAttach();\n }\n\n public ngOnDestroy() {\n // Unsubscribe from app event first to prevent any callbacks during destruction\n if(this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // Destroy local event notifier\n this._eventNotifier.destroy();\n \n // Remove event listener if it exists\n if (this.nativeElement) {\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n }\n super.ngOnDestroy();\n }\n}\n","\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,WAAW,EACX,IAAI,GAAG,CACH;QACI,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,CAAC;QAC5C,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,WAAW,EAAE,YAAY,CAAC;QAC3B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,WAAW,EAAE,EAAC,KAAK,EAAE,EAAE,EAAE,GAAG,WAAW,EAAC,CAAC;QAC1C,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,cAAc,EAAE,WAAW,CAAC;QAC7B,CAAC,SAAS,EAAE,WAAW,CAAC;QACxB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,aAAa,EAAE,WAAW,CAAC;QAC5B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;QACxC,CAAC,UAAU,EAAE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bf,MAAM;2BAAC,kBAAkB;;0BAAG;;sBARhC,WAAW;uBAAC,QAAQ;;sBACpB,WAAW;uBAAC,gBAAgB;;sBAC5B,WAAW;uBAAC,oBAAoB;;;AE5DrC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/anchor/src/anchor.props.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.html","../../../../../projects/components/widgets/basic/anchor/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-anchor',\n new Map(\n [\n ['animation', PROP_STRING],\n ['badgevalue', PROP_STRING],\n ['caption', {value: 'Link', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['encodeurl', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['hyperlink', {value: '', ...PROP_STRING}],\n ['iconclass', PROP_STRING],\n ['iconheight', PROP_STRING],\n ['iconmargin', PROP_STRING],\n ['iconposition', PROP_STRING],\n ['iconurl', PROP_STRING],\n ['iconwidth', PROP_STRING],\n ['name', PROP_STRING],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['target', {value: '_self', ...PROP_STRING}]\n ]\n )\n );\n};\n","import { CommonModule } from '@angular/common';\nimport {AfterViewInit, Component, HostBinding, Inject, Injector, OnDestroy, Optional} from '@angular/core';\n\nimport {\n addClass,\n App,\n encodeUrl,\n EventNotifier,\n getRouteNameFromLink,\n removeAttr,\n removeClass,\n setAttr\n} from '@wm/core';\nimport {DISPLAY_TYPE, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TextContentDirective, WmAppIconComponent} from '@wm/components/base';\n\nimport {registerProps} from './anchor.props'; \n\nconst DEFAULT_CLS = 'app-anchor';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-anchor',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\nconst regex = /Actions.goToPage_(\\w+)\\.invoke\\(\\)/g;\nexport const disableContextMenu = ($event: Event) => {\n $event.preventDefault();\n};\n\n@Component({\n standalone: true,\n imports: [CommonModule, TextContentDirective, WmAppIconComponent],\n selector: 'a[wmAnchor]',\n templateUrl: './anchor.component.html',\n providers: [\n provideAsWidgetRef(AnchorComponent)\n ],\n exportAs: 'wmAnchor'\n})\nexport class AnchorComponent extends StylableComponent implements AfterViewInit, OnDestroy {\n static readonly initializeProps = registerProps();\n\n private hasNavigationToCurrentPageExpr: boolean;\n private hasGoToPageExpr: boolean;\n private goToPageName: string;\n private cancelSubscription: any;\n\n public encodeurl;\n public hyperlink;\n public iconheight: string;\n public iconwidth: string;\n public iconmargin: string;\n public iconurl: string;\n public iconclass: string;\n public caption: any;\n public badgevalue: string;\n public arialabel: string;\n\n @HostBinding('target') target: string;\n @HostBinding('attr.accesskey') shortcutkey: string;\n @HostBinding('attr.icon-position') iconposition: string;\n private readonly _eventNotifier = new EventNotifier();\n\n constructor(\n inj: Injector,\n private readonly app: App,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n\n protected processEventAttr(eventName: string, expr: string, meta?: string) {\n\n super.processEventAttr(eventName, expr, meta);\n\n if (!this.hasNavigationToCurrentPageExpr) {\n const app = this.inj.get(App);\n const fns = expr.split(';').map(Function.prototype.call, String.prototype.trim);\n if (fns.some(fn => {\n regex.lastIndex = 0;\n const matches = regex.exec(fn);\n\n const hasGoToPageExpr = matches && (matches.length > 0);\n if(hasGoToPageExpr && !this.hasGoToPageExpr) {\n this.hasGoToPageExpr = true;\n this.goToPageName = matches[1];\n }\n\n return hasGoToPageExpr && matches[1] === app.activePageName;\n })) {\n this.hasNavigationToCurrentPageExpr = true;\n }\n }\n }\n\n public onActive(callback: (data: any) =>void) {\n this._eventNotifier.subscribe('on-active', callback);\n }\n\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any, meta?: string) {\n super.handleEvent(\n node,\n eventName,\n e => {\n if (this.hasGoToPageExpr && locals.$event) {\n locals.$event.preventDefault();\n }\n eventCallback();\n },\n locals,\n meta\n );\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'hyperlink') {\n if (!nv) {\n setAttr(this.nativeElement, 'href', 'javascript:void(0)');\n this.nativeElement.addEventListener('contextmenu', disableContextMenu);\n return;\n }\n if (this.encodeurl) {\n nv = encodeUrl(nv);\n }\n // if hyperlink starts with 'www.' append '//' in the beginning\n if (nv.startsWith('www.')) {\n nv = `//${nv}`;\n }\n setAttr(this.nativeElement, 'href', nv);\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n init() {\n if (this.hasNavigationToCurrentPageExpr) {\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n if (this.hyperlink && getRouteNameFromLink(this.hyperlink) === `/${this.app.activePageName}`\n || this.hasNavigationToCurrentPageExpr) {\n this._eventNotifier.notify(\"on-active\", {});\n }\n }\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.init();\n if(this.hasGoToPageExpr) {\n // Clean up any existing subscription before creating a new one\n if (this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // In SPA, it highlights active page link when we navigate within the same layout\n this.cancelSubscription = this.app.subscribe(\"highlightActiveLink\", (data) => {\n if(this.hasNavigationToCurrentPageExpr && this.goToPageName !== this.app.activePageName) {\n this.hasNavigationToCurrentPageExpr = false;\n removeClass(this.nativeElement, 'active');\n removeAttr(this.nativeElement, 'aria-current');\n }\n if (this.goToPageName === data.pageName) {\n this.hasNavigationToCurrentPageExpr = true;\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n });\n }\n }\n\n ngOnAttach() {\n this.init();\n super.ngOnAttach();\n }\n\n public ngOnDestroy() {\n // Unsubscribe from app event first to prevent any callbacks during destruction\n if(this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // Destroy local event notifier\n this._eventNotifier.destroy();\n \n // Remove event listener if it exists\n if (this.nativeElement) {\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n }\n super.ngOnDestroy();\n }\n}\n","\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,WAAW,EACX,IAAI,GAAG,CACH;QACI,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,CAAC;QAC5C,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,WAAW,EAAE,YAAY,CAAC;QAC3B,CAAC,MAAM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YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,oBAAoB,mFAAE,kBAAkB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,WAAA,EAAA,SAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAQvD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,SAAS;iCACM,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,EAAA,QAAA,EACvD,aAAa,EAAA,SAAA,EAEZ;AACP,wBAAA,kBAAkB,CAAA,eAAA;AACrB,qBAAA,EAAA,QAAA,EACS,UAAU,EAAA,QAAA,EAAA,kjBAAA,EAAA;;0BA6Bf,MAAM;2BAAC,kBAAkB;;0BAAG;;sBARhC,WAAW;uBAAC,QAAQ;;sBACpB,WAAW;uBAAC,gBAAgB;;sBAC5B,WAAW;uBAAC,oBAAoB;;;AE5DrC;;AAEG;;;;"}
|
|
@@ -5,8 +5,8 @@ import { StylableComponent } from '@wm/components/base';
|
|
|
5
5
|
|
|
6
6
|
declare const disableContextMenu: ($event: Event) => void;
|
|
7
7
|
declare class AnchorComponent extends StylableComponent implements AfterViewInit, OnDestroy {
|
|
8
|
-
private app;
|
|
9
|
-
static initializeProps: void;
|
|
8
|
+
private readonly app;
|
|
9
|
+
static readonly initializeProps: void;
|
|
10
10
|
private hasNavigationToCurrentPageExpr;
|
|
11
11
|
private hasGoToPageExpr;
|
|
12
12
|
private goToPageName;
|
|
@@ -24,7 +24,7 @@ declare class AnchorComponent extends StylableComponent implements AfterViewInit
|
|
|
24
24
|
target: string;
|
|
25
25
|
shortcutkey: string;
|
|
26
26
|
iconposition: string;
|
|
27
|
-
private _eventNotifier;
|
|
27
|
+
private readonly _eventNotifier;
|
|
28
28
|
constructor(inj: Injector, app: App, explicitContext: any);
|
|
29
29
|
protected processEventAttr(eventName: string, expr: string, meta?: string): void;
|
|
30
30
|
onActive(callback: (data: any) => void): void;
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
super.onPropertyChange(key, nv, ov);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
65
|
-
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
64
|
+
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: AudioComponent, deps: [{ token: i0__namespace.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
65
|
+
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: AudioComponent, isStandalone: true, selector: "[wmAudio]", providers: [
|
|
66
66
|
base.provideAsWidgetRef(AudioComponent)
|
|
67
67
|
], usesInheritance: true, ngImport: i0__namespace, template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format | trustAs: 'resource'\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format | trustAs: 'resource'\">\n {{audiosupportmessage}}\n</audio>\n", dependencies: [{ kind: "pipe", type: base.TrustAsPipe, name: "trustAs" }] }); }
|
|
68
68
|
}
|
|
69
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
69
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: AudioComponent, decorators: [{
|
|
70
70
|
type: i0.Component,
|
|
71
71
|
args: [{ standalone: true, imports: [base.TrustAsPipe], selector: '[wmAudio]', providers: [
|
|
72
72
|
base.provideAsWidgetRef(AudioComponent)
|
|
@@ -40,12 +40,12 @@ class AudioComponent extends StylableComponent {
|
|
|
40
40
|
super.onPropertyChange(key, nv, ov);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: AudioComponent, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: AudioComponent, isStandalone: true, selector: "[wmAudio]", providers: [
|
|
45
45
|
provideAsWidgetRef(AudioComponent)
|
|
46
46
|
], usesInheritance: true, ngImport: i0, template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format | trustAs: 'resource'\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format | trustAs: 'resource'\">\n {{audiosupportmessage}}\n</audio>\n", dependencies: [{ kind: "pipe", type: TrustAsPipe, name: "trustAs" }] }); }
|
|
47
47
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: AudioComponent, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
50
|
args: [{ standalone: true, imports: [TrustAsPipe], selector: '[wmAudio]', providers: [
|
|
51
51
|
provideAsWidgetRef(AudioComponent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/audio/src/audio.props.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.html","../../../../../projects/components/widgets/basic/audio/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-audio',\n new Map(\n [\n ['audiopreload', {value: 'none', ...PROP_STRING}],\n ['audiosupportmessage', {value: 'Your browser does not support the audio tag.', ...PROP_STRING}],\n ['autoplay', PROP_BOOLEAN],\n ['class', PROP_STRING],\n ['controls', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['loop', PROP_BOOLEAN],\n ['mp3format', PROP_STRING],\n ['muted', PROP_BOOLEAN],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n )\n );\n};\n","import {Component, Inject, Injector, Optional} from '@angular/core';\n\nimport {DISPLAY_TYPE, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TrustAsPipe} from '@wm/components/base';\nimport {registerProps} from './audio.props';\n\nconst DEFAULT_CLS = 'app-audio';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-audio',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\n@Component({\n standalone: true,\n imports: [TrustAsPipe],\n selector: '[wmAudio]',\n templateUrl: './audio.component.html',\n providers: [\n provideAsWidgetRef(AudioComponent)\n ]\n})\nexport class AudioComponent extends StylableComponent {\n static initializeProps = registerProps();\n\n public mp3format: string;\n public muted: boolean;\n public controls: boolean;\n public loop: boolean;\n public audiopreload: any;\n public audiosupportmessage: any;\n public autoplay: boolean;\n public hint: string;\n public arialabel: string;\n public tabindex: string;\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n\n onPropertyChange(key, nv, ov) {\n if (key === 'tabindex') {\n return\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format | trustAs: 'resource'\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format | trustAs: 'resource'\">\n {{audiosupportmessage}}\n</audio>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,UAAU,EACV,IAAI,GAAG,CACH;QACI,CAAC,cAAc,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,CAAC;QACjD,CAAC,qBAAqB,EAAE,EAAC,KAAK,EAAE,8CAA8C,EAAE,GAAG,WAAW,EAAC,CAAC;QAChG,CAAC,UAAU,EAAE,YAAY,CAAC;QAC1B,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,UAAU,EAAE,YAAY,CAAC;QAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,MAAM,EAAE,YAAY,CAAC;QACtB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,OAAO,EAAE,YAAY,CAAC;QACvB,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;QACxC,CAAC,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,GAAG,WAAW,EAAC;AAC1C,KAAA,CACJ,CACJ;AACL,CAAC;;AClBD,MAAM,WAAW,GAAG,WAAW;AAC/B,MAAM,aAAa,GAAkB;AACjC,IAAA,UAAU,EAAE,UAAU;AACtB,IAAA,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,YAAY,CAAC;CAC7B;AAWK,MAAO,cAAe,SAAQ,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/audio/src/audio.props.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.html","../../../../../projects/components/widgets/basic/audio/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-audio',\n new Map(\n [\n ['audiopreload', {value: 'none', ...PROP_STRING}],\n ['audiosupportmessage', {value: 'Your browser does not support the audio tag.', ...PROP_STRING}],\n ['autoplay', PROP_BOOLEAN],\n ['class', PROP_STRING],\n ['controls', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['loop', PROP_BOOLEAN],\n ['mp3format', PROP_STRING],\n ['muted', PROP_BOOLEAN],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n )\n );\n};\n","import {Component, Inject, Injector, Optional} from '@angular/core';\n\nimport {DISPLAY_TYPE, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TrustAsPipe} from '@wm/components/base';\nimport {registerProps} from './audio.props';\n\nconst DEFAULT_CLS = 'app-audio';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-audio',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\n@Component({\n standalone: true,\n imports: [TrustAsPipe],\n selector: '[wmAudio]',\n templateUrl: './audio.component.html',\n providers: [\n provideAsWidgetRef(AudioComponent)\n ]\n})\nexport class AudioComponent extends StylableComponent {\n static readonly initializeProps = registerProps();\n\n public mp3format: string;\n public muted: boolean;\n public controls: boolean;\n public loop: boolean;\n public audiopreload: any;\n public audiosupportmessage: any;\n public autoplay: boolean;\n public hint: string;\n public arialabel: string;\n public tabindex: string;\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n\n onPropertyChange(key, nv, ov) {\n if (key === 'tabindex') {\n return\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format | trustAs: 'resource'\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format | trustAs: 'resource'\">\n {{audiosupportmessage}}\n</audio>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,UAAU,EACV,IAAI,GAAG,CACH;QACI,CAAC,cAAc,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,CAAC;QACjD,CAAC,qBAAqB,EAAE,EAAC,KAAK,EAAE,8CAA8C,EAAE,GAAG,WAAW,EAAC,CAAC;QAChG,CAAC,UAAU,EAAE,YAAY,CAAC;QAC1B,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,UAAU,EAAE,YAAY,CAAC;QAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B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AA,CAAA;AAd5C,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,SAAA,EAJZ;YACP,kBAAkB,CAAC,cAAc;SACpC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBL,6YAMA,uCDQc,WAAW,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAOZ,cAAc,EAAA,UAAA,EAAA,CAAA;kBAT1B,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,WACP,CAAC,WAAW,CAAC,EAAA,QAAA,EACZ,WAAW,EAAA,SAAA,EAEV;AACP,wBAAA,kBAAkB,CAAA,cAAA;AACrB,qBAAA,EAAA,QAAA,EAAA,6YAAA,EAAA;;0BAgB2B,MAAM;2BAAC,kBAAkB;;0BAAG;;;AEnC5D;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { Injector } from '@angular/core';
|
|
|
3
3
|
import { StylableComponent } from '@wm/components/base';
|
|
4
4
|
|
|
5
5
|
declare class AudioComponent extends StylableComponent {
|
|
6
|
-
static initializeProps: void;
|
|
6
|
+
static readonly initializeProps: void;
|
|
7
7
|
mp3format: string;
|
|
8
8
|
muted: boolean;
|
|
9
9
|
controls: boolean;
|
|
@@ -74,27 +74,26 @@
|
|
|
74
74
|
if (typeof nv === 'object' && safeValue) {
|
|
75
75
|
core.setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
76
76
|
}
|
|
77
|
+
else
|
|
78
|
+
// Guard against sanitizePipe being null/undefined
|
|
79
|
+
if (this.sanitizePipe) {
|
|
80
|
+
core.setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(nv, i0.SecurityContext.HTML));
|
|
81
|
+
}
|
|
77
82
|
else {
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
core.setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(nv, i0.SecurityContext.HTML));
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
// Fallback to textContent if sanitizePipe is not available
|
|
84
|
-
core.setProperty(this.nativeElement, 'textContent', nv);
|
|
85
|
-
}
|
|
83
|
+
// Fallback to textContent if sanitizePipe is not available
|
|
84
|
+
core.setProperty(this.nativeElement, 'textContent', nv);
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
else {
|
|
89
88
|
super.onPropertyChange(key, nv, ov);
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
93
|
-
static { this.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
91
|
+
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: HtmlDirective, deps: [{ token: i0__namespace.Injector }, { token: 'height', attribute: true }, { token: 'content.bind', attribute: true }, { token: i1__namespace.SanitizePipe }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive }); }
|
|
92
|
+
static { this.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: HtmlDirective, isStandalone: true, selector: "[wmHtml]", providers: [
|
|
94
93
|
i1.provideAsWidgetRef(HtmlDirective)
|
|
95
94
|
], exportAs: ["wmHtml"], usesInheritance: true, ngImport: i0__namespace }); }
|
|
96
95
|
}
|
|
97
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
96
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: HtmlDirective, decorators: [{
|
|
98
97
|
type: i0.Directive,
|
|
99
98
|
args: [{
|
|
100
99
|
standalone: true,
|
|
@@ -54,27 +54,26 @@ class HtmlDirective extends StylableComponent {
|
|
|
54
54
|
if (typeof nv === 'object' && safeValue) {
|
|
55
55
|
setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
56
56
|
}
|
|
57
|
+
else
|
|
58
|
+
// Guard against sanitizePipe being null/undefined
|
|
59
|
+
if (this.sanitizePipe) {
|
|
60
|
+
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(nv, SecurityContext.HTML));
|
|
61
|
+
}
|
|
57
62
|
else {
|
|
58
|
-
//
|
|
59
|
-
|
|
60
|
-
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(nv, SecurityContext.HTML));
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
// Fallback to textContent if sanitizePipe is not available
|
|
64
|
-
setProperty(this.nativeElement, 'textContent', nv);
|
|
65
|
-
}
|
|
63
|
+
// Fallback to textContent if sanitizePipe is not available
|
|
64
|
+
setProperty(this.nativeElement, 'textContent', nv);
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
else {
|
|
69
68
|
super.onPropertyChange(key, nv, ov);
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
73
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: HtmlDirective, deps: [{ token: i0.Injector }, { token: 'height', attribute: true }, { token: 'content.bind', attribute: true }, { token: i1.SanitizePipe }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
72
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: HtmlDirective, isStandalone: true, selector: "[wmHtml]", providers: [
|
|
74
73
|
provideAsWidgetRef(HtmlDirective)
|
|
75
74
|
], exportAs: ["wmHtml"], usesInheritance: true, ngImport: i0 }); }
|
|
76
75
|
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: HtmlDirective, decorators: [{
|
|
78
77
|
type: Directive,
|
|
79
78
|
args: [{
|
|
80
79
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/html/src/html.props.ts","../../../../../projects/components/widgets/basic/html/src/html.directive.ts","../../../../../projects/components/widgets/basic/html/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-html',\n new Map(\n [\n ['class', PROP_STRING],\n ['content', PROP_STRING],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Attribute, Directive, Inject, Injector, OnInit, Optional, SecurityContext} from '@angular/core';\n\nimport {setCSS, setProperty} from '@wm/core';\nimport { IWidgetConfig, provideAsWidgetRef, SanitizePipe, StylableComponent, styler } from '@wm/components/base';\n\nimport { registerProps } from './html.props';\n\nconst DEFAULT_CLS = 'app-html-container';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-html',\n hostClass: DEFAULT_CLS\n};\n\n@Directive({\n standalone: true,\n selector: '[wmHtml]',\n providers: [\n provideAsWidgetRef(HtmlDirective)\n ],\n exportAs: 'wmHtml'\n})\nexport class HtmlDirective extends StylableComponent implements OnInit {\n static initializeProps = registerProps();\n public content: string;\n\n constructor(\n inj: Injector,\n @Attribute('height') height: string,\n @Attribute('content.bind') private boundContent: string,\n private sanitizePipe:SanitizePipe,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n // if the height is provided set the overflow to auto\n if (height) {\n setCSS(this.nativeElement, 'overflow', 'auto');\n }\n\n styler(this.nativeElement, this);\n }\n\n ngOnInit() {\n super.ngOnInit();\n if (this.boundContent) {\n this.nativeElement.innerHTML = '';\n }\n if (!this.content && this.nativeElement.innerHTML) {\n this.content = this.nativeElement.innerHTML;\n }\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n // Guard against property changes after component destruction\n // This can happen when property changes are queued asynchronously\n if (this.isDestroyed) {\n return;\n }\n\n if (key === 'content') {\n // Check for trustPipe safe values\n let bindContent = this.nativeElement.getAttribute('content.bind');\n let safeValue = bindContent ? nv && bindContent.includes('trustAs:') : false;\n if (typeof nv === 'object' && safeValue) {\n setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);\n } else
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/html/src/html.props.ts","../../../../../projects/components/widgets/basic/html/src/html.directive.ts","../../../../../projects/components/widgets/basic/html/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-html',\n new Map(\n [\n ['class', PROP_STRING],\n ['content', PROP_STRING],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Attribute, Directive, Inject, Injector, OnInit, Optional, SecurityContext} from '@angular/core';\n\nimport {setCSS, setProperty} from '@wm/core';\nimport { IWidgetConfig, provideAsWidgetRef, SanitizePipe, StylableComponent, styler } from '@wm/components/base';\n\nimport { registerProps } from './html.props';\n\nconst DEFAULT_CLS = 'app-html-container';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-html',\n hostClass: DEFAULT_CLS\n};\n\n@Directive({\n standalone: true,\n selector: '[wmHtml]',\n providers: [\n provideAsWidgetRef(HtmlDirective)\n ],\n exportAs: 'wmHtml'\n})\nexport class HtmlDirective extends StylableComponent implements OnInit {\n static readonly initializeProps = registerProps();\n public content: string;\n\n constructor(\n inj: Injector,\n @Attribute('height') height: string,\n @Attribute('content.bind') private readonly boundContent: string,\n private readonly sanitizePipe:SanitizePipe,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n // if the height is provided set the overflow to auto\n if (height) {\n setCSS(this.nativeElement, 'overflow', 'auto');\n }\n\n styler(this.nativeElement, this);\n }\n\n ngOnInit() {\n super.ngOnInit();\n if (this.boundContent) {\n this.nativeElement.innerHTML = '';\n }\n if (!this.content && this.nativeElement.innerHTML) {\n this.content = this.nativeElement.innerHTML;\n }\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n // Guard against property changes after component destruction\n // This can happen when property changes are queued asynchronously\n if (this.isDestroyed) {\n return;\n }\n\n if (key === 'content') {\n // Check for trustPipe safe values\n let bindContent = this.nativeElement.getAttribute('content.bind');\n let safeValue = bindContent ? nv && bindContent.includes('trustAs:') : false;\n if (typeof nv === 'object' && safeValue) {\n setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);\n } else \n // Guard against sanitizePipe being null/undefined\n if (this.sanitizePipe) {\n setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(nv, SecurityContext.HTML));\n } else {\n // Fallback to textContent if sanitizePipe is not available\n setProperty(this.nativeElement, 'textContent', nv);\n }\n \n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,SAAS,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