@morozeckiy/dd-lib 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/assets/fonts/ALS_Sirius_Bold_0.95.otf +0 -0
- package/assets/fonts/ALS_Sirius_Medium_1.6.otf +0 -0
- package/assets/fonts/ALS_Sirius_Regular_0.95.otf +0 -0
- package/assets/images/benefactors/cheese-king.svg +17 -0
- package/assets/images/benefactors/circle-dot.svg +15 -0
- package/assets/images/benefactors/grid-dots.svg +36 -0
- package/assets/images/benefactors/steam.svg +29 -0
- package/assets/images/claim-create/paperclip.svg +12 -0
- package/assets/images/footer/appgalery.svg +32 -0
- package/assets/images/footer/appstore.svg +26 -0
- package/assets/images/footer/google-app.svg +28 -0
- package/assets/images/footer/rustore.svg +35 -0
- package/assets/images/header/badges.svg +13 -0
- package/assets/images/header/benefactors.svg +21 -0
- package/assets/images/header/burger.svg +12 -0
- package/assets/images/header/chart-bar.svg +19 -0
- package/assets/images/header/checkbox.svg +13 -0
- package/assets/images/header/crane.svg +15 -0
- package/assets/images/header/districts.svg +16 -0
- package/assets/images/header/grid.svg +13 -0
- package/assets/images/header/info-circle.svg +14 -0
- package/assets/images/header/info.svg +14 -0
- package/assets/images/header/logo.svg +61 -0
- package/assets/images/header/moneybag.svg +15 -0
- package/assets/images/header/moon.svg +12 -0
- package/assets/images/header/news.svg +15 -0
- package/assets/images/header/project/dd-m.svg +11 -0
- package/assets/images/header/project/dd.svg +29 -0
- package/assets/images/header/project/eds-m.svg +31 -0
- package/assets/images/header/project/eds.svg +84 -0
- package/assets/images/header/project/health-m.svg +45 -0
- package/assets/images/header/project/health.svg +115 -0
- package/assets/images/header/project/my-m.svg +80 -0
- package/assets/images/header/project/my.svg +141 -0
- package/assets/images/header/project/pgu-mo-m.svg +306 -0
- package/assets/images/header/project/pgu-mo.svg +586 -0
- package/assets/images/header/sun.svg +14 -0
- package/assets/images/header/trees.svg +18 -0
- package/assets/images/header/user.svg +15 -0
- package/assets/images/main/button-ok.svg +4 -0
- package/assets/images/main/button-tg.svg +12 -0
- package/assets/images/main/button-vk.svg +12 -0
- package/assets/images/main/check-list.svg +17 -0
- package/assets/images/main/minus.svg +10 -0
- package/assets/images/main/mobilr-qr.svg +9 -0
- package/assets/images/main/news-big.svg +18 -0
- package/assets/images/main/plus.svg +11 -0
- package/assets/images/main/rupor.svg +12 -0
- package/assets/images/main/shared-logo-d.svg +29 -0
- package/assets/images/main/shared-logo.svg +29 -0
- package/assets/images/main/solve-problem-exampe.svg +9 -0
- package/assets/images/main/users.svg +21 -0
- package/assets/images/profile/circle-no.svg +11 -0
- package/assets/images/profile/esia-icon.svg +5 -0
- package/assets/images/profile/set-avatar.svg +14 -0
- package/assets/images/svg/404.svg +12 -0
- package/assets/images/svg/actogone-accept.svg +4 -0
- package/assets/images/svg/arrow/all.svg +4 -0
- package/assets/images/svg/arrow/arrow-down-red.svg +12 -0
- package/assets/images/svg/arrow/arrow-up-green.svg +12 -0
- package/assets/images/svg/arrow/back-arrow.svg +11 -0
- package/assets/images/svg/arrow/down-chevron.svg +11 -0
- package/assets/images/svg/arrow/left-chevron.svg +10 -0
- package/assets/images/svg/arrow/next.svg +6 -0
- package/assets/images/svg/arrow/prev.svg +6 -0
- package/assets/images/svg/arrow/right-chevron.svg +10 -0
- package/assets/images/svg/calendar.svg +13 -0
- package/assets/images/svg/check-green.svg +10 -0
- package/assets/images/svg/check-white.svg +5 -0
- package/assets/images/svg/clear.svg +11 -0
- package/assets/images/svg/close.svg +11 -0
- package/assets/images/svg/dobrodel.svg +15 -0
- package/assets/images/svg/entry.svg +5 -0
- package/assets/images/svg/error-hint.svg +5 -0
- package/assets/images/svg/eye-off.svg +12 -0
- package/assets/images/svg/eye.svg +15 -0
- package/assets/images/svg/mail-exclamation.svg +13 -0
- package/assets/images/svg/not-found.svg +12 -0
- package/assets/images/svg/plug-d.svg +61 -0
- package/assets/images/svg/plug.svg +61 -0
- package/assets/images/svg/question-white-g.svg +14 -0
- package/assets/images/svg/question.svg +14 -0
- package/assets/images/svg/red-close.svg +11 -0
- package/assets/images/svg/search.svg +13 -0
- package/assets/images/svg/send.svg +13 -0
- package/assets/images/svg/small-round-loader.svg +19 -0
- package/assets/images/svg/sort.svg +15 -0
- package/assets/images/svg/star.svg +10 -0
- package/assets/images/svg/tg.svg +5 -0
- package/assets/images/svg/trash.svg +14 -0
- package/assets/images/svg/vk.svg +5 -0
- package/assets/images/toast/danger-t.svg +3 -0
- package/assets/images/toast/info-t.svg +3 -0
- package/assets/images/toast/success-t.svg +3 -0
- package/assets/images/toast/warning-t.svg +3 -0
- package/assets/images/user/award.svg +12 -0
- package/assets/images/user/bell.svg +11 -0
- package/assets/images/user/circles.svg +12 -0
- package/assets/images/user/is-esia.svg +4 -0
- package/assets/images/user/list-search.svg +14 -0
- package/assets/images/user/logout.svg +12 -0
- package/assets/images/user/news.svg +13 -0
- package/assets/images/user/pen-edit.svg +11 -0
- package/assets/images/user/user.svg +11 -0
- package/assets/images/users/trophy.svg +21 -0
- package/assets/images/users/user-empty.svg +12 -0
- package/assets/json/rating.json +881 -0
- package/assets/scss/common.scss +229 -0
- package/assets/scss/fonts.scss +23 -0
- package/assets/scss/mixins.scss +75 -0
- package/assets/scss/modal.scss +89 -0
- package/assets/scss/normalize.scss +417 -0
- package/assets/scss/offsets.scss +101 -0
- package/assets/scss/reset.scss +141 -0
- package/assets/scss/theme.scss +20 -0
- package/assets/scss/titles.scss +197 -0
- package/assets/scss/vars-dark.scss +135 -0
- package/assets/scss/vars-light.scss +135 -0
- package/assets/scss/vars.scss +4 -0
- package/assets/styles.scss +13 -0
- package/assets/svg-icons/build/my-icons.model.d.ts +5 -0
- package/assets/svg-icons/build/my-icons.model.mjs +2 -0
- package/assets/svg-icons/build/svgIcon-404.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-404.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-actogone-accept.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-actogone-accept.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-all.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-all.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-appgalery.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-appgalery.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-appstore.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-appstore.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-arrow-down-red.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-arrow-down-red.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-arrow-up-green.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-arrow-up-green.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-award.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-award.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-back-arrow.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-back-arrow.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-badges.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-badges.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-bell.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-bell.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-benefactors.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-benefactors.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-burger.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-burger.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-button-ok.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-button-ok.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-button-tg.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-button-tg.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-button-vk.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-button-vk.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-calendar.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-calendar.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-chart-bar.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-chart-bar.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-check-green.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-check-green.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-check-list.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-check-list.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-check-white.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-check-white.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-checkbox.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-checkbox.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-cheese-king.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-cheese-king.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-circle-dot.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-circle-dot.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-circle-no.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-circle-no.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-circles.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-circles.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-clear.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-clear.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-close.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-close.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-crane.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-crane.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-danger-t.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-danger-t.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-dd-m.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-dd-m.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-dd.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-dd.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-districts.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-districts.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-dobrodel.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-dobrodel.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-down-chevron.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-down-chevron.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-eds-m.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-eds-m.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-eds.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-eds.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-entry.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-entry.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-error-hint.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-error-hint.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-esia-icon.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-esia-icon.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-eye-off.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-eye-off.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-eye.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-eye.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-google-app.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-google-app.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-grid-dots.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-grid-dots.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-grid.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-grid.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-health-m.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-health-m.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-health.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-health.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-info-circle.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-info-circle.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-info-t.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-info-t.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-info.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-info.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-is-esia.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-is-esia.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-left-chevron.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-left-chevron.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-list-search.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-list-search.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-logo.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-logo.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-logout.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-logout.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-mail-exclamation.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-mail-exclamation.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-minus.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-minus.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-mobilr-qr.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-mobilr-qr.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-moneybag.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-moneybag.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-moon.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-moon.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-my-m.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-my-m.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-my.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-my.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-news-big.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-news-big.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-news.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-news.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-next.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-next.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-not-found.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-not-found.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-paperclip.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-paperclip.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-pen-edit.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-pen-edit.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-pgu-mo-m.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-pgu-mo-m.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-pgu-mo.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-pgu-mo.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-plug-d.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-plug-d.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-plug.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-plug.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-plus.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-plus.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-prev.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-prev.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-question-white-g.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-question-white-g.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-question.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-question.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-red-close.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-red-close.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-right-chevron.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-right-chevron.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-rupor.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-rupor.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-rustore.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-rustore.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-search.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-search.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-send.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-send.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-set-avatar.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-set-avatar.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-shared-logo-d.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-shared-logo-d.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-shared-logo.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-shared-logo.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-small-round-loader.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-small-round-loader.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-solve-problem-exampe.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-solve-problem-exampe.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-sort.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-sort.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-star.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-star.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-steam.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-steam.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-success-t.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-success-t.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-sun.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-sun.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-tg.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-tg.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-trash.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-trash.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-trees.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-trees.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-trophy.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-trophy.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-user-empty.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-user-empty.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-user.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-user.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-users.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-users.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-vk.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-vk.icon.mjs +5 -0
- package/assets/svg-icons/build/svgIcon-warning-t.icon.d.ts +4 -0
- package/assets/svg-icons/build/svgIcon-warning-t.icon.mjs +5 -0
- package/assets/svg-icons/index.d.ts +142 -0
- package/assets/svg-icons/index.mjs +141 -0
- package/assets/svg-icons/my-icons.model.ts +146 -0
- package/ekgip-dd-lib-0.0.1.tgz +0 -0
- package/ng-package.json +8 -0
- package/package.json +17 -0
- package/src/lib/common/lib-common-button.ts +34 -0
- package/src/lib/common/lib-common-input-text.ts +154 -0
- package/src/lib/core/dialog/dialog-config.ts +19 -0
- package/src/lib/core/dialog/dialog-container.component.ts +38 -0
- package/src/lib/core/dialog/dialog-ref.ts +28 -0
- package/src/lib/core/dialog/dialog.service.ts +144 -0
- package/src/lib/core/directives/auto-height.directive.ts +29 -0
- package/src/lib/core/directives/click-outside.directive.ts +33 -0
- package/src/lib/core/directives/counter.directive.ts +54 -0
- package/src/lib/core/directives/declension.directive.ts +29 -0
- package/src/lib/core/directives/resize-textarea.directive.ts +16 -0
- package/src/lib/core/directives/triangle.directive.ts +56 -0
- package/src/lib/core/index.ts +27 -0
- package/src/lib/core/pipes/filter-tabs.pipe.ts +25 -0
- package/src/lib/core/pipes/filter.pipe.ts +36 -0
- package/src/lib/core/pipes/highlight.pipe.ts +17 -0
- package/src/lib/core/pipes/reverse.pipe.ts +11 -0
- package/src/lib/core/pipes/safe.pipe.ts +37 -0
- package/src/lib/core/services/date.service.ts +153 -0
- package/src/lib/core/services/destroy.service.ts +10 -0
- package/src/lib/core/services/fetcher.service.ts +109 -0
- package/src/lib/core/services/interceptors.service.ts +26 -0
- package/src/lib/core/services/svg-icons.service.ts +25 -0
- package/src/lib/core/services/theme-constructor.service.ts +68 -0
- package/src/lib/core/services/validators.service.ts +73 -0
- package/src/lib/core/tools.ts +159 -0
- package/src/lib/core/tooltip/tooltip.component.html +10 -0
- package/src/lib/core/tooltip/tooltip.component.scss +59 -0
- package/src/lib/core/tooltip/tooltip.component.ts +27 -0
- package/src/lib/core/tooltip/tooltip.directive.ts +137 -0
- package/src/lib/core/utils.ts +28 -0
- package/src/lib/lib-accordion/lib-accordion.component.html +15 -0
- package/src/lib/lib-accordion/lib-accordion.component.scss +23 -0
- package/src/lib/lib-accordion/lib-accordion.component.ts +17 -0
- package/src/lib/lib-back-button/lib-back-button.component.html +4 -0
- package/src/lib/lib-back-button/lib-back-button.component.scss +3 -0
- package/src/lib/lib-back-button/lib-back-button.component.ts +31 -0
- package/src/lib/lib-button/lib-button.component.html +30 -0
- package/src/lib/lib-button/lib-button.component.scss +89 -0
- package/src/lib/lib-button/lib-button.component.ts +33 -0
- package/src/lib/lib-calendar/lib-calendar.component.html +64 -0
- package/src/lib/lib-calendar/lib-calendar.component.scss +88 -0
- package/src/lib/lib-calendar/lib-calendar.component.ts +227 -0
- package/src/lib/lib-card/lib-card.component.html +23 -0
- package/src/lib/lib-card/lib-card.component.scss +64 -0
- package/src/lib/lib-card/lib-card.component.ts +32 -0
- package/src/lib/lib-checkbox/lib-checkbox.component.html +15 -0
- package/src/lib/lib-checkbox/lib-checkbox.component.scss +80 -0
- package/src/lib/lib-checkbox/lib-checkbox.component.ts +67 -0
- package/src/lib/lib-comment-input/lib-comment-input.component.html +32 -0
- package/src/lib/lib-comment-input/lib-comment-input.component.scss +28 -0
- package/src/lib/lib-comment-input/lib-comment-input.component.ts +20 -0
- package/src/lib/lib-file-upload/lib-file-upload.component.html +14 -0
- package/src/lib/lib-file-upload/lib-file-upload.component.scss +3 -0
- package/src/lib/lib-file-upload/lib-file-upload.component.ts +26 -0
- package/src/lib/lib-filter-button/lib-filter-button.component.html +46 -0
- package/src/lib/lib-filter-button/lib-filter-button.component.scss +62 -0
- package/src/lib/lib-filter-button/lib-filter-button.component.ts +45 -0
- package/src/lib/lib-image-loader/lib-image-loader.component.html +17 -0
- package/src/lib/lib-image-loader/lib-image-loader.component.scss +6 -0
- package/src/lib/lib-image-loader/lib-image-loader.component.ts +16 -0
- package/src/lib/lib-input/lib-input.component.html +32 -0
- package/src/lib/lib-input/lib-input.component.scss +72 -0
- package/src/lib/lib-input/lib-input.component.ts +62 -0
- package/src/lib/lib-loader/lib-loader.component.html +29 -0
- package/src/lib/lib-loader/lib-loader.component.scss +26 -0
- package/src/lib/lib-loader/lib-loader.component.ts +13 -0
- package/src/lib/lib-period/lib-period.component.html +41 -0
- package/src/lib/lib-period/lib-period.component.scss +77 -0
- package/src/lib/lib-period/lib-period.component.ts +131 -0
- package/src/lib/lib-radio/lib-radio.component.html +22 -0
- package/src/lib/lib-radio/lib-radio.component.scss +113 -0
- package/src/lib/lib-radio/lib-radio.component.ts +78 -0
- package/src/lib/lib-search-input/lib-search-input.component.html +48 -0
- package/src/lib/lib-search-input/lib-search-input.component.scss +86 -0
- package/src/lib/lib-search-input/lib-search-input.component.ts +94 -0
- package/src/lib/lib-select/lib-select.component.html +83 -0
- package/src/lib/lib-select/lib-select.component.scss +130 -0
- package/src/lib/lib-select/lib-select.component.ts +152 -0
- package/src/lib/lib-skeleton/lib-skeleton.component.html +11 -0
- package/src/lib/lib-skeleton/lib-skeleton.component.scss +36 -0
- package/src/lib/lib-skeleton/lib-skeleton.component.ts +41 -0
- package/src/lib/lib-sort/lib-sort.component.html +21 -0
- package/src/lib/lib-sort/lib-sort.component.scss +21 -0
- package/src/lib/lib-sort/lib-sort.component.ts +52 -0
- package/src/lib/lib-step/lib-step.component.html +4 -0
- package/src/lib/lib-step/lib-step.component.scss +23 -0
- package/src/lib/lib-step/lib-step.component.ts +14 -0
- package/src/lib/lib-svg/lib-svg.component.html +15 -0
- package/src/lib/lib-svg/lib-svg.component.scss +81 -0
- package/src/lib/lib-svg/lib-svg.component.ts +66 -0
- package/src/lib/lib-svg-icon/lib-svg-icon.component.css +0 -0
- package/src/lib/lib-svg-icon/lib-svg-icon.component.ts +58 -0
- package/src/lib/lib-tabs-fragment/lib-tabs-fragment.component.html +12 -0
- package/src/lib/lib-tabs-fragment/lib-tabs-fragment.component.scss +19 -0
- package/src/lib/lib-tabs-fragment/lib-tabs-fragment.component.ts +88 -0
- package/src/lib/lib-textarea/lib-textarea.component.html +37 -0
- package/src/lib/lib-textarea/lib-textarea.component.scss +77 -0
- package/src/lib/lib-textarea/lib-textarea.component.ts +49 -0
- package/src/lib/toast/toast-base/toast-base.component.html +7 -0
- package/src/lib/toast/toast-base/toast-base.component.scss +44 -0
- package/src/lib/toast/toast-base/toast-base.component.ts +38 -0
- package/src/lib/toast/toast-placeholder/toast-placeholder.component.ts +20 -0
- package/src/lib/toast/toast.service.ts +130 -0
- package/src/lib/utils/decorators.ts +124 -0
- package/src/public-api.ts +35 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/* 🤖 this file was generated by svg-to-ts */
|
|
2
|
+
|
|
3
|
+
export type svgIcon =
|
|
4
|
+
| 'cheese_king'
|
|
5
|
+
| 'circle_dot'
|
|
6
|
+
| 'grid_dots'
|
|
7
|
+
| 'steam'
|
|
8
|
+
| 'paperclip'
|
|
9
|
+
| 'appgalery'
|
|
10
|
+
| 'appstore'
|
|
11
|
+
| 'google_app'
|
|
12
|
+
| 'rustore'
|
|
13
|
+
| 'badges'
|
|
14
|
+
| 'benefactors'
|
|
15
|
+
| 'burger'
|
|
16
|
+
| 'chart_bar'
|
|
17
|
+
| 'checkbox'
|
|
18
|
+
| 'crane'
|
|
19
|
+
| 'districts'
|
|
20
|
+
| 'grid'
|
|
21
|
+
| 'info_circle'
|
|
22
|
+
| 'info'
|
|
23
|
+
| 'logo'
|
|
24
|
+
| 'moneybag'
|
|
25
|
+
| 'moon'
|
|
26
|
+
| 'news'
|
|
27
|
+
| 'dd_m'
|
|
28
|
+
| 'dd'
|
|
29
|
+
| 'eds_m'
|
|
30
|
+
| 'eds'
|
|
31
|
+
| 'health_m'
|
|
32
|
+
| 'health'
|
|
33
|
+
| 'my_m'
|
|
34
|
+
| 'my'
|
|
35
|
+
| 'pgu_mo_m'
|
|
36
|
+
| 'pgu_mo'
|
|
37
|
+
| 'sun'
|
|
38
|
+
| 'trees'
|
|
39
|
+
| 'user'
|
|
40
|
+
| 'button_ok'
|
|
41
|
+
| 'button_tg'
|
|
42
|
+
| 'button_vk'
|
|
43
|
+
| 'check_list'
|
|
44
|
+
| 'minus'
|
|
45
|
+
| 'mobilr_qr'
|
|
46
|
+
| 'news_big'
|
|
47
|
+
| 'plus'
|
|
48
|
+
| 'rupor'
|
|
49
|
+
| 'shared_logo_d'
|
|
50
|
+
| 'shared_logo'
|
|
51
|
+
| 'solve_problem_exampe'
|
|
52
|
+
| 'users'
|
|
53
|
+
| 'circle_no'
|
|
54
|
+
| 'esia_icon'
|
|
55
|
+
| 'set_avatar'
|
|
56
|
+
| '404'
|
|
57
|
+
| 'actogone_accept'
|
|
58
|
+
| 'all'
|
|
59
|
+
| 'arrow_down_red'
|
|
60
|
+
| 'arrow_up_green'
|
|
61
|
+
| 'back_arrow'
|
|
62
|
+
| 'down_chevron'
|
|
63
|
+
| 'left_chevron'
|
|
64
|
+
| 'next'
|
|
65
|
+
| 'prev'
|
|
66
|
+
| 'right_chevron'
|
|
67
|
+
| 'calendar'
|
|
68
|
+
| 'check_green'
|
|
69
|
+
| 'check_white'
|
|
70
|
+
| 'clear'
|
|
71
|
+
| 'close'
|
|
72
|
+
| 'dobrodel'
|
|
73
|
+
| 'entry'
|
|
74
|
+
| 'error_hint'
|
|
75
|
+
| 'eye_off'
|
|
76
|
+
| 'eye'
|
|
77
|
+
| 'mail_exclamation'
|
|
78
|
+
| 'not_found'
|
|
79
|
+
| 'plug_d'
|
|
80
|
+
| 'plug'
|
|
81
|
+
| 'question_white_g'
|
|
82
|
+
| 'question'
|
|
83
|
+
| 'red_close'
|
|
84
|
+
| 'search'
|
|
85
|
+
| 'send'
|
|
86
|
+
| 'small_round_loader'
|
|
87
|
+
| 'sort'
|
|
88
|
+
| 'star'
|
|
89
|
+
| 'tg'
|
|
90
|
+
| 'trash'
|
|
91
|
+
| 'vk'
|
|
92
|
+
| 'danger_t'
|
|
93
|
+
| 'info_t'
|
|
94
|
+
| 'success_t'
|
|
95
|
+
| 'warning_t'
|
|
96
|
+
| 'award'
|
|
97
|
+
| 'bell'
|
|
98
|
+
| 'circles'
|
|
99
|
+
| 'is_esia'
|
|
100
|
+
| 'list_search'
|
|
101
|
+
| 'logout'
|
|
102
|
+
| 'news'
|
|
103
|
+
| 'pen_edit'
|
|
104
|
+
| 'user'
|
|
105
|
+
| 'trophy'
|
|
106
|
+
| 'user_empty'
|
|
107
|
+
| '404'
|
|
108
|
+
| 'actogone_accept'
|
|
109
|
+
| 'all'
|
|
110
|
+
| 'arrow_down_red'
|
|
111
|
+
| 'arrow_up_green'
|
|
112
|
+
| 'back_arrow'
|
|
113
|
+
| 'down_chevron'
|
|
114
|
+
| 'left_chevron'
|
|
115
|
+
| 'next'
|
|
116
|
+
| 'prev'
|
|
117
|
+
| 'right_chevron'
|
|
118
|
+
| 'calendar'
|
|
119
|
+
| 'check_green'
|
|
120
|
+
| 'check_white'
|
|
121
|
+
| 'clear'
|
|
122
|
+
| 'close'
|
|
123
|
+
| 'dobrodel'
|
|
124
|
+
| 'entry'
|
|
125
|
+
| 'error_hint'
|
|
126
|
+
| 'eye_off'
|
|
127
|
+
| 'eye'
|
|
128
|
+
| 'mail_exclamation'
|
|
129
|
+
| 'not_found'
|
|
130
|
+
| 'plug_d'
|
|
131
|
+
| 'plug'
|
|
132
|
+
| 'question_white_g'
|
|
133
|
+
| 'question'
|
|
134
|
+
| 'red_close'
|
|
135
|
+
| 'search'
|
|
136
|
+
| 'send'
|
|
137
|
+
| 'small_round_loader'
|
|
138
|
+
| 'sort'
|
|
139
|
+
| 'star'
|
|
140
|
+
| 'tg'
|
|
141
|
+
| 'trash'
|
|
142
|
+
| 'vk';
|
|
143
|
+
export interface SvgIcon {
|
|
144
|
+
name: svgIcon;
|
|
145
|
+
data: string;
|
|
146
|
+
}
|
|
Binary file
|
package/ng-package.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@morozeckiy/dd-lib",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": "https://gitlab.com/Morozeckiy/dd-lib",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"@angular/common": "^17.3.0",
|
|
11
|
+
"@angular/core": "^17.3.0"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"tslib": "^2.3.0"
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": false
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
template: '',
|
|
5
|
+
})
|
|
6
|
+
export abstract class LibCommonButtonComponent {
|
|
7
|
+
@Input() public width: string | undefined;
|
|
8
|
+
@Input() public height: string | undefined;
|
|
9
|
+
@Input() public size: 'md' | 'lg' | '' = '';
|
|
10
|
+
@Input() public fontSize: number | null | undefined;
|
|
11
|
+
@Input() public autofocus = false;
|
|
12
|
+
@Input() public btnColor: 'white' | 'green' | 'red' | 'transparent' | 'dark' = 'green';
|
|
13
|
+
@Input() public active = false;
|
|
14
|
+
@Input() public disabled: boolean | null = false;
|
|
15
|
+
|
|
16
|
+
@Input() public showLoader: null | boolean | undefined = false;
|
|
17
|
+
@Input() public buttonType: 'submit' | 'reset' | 'button' = 'button';
|
|
18
|
+
|
|
19
|
+
@ViewChild('contentData', { static: false }) public content: ElementRef | undefined;
|
|
20
|
+
@ViewChild('btn', { static: false }) public button: ElementRef | undefined;
|
|
21
|
+
|
|
22
|
+
@Output() public clickEvent = new EventEmitter<null>();
|
|
23
|
+
|
|
24
|
+
public onClick(event: Event): void {
|
|
25
|
+
if (this.disabled || this.showLoader || this.active) {
|
|
26
|
+
event.stopPropagation();
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
} else {
|
|
29
|
+
this.clickEvent.emit();
|
|
30
|
+
const el = document.activeElement as HTMLElement;
|
|
31
|
+
el?.blur();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectorRef,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
forwardRef,
|
|
7
|
+
Input,
|
|
8
|
+
Output,
|
|
9
|
+
ViewChild,
|
|
10
|
+
} from '@angular/core';
|
|
11
|
+
import { AbstractControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'dd-lib-common-input',
|
|
15
|
+
template: '',
|
|
16
|
+
providers: [
|
|
17
|
+
{
|
|
18
|
+
provide: NG_VALUE_ACCESSOR,
|
|
19
|
+
useExisting: forwardRef(() => LibCommonInputTextComponent),
|
|
20
|
+
multi: true,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
})
|
|
24
|
+
export abstract class LibCommonInputTextComponent {
|
|
25
|
+
@ViewChild('searchInput') protected inputSearchElement: ElementRef<HTMLInputElement> | undefined;
|
|
26
|
+
@ViewChild('input') protected inputElement: ElementRef<HTMLInputElement> | undefined;
|
|
27
|
+
@ViewChild('textarea') protected textAreaElement: ElementRef<HTMLTextAreaElement> | undefined;
|
|
28
|
+
@Input() public name: string | undefined;
|
|
29
|
+
@Input() public label: string | undefined;
|
|
30
|
+
@Input() public formControlName: string | undefined;
|
|
31
|
+
@Input() public type: 'password' | 'email' | 'number' | 'text' | undefined;
|
|
32
|
+
@Input() public contextClass: string | undefined; // класс разметки для deep стилей
|
|
33
|
+
@Input() public minlength: string | number | undefined;
|
|
34
|
+
@Input() public maxlength = 700;
|
|
35
|
+
@Input() public placeholder?: string;
|
|
36
|
+
@Input() public autocomplete?: string;
|
|
37
|
+
@Input() public tabIndex?: string | number;
|
|
38
|
+
@Input() public readOnly?: boolean;
|
|
39
|
+
@Input() public required = false;
|
|
40
|
+
@Input() public disabled = false;
|
|
41
|
+
@Input() public commitOnInput = true; // коммитить по input или по change
|
|
42
|
+
@Input() public clearable = false;
|
|
43
|
+
@Input() public uppercase = false;
|
|
44
|
+
@Input() public invalid = false;
|
|
45
|
+
@Input() public errorText: string | undefined;
|
|
46
|
+
@Output() public cleared = new EventEmitter<void>();
|
|
47
|
+
@Output() public focus = new EventEmitter<any>();
|
|
48
|
+
@Output() public blur = new EventEmitter<any>();
|
|
49
|
+
public get id() {
|
|
50
|
+
return this._ID;
|
|
51
|
+
}
|
|
52
|
+
public focused = false;
|
|
53
|
+
public touched = false;
|
|
54
|
+
public control: AbstractControl | undefined | null;
|
|
55
|
+
public value: string | undefined = '';
|
|
56
|
+
public changeDetection: ChangeDetectorRef;
|
|
57
|
+
|
|
58
|
+
protected destroyed = false;
|
|
59
|
+
protected onTouchedCallback: (() => void) | undefined;
|
|
60
|
+
private _ID = '';
|
|
61
|
+
|
|
62
|
+
protected constructor(changeDetection: ChangeDetectorRef) {
|
|
63
|
+
this.changeDetection = changeDetection;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public handleInput(_e: Event): void {
|
|
67
|
+
if (this.commitOnInput) {
|
|
68
|
+
this.commit(this.value);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
public notifyFocusEvent(e: Event): void {
|
|
73
|
+
// this.focusManager.notifyFocusMayChanged(this, e.type === 'focus');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// public writeValue(value: string | number | null): void {
|
|
77
|
+
// this.value = value === null || value === undefined ? '' : '' + value;
|
|
78
|
+
// if (!this.destroyed) {
|
|
79
|
+
// this.changeDetection.detectChanges();
|
|
80
|
+
// }
|
|
81
|
+
// }
|
|
82
|
+
|
|
83
|
+
// public clearValue(e: Event): void {
|
|
84
|
+
// if (!this.disabled) {
|
|
85
|
+
// this.writeValue(null);
|
|
86
|
+
// this.commit(null);
|
|
87
|
+
// this.cleared.emit();
|
|
88
|
+
// this.returnFocus(e);
|
|
89
|
+
// }
|
|
90
|
+
// e.stopPropagation();
|
|
91
|
+
// }
|
|
92
|
+
|
|
93
|
+
public handleBlur(): void {
|
|
94
|
+
this.focused = false;
|
|
95
|
+
if (this.onTouchedCallback) {
|
|
96
|
+
this.onTouchedCallback();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
this.blur.emit();
|
|
100
|
+
this.changeDetection.detectChanges();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public handleFocus(): void {
|
|
104
|
+
this.focused = this.touched = true;
|
|
105
|
+
if (this.onTouchedCallback) {
|
|
106
|
+
this.onTouchedCallback();
|
|
107
|
+
}
|
|
108
|
+
this.focus.emit();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public returnFocus(e?: Event): void {
|
|
112
|
+
if (
|
|
113
|
+
this.inputElement &&
|
|
114
|
+
this.inputElement.nativeElement &&
|
|
115
|
+
(!e || e.target !== this.inputElement.nativeElement)
|
|
116
|
+
) {
|
|
117
|
+
this.inputElement.nativeElement.focus();
|
|
118
|
+
// HelperService.resetSelection(this.inputElement.nativeElement);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public loseFocus(): void {
|
|
123
|
+
this.inputElement?.nativeElement.blur();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
public forceChange(): void {
|
|
127
|
+
if (this.inputElement) {
|
|
128
|
+
// this.inputElement.nativeElement.dispatchEvent(HelperService.createEvent('change', true, false));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
public registerOnChange(fn: any): void {
|
|
133
|
+
this.commit = fn;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
public registerOnTouched(fn: any): void {
|
|
137
|
+
this.onTouchedCallback = fn;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
public setDisabledState(isDisabled: boolean): void {
|
|
141
|
+
this.disabled = isDisabled;
|
|
142
|
+
if (!this.destroyed) {
|
|
143
|
+
this.changeDetection.detectChanges();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public handleChange(): void {
|
|
148
|
+
if (!this.commitOnInput) {
|
|
149
|
+
this.commit(this.value);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
public commit(_value: string | null | undefined): void {}
|
|
154
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InjectionToken, ViewContainerRef } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
export const DIALOG_CONFIG = new InjectionToken<DialogConfig>('Default options');
|
|
4
|
+
|
|
5
|
+
export class DialogConfig<D = any> {
|
|
6
|
+
public hasBackdrop = true;
|
|
7
|
+
public backdropClass = 'modal-overlay';
|
|
8
|
+
public dialogClass = '';
|
|
9
|
+
public closeOnBackdropClick = true;
|
|
10
|
+
public closeOnEsc = true;
|
|
11
|
+
public hasScroll = false;
|
|
12
|
+
public autoFocus = true;
|
|
13
|
+
public viewContainerRef: ViewContainerRef | undefined;
|
|
14
|
+
public context: D | undefined;
|
|
15
|
+
|
|
16
|
+
constructor(config: Partial<DialogConfig>) {
|
|
17
|
+
Object.assign(this, config);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component, ComponentRef, ElementRef, EmbeddedViewRef, ViewChild } from '@angular/core';
|
|
2
|
+
import { CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
3
|
+
import { DialogConfig } from './dialog-config';
|
|
4
|
+
import { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'dd-dialog-container',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [CdkPortalOutlet],
|
|
10
|
+
template: '<ng-template cdkPortalOutlet></ng-template>',
|
|
11
|
+
})
|
|
12
|
+
export class DialogContainerComponent {
|
|
13
|
+
@ViewChild(CdkPortalOutlet, { static: true }) public portalOutlet: CdkPortalOutlet | undefined;
|
|
14
|
+
|
|
15
|
+
protected focusTrap: FocusTrap | undefined;
|
|
16
|
+
|
|
17
|
+
constructor(
|
|
18
|
+
protected config: DialogConfig,
|
|
19
|
+
protected elementRef: ElementRef,
|
|
20
|
+
protected focusTrapFactory: FocusTrapFactory,
|
|
21
|
+
) {}
|
|
22
|
+
|
|
23
|
+
public ngOnInit(): void {
|
|
24
|
+
if (this.config.autoFocus) {
|
|
25
|
+
this.focusTrap = this.focusTrapFactory.create(this.elementRef.nativeElement);
|
|
26
|
+
// this.focusTrap.blurPreviouslyFocusedElement();
|
|
27
|
+
this.focusTrap.focusInitialElement();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {
|
|
32
|
+
return this.portalOutlet!.attachComponentPortal(portal);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {
|
|
36
|
+
return this.portalOutlet!.attachTemplatePortal(portal);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentRef } from '@angular/core';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
4
|
+
|
|
5
|
+
export class DDDialogRef<T> {
|
|
6
|
+
public componentRef: ComponentRef<T> | undefined;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Stream of backdrop click events.
|
|
10
|
+
* */
|
|
11
|
+
public readonly onBackdropClick: Observable<MouseEvent>;
|
|
12
|
+
protected onClose$: Subject<any> = new Subject();
|
|
13
|
+
public readonly onClose: Observable<any> = this.onClose$.asObservable();
|
|
14
|
+
|
|
15
|
+
constructor(protected overlayRef: OverlayRef) {
|
|
16
|
+
this.onBackdropClick = this.overlayRef.backdropClick();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Hides dialog.
|
|
21
|
+
* */
|
|
22
|
+
public close(res?: any) {
|
|
23
|
+
this.overlayRef.detach();
|
|
24
|
+
this.overlayRef.dispose();
|
|
25
|
+
this.onClose$.next(res);
|
|
26
|
+
this.onClose$.complete();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ComponentFactoryResolver,
|
|
3
|
+
Inject,
|
|
4
|
+
Injectable,
|
|
5
|
+
Injector,
|
|
6
|
+
TemplateRef,
|
|
7
|
+
Type,
|
|
8
|
+
ViewContainerRef,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { DDDialogRef as DialogRef } from './dialog-ref';
|
|
11
|
+
import { DIALOG_CONFIG, DialogConfig } from './dialog-config';
|
|
12
|
+
import { DOCUMENT } from '@angular/common';
|
|
13
|
+
import {
|
|
14
|
+
GlobalPositionStrategy,
|
|
15
|
+
Overlay,
|
|
16
|
+
OverlayRef,
|
|
17
|
+
PositionStrategy,
|
|
18
|
+
ScrollStrategy,
|
|
19
|
+
} from '@angular/cdk/overlay';
|
|
20
|
+
import { ComponentPortal, PortalInjector, TemplatePortal } from '@angular/cdk/portal';
|
|
21
|
+
import { DialogContainerComponent } from './dialog-container.component';
|
|
22
|
+
import { fromEvent } from 'rxjs';
|
|
23
|
+
import { filter, takeUntil } from 'rxjs/operators';
|
|
24
|
+
|
|
25
|
+
@Injectable({ providedIn: 'root' })
|
|
26
|
+
export class DialogService {
|
|
27
|
+
public dialogRef: DialogRef<any> | undefined;
|
|
28
|
+
|
|
29
|
+
constructor(
|
|
30
|
+
@Inject(DOCUMENT) protected document: Document,
|
|
31
|
+
@Inject(DIALOG_CONFIG) protected globalConfig: DialogConfig,
|
|
32
|
+
protected overlay: Overlay,
|
|
33
|
+
protected injector: Injector,
|
|
34
|
+
protected cfr: ComponentFactoryResolver,
|
|
35
|
+
) {}
|
|
36
|
+
|
|
37
|
+
public open<T, R = any>(
|
|
38
|
+
content: Type<T> | TemplateRef<T>,
|
|
39
|
+
userConfig: Partial<DialogConfig<Partial<R> | string>> = {},
|
|
40
|
+
): DialogRef<T> {
|
|
41
|
+
const config = new DialogConfig({ ...this.globalConfig, ...userConfig });
|
|
42
|
+
const overlayRef = this.createOverlay(config);
|
|
43
|
+
const dialogRef = new DialogRef<T>(overlayRef);
|
|
44
|
+
this.dialogRef = dialogRef;
|
|
45
|
+
const container = this.createContainer(config, overlayRef);
|
|
46
|
+
this.createContent(config, content, container, dialogRef);
|
|
47
|
+
|
|
48
|
+
this.registerCloseListeners(config, overlayRef, dialogRef);
|
|
49
|
+
|
|
50
|
+
return dialogRef;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
protected createOverlay(config: DialogConfig): OverlayRef {
|
|
54
|
+
const positionStrategy = this.createPositionStrategy();
|
|
55
|
+
const scrollStrategy = this.createScrollStrategy(config.hasScroll);
|
|
56
|
+
|
|
57
|
+
return this.overlay.create({
|
|
58
|
+
positionStrategy,
|
|
59
|
+
scrollStrategy,
|
|
60
|
+
hasBackdrop: config.hasBackdrop,
|
|
61
|
+
backdropClass: config.backdropClass,
|
|
62
|
+
panelClass: config.dialogClass,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
protected createPositionStrategy(): PositionStrategy {
|
|
67
|
+
return new GlobalPositionStrategy().centerVertically().centerHorizontally();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
protected createScrollStrategy(hasScroll: boolean): ScrollStrategy {
|
|
71
|
+
if (hasScroll) {
|
|
72
|
+
return this.overlay.scrollStrategies.noop();
|
|
73
|
+
} else {
|
|
74
|
+
return this.overlay.scrollStrategies.block();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
protected createContainer(config: DialogConfig, overlayRef: OverlayRef): DialogContainerComponent {
|
|
79
|
+
const injector = new PortalInjector(this.createInjector(config), new WeakMap([[DialogConfig, config]]));
|
|
80
|
+
const containerPortal = new ComponentPortal(DialogContainerComponent, null, injector, this.cfr);
|
|
81
|
+
const containerRef = overlayRef.attach(containerPortal);
|
|
82
|
+
return containerRef.instance;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
protected createInjector(config: DialogConfig): Injector {
|
|
86
|
+
return (config.viewContainerRef && config.viewContainerRef.injector) || this.injector;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
protected createContent<T>(
|
|
90
|
+
config: DialogConfig,
|
|
91
|
+
content: Type<T> | TemplateRef<T>,
|
|
92
|
+
container: DialogContainerComponent,
|
|
93
|
+
dialogRef: DialogRef<T>,
|
|
94
|
+
) {
|
|
95
|
+
if (content instanceof TemplateRef) {
|
|
96
|
+
const portal = this.createTemplatePortal(config, content, dialogRef);
|
|
97
|
+
container.attachTemplatePortal(portal);
|
|
98
|
+
} else {
|
|
99
|
+
const portal = this.createComponentPortal(config, content, dialogRef);
|
|
100
|
+
dialogRef.componentRef = container.attachComponentPortal(portal);
|
|
101
|
+
|
|
102
|
+
if (config.context) {
|
|
103
|
+
Object.assign(dialogRef.componentRef.instance as any, { ...config.context });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
protected createTemplatePortal<T>(
|
|
109
|
+
config: DialogConfig,
|
|
110
|
+
content: TemplateRef<T>,
|
|
111
|
+
dialogRef: DialogRef<T>,
|
|
112
|
+
): TemplatePortal {
|
|
113
|
+
return new TemplatePortal(
|
|
114
|
+
content,
|
|
115
|
+
{} as ViewContainerRef,
|
|
116
|
+
{ $implicit: config.context, dialogRef } as any,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
protected createComponentPortal<T>(
|
|
121
|
+
config: DialogConfig,
|
|
122
|
+
content: Type<T>,
|
|
123
|
+
dialogRef: DialogRef<T>,
|
|
124
|
+
): ComponentPortal<T> {
|
|
125
|
+
const injector = this.createInjector(config);
|
|
126
|
+
const portalInjector = new PortalInjector(injector, new WeakMap([[DialogRef, dialogRef]]));
|
|
127
|
+
return new ComponentPortal(content, config.viewContainerRef, portalInjector);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
protected registerCloseListeners<T>(config: DialogConfig, overlayRef: OverlayRef, dialogRef: DialogRef<T>) {
|
|
131
|
+
if (config.closeOnBackdropClick) {
|
|
132
|
+
overlayRef.backdropClick().subscribe(() => dialogRef.close());
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (config.closeOnEsc) {
|
|
136
|
+
fromEvent<KeyboardEvent>(this.document, 'keyup')
|
|
137
|
+
.pipe(
|
|
138
|
+
filter((event: KeyboardEvent) => event.keyCode === 27),
|
|
139
|
+
takeUntil(dialogRef.onClose),
|
|
140
|
+
)
|
|
141
|
+
.subscribe(() => dialogRef.close());
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[ddAutoHeight]',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class AutoHeightDirective implements OnInit {
|
|
8
|
+
// уровень до родителя
|
|
9
|
+
@Input() public ddAutoHeight: number | undefined;
|
|
10
|
+
|
|
11
|
+
constructor(private el: ElementRef, private rdr: Renderer2) {}
|
|
12
|
+
|
|
13
|
+
public ngOnInit(): void {
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
if (this.ddAutoHeight) {
|
|
16
|
+
let i = 1;
|
|
17
|
+
let parent: any;
|
|
18
|
+
while (i <= this.ddAutoHeight) {
|
|
19
|
+
parent = parent ? parent.parentNode : this.el.nativeElement.parentNode;
|
|
20
|
+
i++;
|
|
21
|
+
}
|
|
22
|
+
const height = parent.clientHeight;
|
|
23
|
+
if (height) {
|
|
24
|
+
this.rdr.setStyle(this.el.nativeElement, 'height', height + 'px');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, 0);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Directive, ElementRef, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
standalone: true,
|
|
5
|
+
selector: '[ddClickOutside]',
|
|
6
|
+
})
|
|
7
|
+
export class ClickOutsideDirective {
|
|
8
|
+
@Input() public elements!: string[] | undefined;
|
|
9
|
+
@Output() public ddClickOutside = new EventEmitter();
|
|
10
|
+
|
|
11
|
+
constructor(private el: ElementRef) {}
|
|
12
|
+
|
|
13
|
+
@HostListener('document:click', ['$event'])
|
|
14
|
+
public onClick(targetElement: Event) {
|
|
15
|
+
let clickedElemInside = false;
|
|
16
|
+
if (this.elements?.length) {
|
|
17
|
+
this.elements.forEach(el => {
|
|
18
|
+
if (el) {
|
|
19
|
+
const elem = document.getElementById(el) as any;
|
|
20
|
+
if (elem && !clickedElemInside) {
|
|
21
|
+
clickedElemInside = elem.contains(targetElement.target);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const clickedInside = this.el.nativeElement.contains(targetElement.target);
|
|
28
|
+
|
|
29
|
+
if (!clickedElemInside) {
|
|
30
|
+
this.ddClickOutside.emit(clickedInside);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|