@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,54 @@
|
|
|
1
|
+
import { Directive, ElementRef, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DecimalPipe } from '@angular/common';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[ddCounter]',
|
|
6
|
+
standalone: true,
|
|
7
|
+
})
|
|
8
|
+
export class CounterDirective implements OnChanges {
|
|
9
|
+
@Input() public ddCounter: number | undefined;
|
|
10
|
+
@Input() public needPositive = false;
|
|
11
|
+
|
|
12
|
+
constructor(private el: ElementRef) {}
|
|
13
|
+
|
|
14
|
+
public ngOnChanges(change: SimpleChanges): void {
|
|
15
|
+
this.el.nativeElement.innerHTML = 0;
|
|
16
|
+
let interval: any;
|
|
17
|
+
if (change['ddCounter']?.currentValue) {
|
|
18
|
+
/** получаем шаг для инкремента делением конечного числа на 20*/
|
|
19
|
+
let step = Math.floor(change['ddCounter'].currentValue / 20);
|
|
20
|
+
/** бывают маленькие и отрицательные числа*/
|
|
21
|
+
step = step >= 1 || step <= -1 ? step : 1;
|
|
22
|
+
let x = 0;
|
|
23
|
+
if (change['ddCounter'].currentValue > 0) {
|
|
24
|
+
interval = setInterval(() => {
|
|
25
|
+
if (x + step >= change['ddCounter'].currentValue) {
|
|
26
|
+
/** Если шаг увеличивает значение больше чем исходные число, приравниваем к исходнику и заканчиваем*/
|
|
27
|
+
const transformNumberFirst = new DecimalPipe('ru').transform(change['ddCounter'].currentValue);
|
|
28
|
+
this.el.nativeElement.innerHTML = this.needPositive
|
|
29
|
+
? '+' + transformNumberFirst
|
|
30
|
+
: transformNumberFirst;
|
|
31
|
+
clearInterval(interval);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
x += step;
|
|
35
|
+
const transformNumber = new DecimalPipe('ru').transform(x);
|
|
36
|
+
this.el.nativeElement.innerHTML = this.needPositive ? '+' + transformNumber : transformNumber;
|
|
37
|
+
}, 1);
|
|
38
|
+
} else if (change['ddCounter'].currentValue < 0) {
|
|
39
|
+
interval = setInterval(() => {
|
|
40
|
+
if (x - step <= change['ddCounter'].currentValue) {
|
|
41
|
+
this.el.nativeElement.innerHTML = new DecimalPipe('ru').transform(change['ddCounter'].currentValue);
|
|
42
|
+
clearInterval(interval);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
x += step;
|
|
46
|
+
this.el.nativeElement.innerHTML = new DecimalPipe('ru').transform(x);
|
|
47
|
+
}, 10);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
clearInterval(interval);
|
|
52
|
+
}, 4000);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Directive, ElementRef, Input, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[ddDeclension]',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class DeclensionDirective implements OnInit {
|
|
8
|
+
@Input() public ddDeclension!: string[];
|
|
9
|
+
@Input() public count = 0;
|
|
10
|
+
@Input() public whitespace = true;
|
|
11
|
+
@Input() public needCount = true;
|
|
12
|
+
|
|
13
|
+
constructor(private el: ElementRef) {}
|
|
14
|
+
|
|
15
|
+
public ngOnInit(): void {
|
|
16
|
+
const declension = { 1: this.ddDeclension[0], 2: this.ddDeclension[1], 5: this.ddDeclension[2] };
|
|
17
|
+
let x = this.count >= 10 && this.count <= 20 ? 5 : this.count % 10;
|
|
18
|
+
if (this.count > 999) {
|
|
19
|
+
x = this.count % 100;
|
|
20
|
+
}
|
|
21
|
+
const keys: [1, 2, 5] = (Object.keys(declension).map(Number) as [1, 2, 5]).sort();
|
|
22
|
+
const text = !x
|
|
23
|
+
? `${declension[keys.pop() || 1]}`
|
|
24
|
+
: keys.reduce((result, key) => (x >= +key ? declension[key] : result), '');
|
|
25
|
+
this.el.nativeElement.innerHTML = `${this.whitespace ? ' ' : ''}${
|
|
26
|
+
this.needCount ? this.count : ''
|
|
27
|
+
} ${text}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Directive, ElementRef, HostListener, Renderer2 } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[ddResizeTextarea]',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class ResizeTextareaDirective {
|
|
8
|
+
constructor(private el: ElementRef, private rdr: Renderer2) {}
|
|
9
|
+
|
|
10
|
+
@HostListener('input', ['$event'])
|
|
11
|
+
public onKeyup(): void {
|
|
12
|
+
const h = this.el.nativeElement.scrollHeight;
|
|
13
|
+
this.rdr.setStyle(this.el.nativeElement, 'max-height', h + 'px');
|
|
14
|
+
this.rdr.setStyle(this.el.nativeElement, 'height', h + 'px');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
standalone: true,
|
|
5
|
+
selector: '[ddTriangle]',
|
|
6
|
+
})
|
|
7
|
+
export class TriangleDirective implements OnInit {
|
|
8
|
+
@Input() public width = 16;
|
|
9
|
+
@Input() public height = 16;
|
|
10
|
+
@Input() public fill = '#fff';
|
|
11
|
+
@Input() public stroke = '#fff';
|
|
12
|
+
@Input() public points = '0,8 4,0 8,8';
|
|
13
|
+
@Input() public drTriangle: 'top' | 'left' | 'right' | 'bottom' | 'top-left' = 'left';
|
|
14
|
+
|
|
15
|
+
constructor(private rdr: Renderer2, private el: ElementRef) {}
|
|
16
|
+
|
|
17
|
+
public ngOnInit(): void {
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
const option = this.el.nativeElement.getBoundingClientRect();
|
|
20
|
+
let left = option.width / 2 - this.width / 2;
|
|
21
|
+
let top = -this.height / 2;
|
|
22
|
+
if (this.drTriangle === 'left') {
|
|
23
|
+
this.points = '8,0 0,8 8,16';
|
|
24
|
+
left = -this.width / 2;
|
|
25
|
+
top = option.height / 2 - this.width / 2;
|
|
26
|
+
}
|
|
27
|
+
if (this.drTriangle === 'right') {
|
|
28
|
+
this.points = '8,0 16,8 8,16';
|
|
29
|
+
left = option.width - this.width / 2 - 2;
|
|
30
|
+
top = option.height / 2 - this.width;
|
|
31
|
+
}
|
|
32
|
+
if (this.drTriangle === 'bottom') {
|
|
33
|
+
this.points = '16,8 8,16 0,8';
|
|
34
|
+
top = option.height - this.height / 2 - 2;
|
|
35
|
+
}
|
|
36
|
+
if (this.drTriangle === 'top-left') {
|
|
37
|
+
left = 46 - this.width / 2;
|
|
38
|
+
}
|
|
39
|
+
const svg = this.rdr.createElement('svg', 'svg');
|
|
40
|
+
this.rdr.setAttribute(svg, 'width', `${this.width}`);
|
|
41
|
+
this.rdr.setAttribute(svg, 'height', `${this.height}`);
|
|
42
|
+
this.rdr.setStyle(svg, 'width', `${this.width}px`);
|
|
43
|
+
this.rdr.setStyle(svg, 'height', `${this.height}px`);
|
|
44
|
+
this.rdr.setStyle(svg, 'position', 'absolute');
|
|
45
|
+
this.rdr.setStyle(svg, 'fill', this.fill);
|
|
46
|
+
this.rdr.setStyle(svg, 'stroke', this.stroke);
|
|
47
|
+
this.rdr.setStyle(svg, 'top', `${top}px`);
|
|
48
|
+
this.rdr.setStyle(svg, 'left', `${left}px`);
|
|
49
|
+
this.rdr.setStyle(svg, 'box-shadow', `0 14px 64px -4px #18274B0F, 0px 8px 22px -6px #18274B0F`);
|
|
50
|
+
const polyline = this.rdr.createElement('polyline', 'svg');
|
|
51
|
+
this.rdr.setAttribute(polyline, 'points', this.points);
|
|
52
|
+
this.rdr.appendChild(svg, polyline);
|
|
53
|
+
this.rdr.appendChild(this.el.nativeElement, svg);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// services
|
|
2
|
+
export * from './services/theme-constructor.service'
|
|
3
|
+
export * from './services/date.service'
|
|
4
|
+
export * from './services/svg-icons.service'
|
|
5
|
+
export * from './services/destroy.service'
|
|
6
|
+
export * from './services/interceptors.service'
|
|
7
|
+
export * from './services/validators.service'
|
|
8
|
+
export * from './services/fetcher.service'
|
|
9
|
+
// pipes
|
|
10
|
+
export * from './pipes/filter.pipe'
|
|
11
|
+
export * from './pipes/highlight.pipe'
|
|
12
|
+
export * from './pipes/safe.pipe'
|
|
13
|
+
export * from './pipes/reverse.pipe'
|
|
14
|
+
export * from './pipes/filter-tabs.pipe'
|
|
15
|
+
|
|
16
|
+
// directives
|
|
17
|
+
export * from './directives/auto-height.directive'
|
|
18
|
+
export * from './directives/counter.directive'
|
|
19
|
+
export * from './directives/declension.directive'
|
|
20
|
+
export * from './directives/click-outside.directive'
|
|
21
|
+
export * from './directives/resize-textarea.directive'
|
|
22
|
+
export * from './tooltip/tooltip.directive'
|
|
23
|
+
export * from './tooltip/tooltip.component'
|
|
24
|
+
// export * from './directives/triangle.directive'
|
|
25
|
+
// dialog
|
|
26
|
+
|
|
27
|
+
export * from './dialog/dialog.service'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'filterTabs',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class FilterTabsPipe implements PipeTransform {
|
|
8
|
+
public transform(arr: any[] | null, tab?: number | null | undefined): any[] {
|
|
9
|
+
if (arr) {
|
|
10
|
+
return arr.filter(v => {
|
|
11
|
+
if (tab === 0) {
|
|
12
|
+
return [1, 2].indexOf(v.status.id) !== -1;
|
|
13
|
+
}
|
|
14
|
+
if (tab === 1) {
|
|
15
|
+
return [3, 4].indexOf(v.status.id) !== -1;
|
|
16
|
+
}
|
|
17
|
+
if (tab === 2) {
|
|
18
|
+
return [6].indexOf(v.status.id) !== -1;
|
|
19
|
+
}
|
|
20
|
+
return arr;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
import { getProperty } from '../tools';
|
|
3
|
+
|
|
4
|
+
@Pipe({
|
|
5
|
+
name: 'filter',
|
|
6
|
+
standalone: true,
|
|
7
|
+
})
|
|
8
|
+
export class FilterPipe implements PipeTransform {
|
|
9
|
+
public transform(value: any[], args?: number): any {
|
|
10
|
+
if (value && value.length) {
|
|
11
|
+
return value.filter((item, i) => i === args);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@Pipe({
|
|
17
|
+
name: 'filterByKey',
|
|
18
|
+
standalone: true,
|
|
19
|
+
})
|
|
20
|
+
export class FilterByKeyPipe<T> implements PipeTransform {
|
|
21
|
+
public transform(arr: any, fn: any): any[] {
|
|
22
|
+
if (!arr?.length) {
|
|
23
|
+
return arr;
|
|
24
|
+
}
|
|
25
|
+
if (typeof fn === 'function') {
|
|
26
|
+
return arr.filter(fn);
|
|
27
|
+
} else if (fn?.length) {
|
|
28
|
+
const [key, value] = fn;
|
|
29
|
+
return arr.filter((item: any) => getProperty(item, key) === value);
|
|
30
|
+
} else if (fn) {
|
|
31
|
+
return arr.filter((item: any) => item === fn);
|
|
32
|
+
} else {
|
|
33
|
+
return arr;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
import { log } from '@angular-devkit/build-angular/src/builders/ssr-dev-server';
|
|
3
|
+
|
|
4
|
+
@Pipe({
|
|
5
|
+
name: 'highlight',
|
|
6
|
+
standalone: true,
|
|
7
|
+
})
|
|
8
|
+
export class HighlightPipe implements PipeTransform {
|
|
9
|
+
public transform(name: string, val?: string): string {
|
|
10
|
+
if (val) {
|
|
11
|
+
const re = new RegExp(val, 'gi');
|
|
12
|
+
return name.toString().replace(re, `<span style="color: #07B700">$&</span>`);
|
|
13
|
+
} else {
|
|
14
|
+
return name;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'reverse',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class ReversePipe implements PipeTransform {
|
|
8
|
+
public transform(value: any[], sort: string): any[] {
|
|
9
|
+
return sort === 'asc' ? value : value.reverse();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
DomSanitizer,
|
|
4
|
+
SafeHtml,
|
|
5
|
+
SafeResourceUrl,
|
|
6
|
+
SafeScript,
|
|
7
|
+
SafeStyle,
|
|
8
|
+
SafeUrl,
|
|
9
|
+
} from '@angular/platform-browser';
|
|
10
|
+
|
|
11
|
+
@Pipe({
|
|
12
|
+
name: 'safe',
|
|
13
|
+
standalone: true,
|
|
14
|
+
})
|
|
15
|
+
export class SafePipe implements PipeTransform {
|
|
16
|
+
constructor(protected sanitizer: DomSanitizer) {}
|
|
17
|
+
|
|
18
|
+
public transform(
|
|
19
|
+
value: string,
|
|
20
|
+
type: string,
|
|
21
|
+
): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {
|
|
22
|
+
switch (type) {
|
|
23
|
+
case 'html':
|
|
24
|
+
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
25
|
+
case 'style':
|
|
26
|
+
return this.sanitizer.bypassSecurityTrustStyle(value);
|
|
27
|
+
case 'script':
|
|
28
|
+
return this.sanitizer.bypassSecurityTrustScript(value);
|
|
29
|
+
case 'url':
|
|
30
|
+
return this.sanitizer.bypassSecurityTrustUrl(value);
|
|
31
|
+
case 'resourceUrl':
|
|
32
|
+
return this.sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
33
|
+
default:
|
|
34
|
+
throw new Error(`Invalid safe type specified: ${type}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
|
|
4
|
+
export declare type GetDateMethod = () => Date;
|
|
5
|
+
|
|
6
|
+
export declare type PeriodName = 'day' | 'week' | 'month' | 'month_3' | 'half_year' | 'year' | 'calendar';
|
|
7
|
+
|
|
8
|
+
export declare interface GetDateBy {
|
|
9
|
+
day?: GetDateMethod;
|
|
10
|
+
week?: GetDateMethod;
|
|
11
|
+
month?: GetDateMethod;
|
|
12
|
+
month_3?: GetDateMethod;
|
|
13
|
+
half_year?: GetDateMethod;
|
|
14
|
+
year?: GetDateMethod;
|
|
15
|
+
calendar?: GetDateMethod;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare type DateTypes = keyof GetDateBy;
|
|
19
|
+
|
|
20
|
+
export declare interface TimeDate {
|
|
21
|
+
time: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare interface CommonDateData {
|
|
25
|
+
title: string;
|
|
26
|
+
active: boolean;
|
|
27
|
+
name: PeriodName;
|
|
28
|
+
visible: string[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare type PeriodMenuDate = TimeDate & CommonDateData;
|
|
32
|
+
|
|
33
|
+
export const DEFAULT_FORMAT = 'yyyy-MM-dd';
|
|
34
|
+
const DEFAULT_COMMON_DATE_DATA = {
|
|
35
|
+
active: false,
|
|
36
|
+
visible: ['all'],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export interface IDaysInMonth {
|
|
40
|
+
prevDays: number[];
|
|
41
|
+
days: number[];
|
|
42
|
+
lastDays: number[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@Injectable({ providedIn: 'root' }) /** сервис для обработки дат */
|
|
46
|
+
export class DateService {
|
|
47
|
+
private commonDateDataBy: Record<DateTypes, CommonDateData> = {
|
|
48
|
+
day: {
|
|
49
|
+
...DEFAULT_COMMON_DATE_DATA,
|
|
50
|
+
title: 'за день',
|
|
51
|
+
name: 'day',
|
|
52
|
+
},
|
|
53
|
+
week: {
|
|
54
|
+
...DEFAULT_COMMON_DATE_DATA,
|
|
55
|
+
title: 'за неделю',
|
|
56
|
+
name: 'week',
|
|
57
|
+
},
|
|
58
|
+
month: {
|
|
59
|
+
...DEFAULT_COMMON_DATE_DATA,
|
|
60
|
+
title: 'за месяц',
|
|
61
|
+
name: 'month',
|
|
62
|
+
},
|
|
63
|
+
month_3: {
|
|
64
|
+
...DEFAULT_COMMON_DATE_DATA,
|
|
65
|
+
title: 'за 3 месяца',
|
|
66
|
+
name: 'month_3',
|
|
67
|
+
},
|
|
68
|
+
half_year: {
|
|
69
|
+
...DEFAULT_COMMON_DATE_DATA,
|
|
70
|
+
title: 'за полгода',
|
|
71
|
+
name: 'half_year',
|
|
72
|
+
},
|
|
73
|
+
year: {
|
|
74
|
+
...DEFAULT_COMMON_DATE_DATA,
|
|
75
|
+
title: 'за год',
|
|
76
|
+
name: 'year',
|
|
77
|
+
},
|
|
78
|
+
calendar: {
|
|
79
|
+
active: false,
|
|
80
|
+
visible: [],
|
|
81
|
+
name: 'calendar',
|
|
82
|
+
title: '',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
private getDateBy: GetDateBy = {
|
|
87
|
+
day: () => new Date(new Date().setDate(new Date().getDate() - 1)),
|
|
88
|
+
week: () => new Date(new Date().setDate(new Date().getDate() - 7)),
|
|
89
|
+
month: () => new Date(new Date().setMonth(new Date().getMonth() - 1)),
|
|
90
|
+
month_3: () => new Date(new Date().setMonth(new Date().getMonth() - 3)),
|
|
91
|
+
half_year: () => new Date(new Date().setMonth(new Date().getMonth() - 6)),
|
|
92
|
+
year: () => new Date(new Date().setFullYear(new Date().getFullYear() - 1)),
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
public getFormattedDate(dateType: keyof GetDateBy, f: string = DEFAULT_FORMAT): string {
|
|
96
|
+
const date = this.getDateBy[dateType] || this.getDateBy.day;
|
|
97
|
+
return format(date!(), f);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public getPeriodMenuDate(dateType: DateTypes, f?: string): TimeDate & CommonDateData {
|
|
101
|
+
return {
|
|
102
|
+
time: this.getFormattedDate(dateType, f),
|
|
103
|
+
...this.commonDateDataBy[dateType],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public getPeriodMenuDateRange(dateTypes: DateTypes[], f?: string): PeriodMenuDate[] {
|
|
108
|
+
return dateTypes.map(dateType => this.getPeriodMenuDate(dateType, f));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public getPeriodTime(name: string) {
|
|
112
|
+
const period = this.getPeriodMenu();
|
|
113
|
+
return period.find(p => p.name === name) || period[0];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public getPeriodMenu(activePeriodName: DateTypes = 'month'): PeriodMenuDate[] {
|
|
117
|
+
const arr: DateTypes[] = ['day', 'week', 'month', 'month_3', 'half_year', 'year'];
|
|
118
|
+
|
|
119
|
+
const periodMenus = this.getPeriodMenuDateRange(arr);
|
|
120
|
+
const activePeriod = periodMenus.find(p => p.name === activePeriodName) || periodMenus[0];
|
|
121
|
+
|
|
122
|
+
activePeriod.active = true;
|
|
123
|
+
return periodMenus;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
public getDaysInMonth(month: number, year: number): IDaysInMonth {
|
|
127
|
+
const date = new Date(year, month, 1);
|
|
128
|
+
const datePrev = new Date(year, month, 0);
|
|
129
|
+
const days = [];
|
|
130
|
+
const prevDays = [];
|
|
131
|
+
while (date.getMonth() === month) {
|
|
132
|
+
days.push(date.getDay());
|
|
133
|
+
date.setDate(date.getDate() + 1);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const needFirstDays = days[0] === 1 ? 0 : days[0] === 0 ? 6 : days[0] - 1;
|
|
137
|
+
const firstDays = [...Array(needFirstDays)].map(() => 0);
|
|
138
|
+
const m = month === 0 ? 12 : month;
|
|
139
|
+
while (datePrev.getMonth() === m - 1 && firstDays.length !== prevDays.length) {
|
|
140
|
+
prevDays.push(datePrev.getDate());
|
|
141
|
+
datePrev.setDate(datePrev.getDate() - 1);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const needLastDays = days[days.length - 1] === 0 ? 0 : 7 - days[days.length - 1];
|
|
145
|
+
const lastDays = [...Array(needLastDays)].map((_d, i) => ++i);
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
prevDays: prevDays.reverse(),
|
|
149
|
+
days: days.map((_d, i) => ++i),
|
|
150
|
+
lastDays,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
|
|
2
|
+
import {Inject, Injectable} from '@angular/core';
|
|
3
|
+
|
|
4
|
+
import {Observable, of} from 'rxjs';
|
|
5
|
+
import {switchMap} from 'rxjs/operators';
|
|
6
|
+
import {isArray} from "@angular/compiler-cli/src/ngtsc/annotations/common";
|
|
7
|
+
|
|
8
|
+
export interface HttpIResponse<T> {
|
|
9
|
+
error: string;
|
|
10
|
+
errorCode: string;
|
|
11
|
+
message: null | string;
|
|
12
|
+
redirect: null | string;
|
|
13
|
+
systemMessage: null | string;
|
|
14
|
+
result: 'OK' | 'ERROR' | 'FAIL';
|
|
15
|
+
value: T;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type PayloadMethod = 'post' | 'put' | 'get' | 'delete';
|
|
19
|
+
|
|
20
|
+
@Injectable({providedIn: 'root'}) /** сервис обработки запросов к api */
|
|
21
|
+
export class FetcherService {
|
|
22
|
+
// private apiUrl = 'api';
|
|
23
|
+
private readonly payloadMethods: string[] = ['post', 'put'];
|
|
24
|
+
|
|
25
|
+
constructor(private http: HttpClient, @Inject('apiUrl') private apiUrl: string = 'api') {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public get<R>(urlParts: string, options: any = {}, urlId?: string | number): Observable<R> {
|
|
29
|
+
urlParts = urlId ? urlParts.replace(/{[^}]+}/g, urlId.toString()) : urlParts;
|
|
30
|
+
const url: string = urlParts ? [this.apiUrl].concat(urlParts).join('/') : this.apiUrl;
|
|
31
|
+
let params = new HttpParams();
|
|
32
|
+
for (const key of Object.keys(options)) {
|
|
33
|
+
if (options[key] != null) {
|
|
34
|
+
if (options[key].length && isArray(options[key])) {
|
|
35
|
+
options[key].forEach((f: string | number | boolean) => {
|
|
36
|
+
params = params.append(key, f);
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
params = params.append(key, options[key]);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return this.request('get', url, {params});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public post<R>(urlParts: string[] | string, data?: any, options: any = {}): Observable<R> {
|
|
47
|
+
const url: string = [this.apiUrl].concat(urlParts).join('/');
|
|
48
|
+
if (options?.params) {
|
|
49
|
+
let params = new HttpParams();
|
|
50
|
+
for (const key of Object.keys(options.params)) {
|
|
51
|
+
if (options.params[key] != null) {
|
|
52
|
+
params = params.append(key, options.params[key]);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
options.params = params;
|
|
56
|
+
}
|
|
57
|
+
return this.request('post', url, options, data);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public put<R>(urlParts: string[] | string, options: any = {}, data: any): Observable<any> {
|
|
61
|
+
const url: string = [this.apiUrl].concat(urlParts).join('/');
|
|
62
|
+
return this.request('put', url, options, data);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public delete<R>(urlParts: string[] | string, options: any = {}): Observable<R> {
|
|
66
|
+
const url: string = [this.apiUrl].concat(urlParts).join('/');
|
|
67
|
+
return this.request('delete', url, options);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** перегоняем объкты в форм дату*/
|
|
71
|
+
public createFormData(form: { [x: string]: any }) {
|
|
72
|
+
const formData: FormData = new FormData();
|
|
73
|
+
Object.keys(form).forEach((item: string) => {
|
|
74
|
+
formData.append(item, form[item]);
|
|
75
|
+
});
|
|
76
|
+
return formData;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
private request<R>(method: PayloadMethod, url: string, options: any, data?: any): Observable<R> {
|
|
80
|
+
if (options.headers) {
|
|
81
|
+
options.headers = new HttpHeaders(options.headers);
|
|
82
|
+
}
|
|
83
|
+
let request: Observable<any>;
|
|
84
|
+
options.withCredentials = true;
|
|
85
|
+
|
|
86
|
+
if (this.payloadMethods.includes(method)) {
|
|
87
|
+
request = this.http[method as 'post' | 'put'](url, data, options);
|
|
88
|
+
} else {
|
|
89
|
+
request = (this.http as any)[method](url, options);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return request.pipe(
|
|
93
|
+
switchMap((response: any) => {
|
|
94
|
+
if (response && response.error) {
|
|
95
|
+
console.error(`API error with status: ${response.status}`);
|
|
96
|
+
console.error(response.error);
|
|
97
|
+
}
|
|
98
|
+
return of(response);
|
|
99
|
+
}),
|
|
100
|
+
// catchError((error: any) => {
|
|
101
|
+
// console.timeEnd('Время выполнения - ' + url);
|
|
102
|
+
// if (error.status !== 403) {
|
|
103
|
+
// console.log(error);
|
|
104
|
+
// }
|
|
105
|
+
// return of(error);
|
|
106
|
+
// }),
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest,} from '@angular/common/http';
|
|
2
|
+
import {Injectable} from '@angular/core';
|
|
3
|
+
import {Observable} from 'rxjs';
|
|
4
|
+
import {catchError} from 'rxjs/operators';
|
|
5
|
+
import {Router} from '@angular/router';
|
|
6
|
+
|
|
7
|
+
@Injectable()
|
|
8
|
+
export class InterceptorsService implements HttpInterceptor {
|
|
9
|
+
|
|
10
|
+
constructor(private router: Router) {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** перехватчик состояния запросов к api */
|
|
14
|
+
public intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
15
|
+
return next.handle(req).pipe(
|
|
16
|
+
catchError(err => {
|
|
17
|
+
if (err instanceof HttpErrorResponse) {
|
|
18
|
+
if (err.status >= 500) {
|
|
19
|
+
this.router.navigate(['tech-works']);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
throw err;
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import {SvgIcon} from "../../../../assets/svg-icons";
|
|
3
|
+
|
|
4
|
+
@Injectable({
|
|
5
|
+
providedIn: 'root'
|
|
6
|
+
})
|
|
7
|
+
export class SvgIconsService {
|
|
8
|
+
|
|
9
|
+
private registry = new Map<string, string>();
|
|
10
|
+
|
|
11
|
+
registerIcons(icons: SvgIcon[]): void {
|
|
12
|
+
icons.forEach((icon: SvgIcon) => this.registry.set(icon.name, icon.data));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getIcon(iconName: string): string | undefined {
|
|
16
|
+
if (!this.registry.has(iconName)) {
|
|
17
|
+
// eslint-disable-next-line no-console
|
|
18
|
+
console.warn(
|
|
19
|
+
`We could not find the icon with name ${ iconName }, did you add it to the icon registry?`,
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return this.registry.get(iconName);
|
|
24
|
+
}
|
|
25
|
+
}
|