├── .nvmrc ├── packages ├── abc │ ├── index.ts │ ├── qr │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── qr.types.ts │ │ ├── public_api.ts │ │ ├── qr.module.ts │ │ └── qr.config.ts │ ├── se │ │ ├── index.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── sg │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── sg.module.ts │ ├── st │ │ ├── index.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── sv │ │ ├── index.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── hotkey │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ ├── hotkey.module.ts │ │ └── index.zh-CN.md │ ├── loading │ │ ├── index.ts │ │ ├── style │ │ │ └── rtl.less │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── loading.component.html │ ├── lodop │ │ ├── index.ts │ │ ├── lodop.module.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── media │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── media.module.ts │ ├── pdf │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ ├── style │ │ │ └── index.less │ │ ├── pdf.config.ts │ │ └── pdf.module.ts │ ├── result │ │ ├── index.ts │ │ ├── style │ │ │ └── rtl.less │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── result.module.ts │ ├── xlsx │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ ├── xlsx.module.ts │ │ └── xlsx.directive.ts │ ├── zip │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── zip.module.ts │ ├── avatar-list │ │ ├── index.ts │ │ ├── style │ │ │ └── rtl.less │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── count-down │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── count-down.module.ts │ ├── date-picker │ │ ├── index.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── down-file │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ ├── down-file.module.ts │ │ └── style │ │ │ └── index.less │ ├── ellipsis │ │ ├── index.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── exception │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ ├── style │ │ │ └── rtl.less │ │ └── demo │ │ │ ├── 404.md │ │ │ ├── 500.md │ │ │ └── 403.md │ ├── full-content │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── style │ │ │ └── index.less │ │ ├── public_api.ts │ │ ├── full-content-toggle.directive.ts │ │ ├── full-content.service.ts │ │ └── full-content.module.ts │ ├── notice-icon │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── demo │ │ │ └── basic.md │ ├── observers │ │ ├── index.ts │ │ ├── public-api.ts │ │ ├── ng-package.json │ │ └── index.zh-CN.md │ ├── onboarding │ │ ├── index.ts │ │ ├── style │ │ │ └── rtl.less │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── page-header │ │ ├── index.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── quick-menu │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── quick-menu.component.html │ ├── reuse-tab │ │ ├── index.ts │ │ ├── style │ │ │ └── rtl.less │ │ └── ng-package.json │ ├── tag-select │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ ├── tag-select.component.html │ │ ├── index.zh-CN.md │ │ ├── index.en-US.md │ │ └── tag-select.module.ts │ ├── error-collect │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ ├── style │ │ │ ├── rtl.less │ │ │ └── index.less │ │ ├── index.zh-CN.md │ │ └── error-collect.module.ts │ ├── footer-toolbar │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── footer-toolbar.component.html │ ├── global-footer │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ ├── global-footer.types.ts │ │ ├── style │ │ │ └── rtl.less │ │ └── global-footer.component.html │ ├── let │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── let.module.ts │ │ └── index.zh-CN.md │ ├── public_api.ts │ ├── auto-focus │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── auto-focus.module.ts │ │ └── index.zh-CN.md │ ├── highlight │ │ ├── index.zh-CN.md │ │ └── index.en-US.md │ ├── tsconfig.lib.json │ ├── theme-compact.less │ └── tsconfig.json ├── cache │ ├── index.ts │ ├── src │ │ ├── cache.module.ts │ │ └── interface.ts │ ├── public_api.ts │ ├── tsconfig.lib.json │ └── ng-package.json ├── chart │ ├── index.ts │ ├── bar │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── bar.module.ts │ ├── card │ │ ├── index.ts │ │ ├── public_api.ts │ │ └── ng-package.json │ ├── core │ │ ├── index.ts │ │ ├── types │ │ │ ├── time.ts │ │ │ └── interaction.ts │ │ ├── ng-package.json │ │ └── public_api.ts │ ├── gauge │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── gauge.module.ts │ ├── pie │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── demo │ │ │ └── mini.md │ ├── radar │ │ ├── index.ts │ │ ├── public_api.ts │ │ └── ng-package.json │ ├── trend │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ ├── demo │ │ │ ├── basic.md │ │ │ └── reverse.md │ │ ├── trend.module.ts │ │ └── index.md │ ├── custom │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── custom.module.ts │ ├── mini-area │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── mini-area.module.ts │ ├── mini-bar │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── mini-bar.module.ts │ ├── single-bar │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── single-bar.module.ts │ ├── tag-cloud │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── tag-cloud.module.ts │ ├── timeline │ │ ├── index.ts │ │ ├── public_api.ts │ │ └── ng-package.json │ ├── water-wave │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ ├── demo │ │ │ └── basic.md │ │ ├── water-wave.module.ts │ │ └── water-wave.component.html │ ├── chart-echarts │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── echarts.module.ts │ ├── mini-progress │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ ├── demo │ │ │ └── basic.md │ │ └── index.md │ ├── number-info │ │ ├── index.ts │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── demo │ │ │ ├── theme.md │ │ │ └── basic.md │ ├── public_api.ts │ ├── docs │ │ ├── faq.zh-CN.md │ │ └── faq.en-US.md │ ├── tsconfig.lib.json │ ├── ng-package.json │ └── tsconfig.json ├── form │ ├── index.ts │ ├── src │ │ ├── const.ts │ │ ├── widgets │ │ │ ├── custom │ │ │ │ └── schema.ts │ │ │ ├── text │ │ │ │ ├── text.widget.html │ │ │ │ ├── index.zh-CN.md │ │ │ │ ├── schema.ts │ │ │ │ └── index.en-US.md │ │ │ ├── boolean │ │ │ │ ├── boolean.widget.html │ │ │ │ └── boolean.widget.ts │ │ │ └── rate │ │ │ │ └── schema.ts │ │ ├── model │ │ │ ├── boolean.property.ts │ │ │ ├── index.ts │ │ │ └── string.property.ts │ │ ├── terminator.service.ts │ │ └── style │ │ │ └── _issues.less │ ├── public_api.ts │ ├── examples │ │ ├── acl │ │ │ └── index.md │ │ ├── i18n │ │ │ ├── index.zh-CN.md │ │ │ └── index.en-US.md │ │ └── conditional │ │ │ ├── index.zh-CN.md │ │ │ └── index.en-US.md │ ├── tsconfig.lib.json │ └── ng-package.json ├── mock │ ├── index.ts │ ├── public_api.ts │ ├── src │ │ ├── status.error.ts │ │ └── mock.config.ts │ ├── tsconfig.lib.json │ └── ng-package.json ├── theme │ ├── index.ts │ ├── index.less │ ├── src │ │ ├── locale │ │ │ ├── index.ts │ │ │ ├── locale.tokens.ts │ │ │ └── locale.module.ts │ │ ├── services │ │ │ ├── i18n │ │ │ │ ├── index.ts │ │ │ │ └── i18n.pipe.ts │ │ │ ├── http │ │ │ │ └── index.ts │ │ │ └── rtl │ │ │ │ ├── index.zh-CN.md │ │ │ │ └── index.en-US.md │ │ ├── version.ts │ │ └── pipes │ │ │ ├── safe │ │ │ ├── index.zh-CN.md │ │ │ ├── index.en-US.md │ │ │ ├── url.pipe.ts │ │ │ └── html.pipe.ts │ │ │ ├── yn │ │ │ └── style │ │ │ │ └── index.less │ │ │ └── date │ │ │ └── index.zh-CN.md │ ├── theme-btn │ │ ├── index.ts │ │ ├── style │ │ │ └── rtl.less │ │ ├── public_api.ts │ │ └── ng-package.json │ ├── layout-blank │ │ ├── index.ts │ │ ├── style │ │ │ ├── fix │ │ │ │ ├── index.less │ │ │ │ └── _page-header.less │ │ │ ├── theme-dark.less │ │ │ ├── index.less │ │ │ ├── theme-compact.less │ │ │ ├── _layout.less │ │ │ └── theme-default.less │ │ ├── public_api.ts │ │ ├── ng-package.json │ │ └── index.zh-CN.md │ ├── layout-default │ │ ├── index.ts │ │ ├── style │ │ │ ├── widgets │ │ │ │ └── index.less │ │ │ ├── fix │ │ │ │ ├── _notice-icon.less │ │ │ │ ├── _quick-menu.less │ │ │ │ ├── index.less │ │ │ │ ├── _page-header.less │ │ │ │ └── _footer-toolbar.less │ │ │ ├── index.less │ │ │ ├── theme-compact.less │ │ │ ├── theme-dark.less │ │ │ └── _fixed.less │ │ ├── ng-package.json │ │ ├── layout-header-item-trigger.directive.ts │ │ └── public_api.ts │ ├── setting-drawer │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── public_api.ts │ │ └── style │ │ │ └── rtl.less │ ├── system │ │ ├── theme-compact.less │ │ ├── ng │ │ │ ├── index.less │ │ │ └── _form.less │ │ ├── antd │ │ │ ├── _link.less │ │ │ ├── _input-number.less │ │ │ ├── _tag.less │ │ │ ├── index.less │ │ │ ├── _card.less │ │ │ ├── _animation.less │ │ │ └── _form.less │ │ ├── mixins │ │ │ ├── index.less │ │ │ └── _router.less │ │ ├── utils │ │ │ ├── _img.less │ │ │ ├── _code.less │ │ │ ├── _overflow.less │ │ │ └── _float.less │ │ ├── widgets │ │ │ ├── index.less │ │ │ ├── _header-dropdown.less │ │ │ └── _form.less │ │ ├── index.less │ │ ├── delon │ │ │ └── index.less │ │ ├── entry.less │ │ └── theme-dark.less │ ├── dark.less │ ├── compact.less │ ├── default.less │ ├── theme-dark.less │ ├── theme-compact.less │ ├── theme-default.less │ ├── tsconfig.lib.json │ ├── tsconfig.json │ └── ng-package.json ├── testing │ ├── index.ts │ ├── tsconfig.lib.json │ ├── ng-package.json │ ├── public_api.ts │ ├── src │ │ └── cdk-overlay.ts │ └── package.json ├── dev-mode-types.d.ts ├── util │ ├── math │ │ ├── index.ts │ │ └── ng-package.json │ ├── date-time │ │ ├── index.ts │ │ └── ng-package.json │ ├── form │ │ ├── index.ts │ │ └── ng-package.json │ ├── pipes │ │ ├── format │ │ │ ├── index.ts │ │ │ ├── ng-package.json │ │ │ ├── index.zh-CN.md │ │ │ ├── index.en-US.md │ │ │ └── module.ts │ │ ├── filter │ │ │ ├── index.ts │ │ │ ├── ng-package.json │ │ │ ├── index.zh-CN.md │ │ │ ├── index.en-US.md │ │ │ ├── module.ts │ │ │ └── filter.pipe.ts │ │ ├── ng-package.json │ │ ├── currency │ │ │ ├── ng-package.json │ │ │ ├── index.ts │ │ │ ├── module.ts │ │ │ ├── demo │ │ │ │ └── currency-cny.md │ │ │ ├── index.zh-CN.md │ │ │ └── cny.pipe.ts │ │ └── index.ts │ ├── token │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── index.zh-CN.md │ │ ├── index.en-US.md │ │ ├── window.ts │ │ └── page-visibility.spec.ts │ ├── decorator │ │ ├── index.ts │ │ └── ng-package.json │ ├── array │ │ ├── index.ts │ │ └── ng-package.json │ ├── other │ │ ├── ng-package.json │ │ ├── index.ts │ │ └── logger.spec.ts │ ├── browser │ │ ├── ng-package.json │ │ └── index.ts │ ├── config │ │ ├── ng-package.json │ │ ├── theme │ │ │ ├── index.ts │ │ │ ├── responsive.type.ts │ │ │ ├── http.type.ts │ │ │ └── i18n.type.ts │ │ ├── abc │ │ │ ├── onboarding.type.ts │ │ │ ├── exception.type.ts │ │ │ ├── sg.type.ts │ │ │ ├── error-collect.type.ts │ │ │ ├── zip.type.ts │ │ │ ├── xlsx.type.ts │ │ │ ├── image.type.ts │ │ │ ├── sv.type.ts │ │ │ └── media.type.ts │ │ ├── index.ts │ │ └── mock │ │ │ └── mock.type.ts │ ├── docs │ │ ├── getting-started.zh-CN.md │ │ └── getting-started.en-US.md │ ├── format │ │ ├── ng-package.json │ │ └── index.ts │ ├── ng-package.json │ ├── tsconfig.lib.json │ ├── tsconfig.json │ └── index.ts ├── tsconfig.lint.json ├── public_api.ts ├── auth │ ├── src │ │ ├── auth.module.ts │ │ ├── token │ │ │ ├── simple │ │ │ │ └── simple.model.ts │ │ │ └── helper.spec.ts │ │ ├── token.ts │ │ └── store │ │ │ └── interface.ts │ ├── tsconfig.lib.json │ └── ng-package.json ├── license-banner.txt ├── acl │ ├── src │ │ ├── acl.config.ts │ │ └── style │ │ │ └── index.less │ ├── index.ts │ ├── tsconfig.lib.json │ └── ng-package.json ├── tsconfig.lib.prod.json ├── test.ts └── tsconfig.spec.json ├── src ├── templates │ ├── meta.ts │ ├── examples_index.ts │ └── content.ts ├── app │ ├── shared │ │ ├── json-schema │ │ │ └── index.md │ │ └── index.ts │ ├── core │ │ ├── code │ │ │ └── files │ │ │ │ ├── polyfill.ts │ │ │ │ ├── environment.ts │ │ │ │ ├── sandbox.config.json.ts │ │ │ │ └── main.ts │ │ ├── index.ts │ │ ├── app.service.ts │ │ └── mobile.service.ts │ ├── layout │ │ └── header │ │ │ └── search-box.component.html │ ├── routes │ │ └── 404 │ │ │ ├── 404.component.html │ │ │ └── 404.component.ts │ └── app.server.module.ts ├── assets │ ├── LOGO.ai │ ├── demo.pdf │ ├── demo.zip │ ├── pro.png │ ├── demo.docx │ ├── demo.pptx │ ├── demo.xlsx │ ├── donate.png │ ├── img │ │ ├── 404.jpg │ │ ├── logo.png │ │ ├── plnkr.png │ │ ├── avatar.jpg │ │ ├── form-input.png │ │ └── logo-color.png │ ├── qq-group.png │ ├── screenshot │ │ ├── ms.png │ │ ├── pro.png │ │ ├── yun.png │ │ ├── basic.png │ │ ├── ipad.png │ │ ├── start.png │ │ ├── desktop.png │ │ ├── iphone.png │ │ ├── architecture.png │ │ └── bundle-size.png │ ├── icons │ │ ├── icon-72x72.png │ │ ├── icon-96x96.png │ │ ├── icon-128x128.png │ │ ├── icon-144x144.png │ │ ├── icon-152x152.png │ │ ├── icon-192x192.png │ │ ├── icon-384x384.png │ │ └── icon-512x512.png │ └── schema │ │ ├── basic.json │ │ ├── validation.json │ │ └── onboarding.json ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── robots.txt ├── typings.d.ts ├── zone-flags.ts ├── dev │ ├── demo.component.ts │ └── lazy │ │ └── layout.component.ts ├── styles │ ├── _ng.less │ ├── theme.less │ ├── _custom.less │ └── _reset.less ├── main.server.ts ├── tsconfig.server.json ├── styles.less ├── tsconfig.spec.json └── tsconfig.json ├── schematics ├── application │ ├── files │ │ ├── root │ │ │ └── _mock │ │ │ │ ├── index.ts │ │ │ │ └── README.md │ │ └── src │ │ │ └── app │ │ │ ├── routes │ │ │ └── dashboard │ │ │ │ ├── dashboard.component.html │ │ │ │ └── dashboard.component.ts │ │ │ ├── shared │ │ │ ├── index.ts │ │ │ └── shared-delon.module.ts │ │ │ └── core │ │ │ ├── index.ts │ │ │ └── core.module.ts │ └── schema.ts ├── .npmignore ├── empty │ ├── files │ │ └── __path__ │ │ │ └── __name@dasherize@if-flat__ │ │ │ ├── __name@dasherize__.component.html.template │ │ │ └── __name@dasherize__.service.ts.template │ └── index.ts ├── utils │ ├── node.ts │ ├── lib-versions.ts │ ├── code-style.ts │ ├── index.ts │ ├── less.ts │ └── ast.ts ├── plugin │ ├── files │ │ ├── ie │ │ │ ├── tsconfig-es5.app.ts │ │ │ └── tsconfig-es5.spec.ts │ │ └── sts │ │ │ └── swagger-list │ │ │ └── __path__ │ │ │ └── __name@dasherize@if-flat__ │ │ │ └── __name@dasherize__.component.html.template │ ├── plugin.asdf.ts │ ├── schema.ts │ └── interface.ts ├── module │ ├── schema.ts │ └── files │ │ └── __name@dasherize@if-flat__ │ │ ├── __name@dasherize__.service.ts.template │ │ └── __name@dasherize__-routing.module.ts.template ├── ng-add │ └── schema.ts ├── ng-update │ └── data │ │ ├── class-names.ts │ │ ├── input-names.ts │ │ ├── output-names.ts │ │ ├── css-selectors.ts │ │ ├── property-names.ts │ │ ├── method-call-checks.ts │ │ ├── element-selectors.ts │ │ ├── attribute-selectors.ts │ │ ├── index.ts │ │ └── constructor-checks.ts ├── edit │ ├── index.ts │ └── files │ │ └── __path__ │ │ └── __name@dasherize@if-flat__ │ │ └── __name@dasherize__.service.ts.template ├── list │ ├── index.ts │ └── files │ │ └── __path__ │ │ └── __name@dasherize@if-flat__ │ │ ├── __name@dasherize__.service.ts.template │ │ └── __name@dasherize__.component.html.template ├── view │ ├── index.ts │ ├── files │ │ └── __path__ │ │ │ └── __name@dasherize@if-flat__ │ │ │ └── __name@dasherize__.service.ts.template │ └── schema.ts ├── sta │ └── templates │ │ └── dto-type.eta ├── tsconfig.spec.json └── migration.json ├── _mock ├── chart.ts ├── index.ts └── upload.ts ├── _screenshot ├── ms.png ├── pro.png ├── yun.png ├── ipad.png ├── start.png ├── desktop.png ├── iphone.png └── architecture.png ├── docs ├── acl.md ├── mock.md ├── auth.md ├── cli.md ├── cache.md ├── graph.md └── theme.md ├── scripts ├── site │ ├── index.ts │ ├── main.js │ └── converters │ │ └── highlight.ts └── ci │ ├── helper.sh │ └── lint.sh ├── .husky ├── commit-msg └── pre-commit ├── .stylelintignore ├── .github ├── semantic.yml └── workflows │ └── mirror.yml ├── .gitattributes ├── ng-alain.json ├── .prettierrc.js ├── .editorconfig └── .prettierignore /.nvmrc: -------------------------------------------------------------------------------- 1 | 16.15.0 2 | -------------------------------------------------------------------------------- /packages/abc/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/qr/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/se/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/sg/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/st/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/sv/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/cache/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/form/src/const.ts: -------------------------------------------------------------------------------- 1 | export const SF_SEQ = '/'; 2 | -------------------------------------------------------------------------------- /packages/mock/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/theme/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /src/templates/meta.ts: -------------------------------------------------------------------------------- 1 | export const META = {{{data}}}; 2 | -------------------------------------------------------------------------------- /packages/abc/hotkey/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/loading/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/lodop/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/media/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/pdf/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/result/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/xlsx/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/zip/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/card/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/core/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/gauge/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/pie/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/radar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/trend/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/form/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './src/form'; 2 | -------------------------------------------------------------------------------- /packages/testing/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/theme/index.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | -------------------------------------------------------------------------------- /packages/abc/avatar-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/count-down/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/date-picker/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/down-file/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/ellipsis/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/exception/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/full-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/notice-icon/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/observers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public-api'; 2 | -------------------------------------------------------------------------------- /packages/abc/onboarding/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/page-header/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/quick-menu/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/reuse-tab/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/tag-select/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/custom/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/mini-area/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/mini-bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/single-bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/tag-cloud/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/timeline/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/water-wave/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/dev-mode-types.d.ts: -------------------------------------------------------------------------------- 1 | declare const ngDevMode: boolean; 2 | -------------------------------------------------------------------------------- /packages/theme/src/locale/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/theme/theme-btn/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /src/app/shared/json-schema/index.md: -------------------------------------------------------------------------------- 1 | # 建议统一在 `widgets` 目录下自定义小部件 2 | -------------------------------------------------------------------------------- /packages/abc/error-collect/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/footer-toolbar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/global-footer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/abc/observers/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './observer-size'; 2 | -------------------------------------------------------------------------------- /packages/chart/chart-echarts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/mini-progress/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/chart/number-info/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/theme/layout-default/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/theme/setting-drawer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public_api'; 2 | -------------------------------------------------------------------------------- /packages/theme/system/theme-compact.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | -------------------------------------------------------------------------------- /schematics/application/files/root/_mock/index.ts: -------------------------------------------------------------------------------- 1 | export * from './_user'; 2 | -------------------------------------------------------------------------------- /packages/chart/core/types/time.ts: -------------------------------------------------------------------------------- 1 | export type G2Time = Date | string | number; 2 | -------------------------------------------------------------------------------- /_mock/chart.ts: -------------------------------------------------------------------------------- 1 | export const CHARTS = { 2 | 'GET /chart': { users: [1, 2] } 3 | }; 4 | -------------------------------------------------------------------------------- /_screenshot/ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/ms.png -------------------------------------------------------------------------------- /_screenshot/pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/pro.png -------------------------------------------------------------------------------- /_screenshot/yun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/yun.png -------------------------------------------------------------------------------- /packages/theme/dark.less: -------------------------------------------------------------------------------- 1 | @import './default.less'; 2 | @import './theme-dark.less'; 3 | -------------------------------------------------------------------------------- /packages/util/math/index.ts: -------------------------------------------------------------------------------- 1 | export * from './in-range'; 2 | export * from './round'; 3 | -------------------------------------------------------------------------------- /schematics/.npmignore: -------------------------------------------------------------------------------- 1 | # bug: https://github.com/npm/npm-packlist/issues/24 2 | !core 3 | -------------------------------------------------------------------------------- /src/app/core/code/files/polyfill.ts: -------------------------------------------------------------------------------- 1 | export default ` 2 | import 'zone.js'; 3 | `; 4 | -------------------------------------------------------------------------------- /src/assets/LOGO.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/LOGO.ai -------------------------------------------------------------------------------- /src/assets/demo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/demo.pdf -------------------------------------------------------------------------------- /src/assets/demo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/demo.zip -------------------------------------------------------------------------------- /src/assets/pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/pro.png -------------------------------------------------------------------------------- /_screenshot/ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/ipad.png -------------------------------------------------------------------------------- /_screenshot/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/start.png -------------------------------------------------------------------------------- /packages/abc/result/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{result-prefix}-rtl { 2 | direction: rtl; 3 | } 4 | -------------------------------------------------------------------------------- /packages/theme/compact.less: -------------------------------------------------------------------------------- 1 | @import './default.less'; 2 | @import './theme-compact.less'; 3 | -------------------------------------------------------------------------------- /packages/util/date-time/index.ts: -------------------------------------------------------------------------------- 1 | export * from './time'; 2 | export * from './picker'; 3 | -------------------------------------------------------------------------------- /schematics/application/files/root/_mock/README.md: -------------------------------------------------------------------------------- 1 | [Document](https://ng-alain.com/mock) 2 | -------------------------------------------------------------------------------- /src/assets/demo.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/demo.docx -------------------------------------------------------------------------------- /src/assets/demo.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/demo.pptx -------------------------------------------------------------------------------- /src/assets/demo.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/demo.xlsx -------------------------------------------------------------------------------- /src/assets/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/donate.png -------------------------------------------------------------------------------- /_screenshot/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/desktop.png -------------------------------------------------------------------------------- /_screenshot/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/iphone.png -------------------------------------------------------------------------------- /packages/abc/let/index.ts: -------------------------------------------------------------------------------- 1 | export * from './let.directive'; 2 | export * from './let.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/onboarding/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{onboarding-prefix}-rtl { 2 | direction: rtl; 3 | } 4 | -------------------------------------------------------------------------------- /packages/abc/reuse-tab/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{reuse-tab-prefix}-rtl { 2 | direction: rtl; 3 | } 4 | -------------------------------------------------------------------------------- /packages/util/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './validators'; 2 | export * from './match-control'; 3 | -------------------------------------------------------------------------------- /packages/util/pipes/format/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mask.pipe'; 2 | export * from './module'; 3 | -------------------------------------------------------------------------------- /packages/util/token/index.ts: -------------------------------------------------------------------------------- 1 | export * from './window'; 2 | export * from './page-visibility'; 3 | -------------------------------------------------------------------------------- /src/assets/img/404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/img/404.jpg -------------------------------------------------------------------------------- /src/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/img/logo.png -------------------------------------------------------------------------------- /src/assets/img/plnkr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/img/plnkr.png -------------------------------------------------------------------------------- /src/assets/qq-group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/qq-group.png -------------------------------------------------------------------------------- /_mock/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user'; 2 | export * from './chart'; 3 | export * from './upload'; 4 | -------------------------------------------------------------------------------- /packages/abc/avatar-list/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{avatar-list-prefix}-rtl { 2 | direction: rtl; 3 | } 4 | -------------------------------------------------------------------------------- /packages/abc/loading/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{loading-prefix}-default-rtl { 2 | direction: rtl; 3 | } 4 | -------------------------------------------------------------------------------- /packages/chart/bar/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './bar.component'; 2 | export * from './bar.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/pie/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './pie.component'; 2 | export * from './pie.module'; 3 | -------------------------------------------------------------------------------- /packages/util/decorator/index.ts: -------------------------------------------------------------------------------- 1 | export * from './convert'; 2 | export * from './zone-outside'; 3 | -------------------------------------------------------------------------------- /packages/util/pipes/filter/index.ts: -------------------------------------------------------------------------------- 1 | export * from './filter.pipe'; 2 | export * from './module'; 3 | -------------------------------------------------------------------------------- /src/assets/img/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/img/avatar.jpg -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/robots.txt: -------------------------------------------------------------------------------- 1 | user-agent: * 2 | disallow: /version/ 3 | sitemap: https://ng-alain.com/sitemap.xml 4 | -------------------------------------------------------------------------------- /_screenshot/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/_screenshot/architecture.png -------------------------------------------------------------------------------- /docs/acl.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 50 3 | title: ACL 4 | type: Advance 5 | url: /acl/getting-started 6 | --- 7 | -------------------------------------------------------------------------------- /docs/mock.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 60 3 | title: Mock 4 | type: Advance 5 | url: /mock/getting-started 6 | --- 7 | -------------------------------------------------------------------------------- /packages/chart/card/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './card.component'; 2 | export * from './card.module'; 3 | -------------------------------------------------------------------------------- /packages/theme/system/ng/index.less: -------------------------------------------------------------------------------- 1 | @import './_preserve-white-spaces.less'; 2 | @import './_form.less'; 3 | -------------------------------------------------------------------------------- /packages/tsconfig.lint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "include": ["**/*.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/util/array/index.ts: -------------------------------------------------------------------------------- 1 | export * from './array.service'; 2 | export * from './array-type.service'; 3 | -------------------------------------------------------------------------------- /scripts/site/index.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-unassigned-import 2 | import './generate'; 3 | -------------------------------------------------------------------------------- /src/assets/img/form-input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/img/form-input.png -------------------------------------------------------------------------------- /src/assets/img/logo-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/img/logo-color.png -------------------------------------------------------------------------------- /src/assets/screenshot/ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/ms.png -------------------------------------------------------------------------------- /src/assets/screenshot/pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/pro.png -------------------------------------------------------------------------------- /src/assets/screenshot/yun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/yun.png -------------------------------------------------------------------------------- /packages/abc/hotkey/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './hotkey.module'; 2 | export * from './hotkey.directive'; 3 | -------------------------------------------------------------------------------- /packages/abc/public_api.ts: -------------------------------------------------------------------------------- 1 | // https://github.com/ng-packagr/ng-packagr/issues/1655 2 | export default void 0; 3 | -------------------------------------------------------------------------------- /packages/chart/custom/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './custom.component'; 2 | export * from './custom.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/gauge/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './gauge.component'; 2 | export * from './gauge.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/radar/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './radar.component'; 2 | export * from './radar.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/trend/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './trend.component'; 2 | export * from './trend.module'; 3 | -------------------------------------------------------------------------------- /packages/public_api.ts: -------------------------------------------------------------------------------- 1 | // https://github.com/ng-packagr/ng-packagr/issues/1655 2 | export default void 0; 3 | -------------------------------------------------------------------------------- /schematics/application/files/src/app/routes/dashboard/dashboard.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/assets/icons/icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-72x72.png -------------------------------------------------------------------------------- /src/assets/icons/icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-96x96.png -------------------------------------------------------------------------------- /src/assets/screenshot/basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/basic.png -------------------------------------------------------------------------------- /src/assets/screenshot/ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/ipad.png -------------------------------------------------------------------------------- /src/assets/screenshot/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/start.png -------------------------------------------------------------------------------- /packages/abc/auto-focus/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auto-focus.directive'; 2 | export * from './auto-focus.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/mini-bar/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './mini-bar.component'; 2 | export * from './mini-bar.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/public_api.ts: -------------------------------------------------------------------------------- 1 | // https://github.com/ng-packagr/ng-packagr/issues/1655 2 | export default void 0; 3 | -------------------------------------------------------------------------------- /packages/chart/timeline/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './timeline.component'; 2 | export * from './timeline.module'; 3 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/widgets/index.less: -------------------------------------------------------------------------------- 1 | @import './_app-icons.less'; 2 | @import './_user.less'; 3 | -------------------------------------------------------------------------------- /packages/theme/system/antd/_link.less: -------------------------------------------------------------------------------- 1 | // 修复点击后,鼠标的移动会倒置目标出现下划线 2 | a:focus { 3 | text-decoration: none; 4 | } 5 | -------------------------------------------------------------------------------- /packages/theme/theme-btn/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{theme-btn-prefix}-rtl { 2 | right: inherit; 3 | left: 32px; 4 | } 5 | -------------------------------------------------------------------------------- /src/assets/icons/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-128x128.png -------------------------------------------------------------------------------- /src/assets/icons/icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-144x144.png -------------------------------------------------------------------------------- /src/assets/icons/icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-152x152.png -------------------------------------------------------------------------------- /src/assets/icons/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-192x192.png -------------------------------------------------------------------------------- /src/assets/icons/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-384x384.png -------------------------------------------------------------------------------- /src/assets/icons/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/icons/icon-512x512.png -------------------------------------------------------------------------------- /src/assets/screenshot/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/desktop.png -------------------------------------------------------------------------------- /src/assets/screenshot/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/iphone.png -------------------------------------------------------------------------------- /packages/chart/mini-area/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './mini-area.component'; 2 | export * from './mini-area.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/tag-cloud/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './tag-cloud.component'; 2 | export * from './tag-cloud.module'; 3 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/style/fix/index.less: -------------------------------------------------------------------------------- 1 | @{alain-blank-prefix} { 2 | @import './_page-header.less'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/theme/theme-btn/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './theme-btn.component'; 2 | export * from './theme-btn.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/number-info/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './number-info.component'; 2 | export * from './number-info.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/single-bar/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './single-bar.component'; 2 | export * from './single-bar.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/water-wave/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './water-wave.component'; 2 | export * from './water-wave.module'; 3 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/public_api.ts: -------------------------------------------------------------------------------- 1 | // https://github.com/ng-packagr/ng-packagr/issues/1655 2 | export default void 0; 3 | -------------------------------------------------------------------------------- /src/app/core/code/files/environment.ts: -------------------------------------------------------------------------------- 1 | export default `export const environment = { 2 | production: false 3 | }; 4 | `; 5 | -------------------------------------------------------------------------------- /src/assets/screenshot/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/architecture.png -------------------------------------------------------------------------------- /src/assets/screenshot/bundle-size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erupts/delon/master/src/assets/screenshot/bundle-size.png -------------------------------------------------------------------------------- /packages/abc/let/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "let", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/mini-progress/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './mini-progress.component'; 2 | export * from './mini-progress.module'; 3 | -------------------------------------------------------------------------------- /schematics/empty/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /schematics/utils/node.ts: -------------------------------------------------------------------------------- 1 | export function getNodeMajorVersion(): number { 2 | return +process.version.match(/^v(\d+)/)[1]; 3 | } 4 | -------------------------------------------------------------------------------- /docs/auth.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 40 3 | title: 4 | en-US: Auth 5 | zh-CN: 用户认证 6 | type: Advance 7 | url: /auth/getting-started 8 | --- 9 | -------------------------------------------------------------------------------- /docs/cli.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 10 3 | title: 4 | en-US: Cli 5 | zh-CN: 命令行工具 6 | type: Other 7 | url: /cli/getting-started 8 | --- 9 | -------------------------------------------------------------------------------- /packages/abc/exception/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './exception.component'; 2 | export { ExceptionModule } from './exception.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/lodop/lodop.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | @NgModule({}) 4 | export class LodopModule {} 5 | -------------------------------------------------------------------------------- /packages/abc/pdf/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "pdf", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/qr/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "qr", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/se/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "se", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/sg/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "sg", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/st/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "st", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/sv/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "sv", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/zip/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "zip", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/auth/src/auth.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | @NgModule({}) 4 | export class DelonAuthModule {} 5 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/style/theme-dark.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @alain-blank-bg: @component-background; 4 | -------------------------------------------------------------------------------- /packages/util/array/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "array", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/form/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "form", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/math/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "math", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/other/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "other", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/pipes/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "pipes", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/token/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "token", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /docs/cache.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 70 3 | title: 4 | en-US: Cache 5 | zh-CN: 缓存 6 | type: Advance 7 | url: /cache/getting-started 8 | --- 9 | -------------------------------------------------------------------------------- /docs/graph.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 20 3 | title: 4 | en-US: Charts 5 | zh-CN: 图表 6 | type: Advance 7 | url: /chart/getting-started 8 | --- 9 | -------------------------------------------------------------------------------- /docs/theme.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 10 3 | title: 4 | en-US: Theme 5 | zh-CN: 主题系统 6 | type: Advance 7 | url: /theme/getting-started 8 | --- 9 | -------------------------------------------------------------------------------- /packages/abc/hotkey/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "hotkey", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/lodop/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "lodop", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/media/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "media", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/result/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "result", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/result/public_api.ts: -------------------------------------------------------------------------------- 1 | export { ResultComponent } from './result.component'; 2 | export { ResultModule } from './result.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/xlsx/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "xlsx", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/cache/src/cache.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | @NgModule({}) 4 | export class DelonCacheModule {} 5 | -------------------------------------------------------------------------------- /packages/chart/bar/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "bar", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/card/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "card", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/core/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "core", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/gauge/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "gauge", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/pie/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "pie", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/radar/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "radar", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/trend/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "trend", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/theme/src/services/i18n/index.ts: -------------------------------------------------------------------------------- 1 | export * from './i18n'; 2 | export * from './i18n.pipe'; 3 | export * from './i18n-url.guard'; 4 | -------------------------------------------------------------------------------- /packages/theme/src/version.ts: -------------------------------------------------------------------------------- 1 | import { Version } from '@angular/core'; 2 | 3 | export const VERSION = new Version('0.0.0-PLACEHOLDER'); 4 | -------------------------------------------------------------------------------- /packages/util/browser/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "browser", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/config/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "config", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/config/theme/index.ts: -------------------------------------------------------------------------------- 1 | export * from './http.type'; 2 | export * from './responsive.type'; 3 | export * from './i18n.type'; 4 | -------------------------------------------------------------------------------- /packages/util/docs/getting-started.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: 开始使用 4 | type: Documents 5 | --- 6 | 7 | @delon/util 是一组日常普通使用的工具函数的集合。 -------------------------------------------------------------------------------- /packages/util/format/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "format", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | export 'HUSKY_GIT_PARAMS'="$1" 4 | npx --no-install commitlint --edit "$1" 5 | -------------------------------------------------------------------------------- /packages/abc/auto-focus/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "auto-focus", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/ellipsis/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "ellipsis", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/loading/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "loading", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/media/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './media.component'; 2 | export * from './media.service'; 3 | export * from './media.module'; 4 | -------------------------------------------------------------------------------- /packages/abc/sg/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './sg-container.component'; 2 | export * from './sg.component'; 3 | export * from './sg.module'; 4 | -------------------------------------------------------------------------------- /packages/cache/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './src/interface'; 2 | export * from './src/cache.service'; 3 | export * from './src/cache.module'; 4 | -------------------------------------------------------------------------------- /packages/chart/core/types/interaction.ts: -------------------------------------------------------------------------------- 1 | export type G2InteractionType = 'none' | 'element-active' | 'active-region' | 'brush' | 'drag-move'; 2 | -------------------------------------------------------------------------------- /packages/chart/custom/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "custom", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/style/index.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @import './_layout.less'; 4 | @import './fix/index.less'; 5 | -------------------------------------------------------------------------------- /packages/theme/src/services/http/index.ts: -------------------------------------------------------------------------------- 1 | export * from './http.client'; 2 | export * from './http.decorator'; 3 | export * from './http.token'; 4 | -------------------------------------------------------------------------------- /packages/util/config/abc/onboarding.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainOnboardingConfig { 2 | /** 文字方向 */ 3 | direction?: 'ltr' | 'rtl'; 4 | } 5 | -------------------------------------------------------------------------------- /packages/util/date-time/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "date-time", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/decorator/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "decorator", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /schematics/utils/lib-versions.ts: -------------------------------------------------------------------------------- 1 | export const VERSION = 'PEER-0.0.0-PLACEHOLDER'; 2 | export const ZORROVERSION = 'ZORRO-0.0.0-PLACEHOLDER'; 3 | -------------------------------------------------------------------------------- /packages/abc/avatar-list/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "avatar-list", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/count-down/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "count-down", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/date-picker/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "date-picker", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/down-file/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "down-file", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/ellipsis/public_api.ts: -------------------------------------------------------------------------------- 1 | export { EllipsisComponent } from './ellipsis.component'; 2 | export { EllipsisModule } from './ellipsis.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/exception/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "exception", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/notice-icon/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "notice-icon", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/onboarding/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "onboarding", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/page-header/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "page-header", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/quick-menu/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "quick-menu", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/reuse-tab/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "reuse-tab", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/tag-select/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "tag-select", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/mini-area/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "mini-area", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/mini-bar/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "mini-bar", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/single-bar/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "single-bar", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/tag-cloud/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "tag-cloud", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/timeline/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "timeline", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/water-wave/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "water-wave", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/other/index.ts: -------------------------------------------------------------------------------- 1 | export * from './deep'; 2 | export * from './logger'; 3 | export * from './lazy.service'; 4 | export * from './assert'; 5 | -------------------------------------------------------------------------------- /packages/util/pipes/filter/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "pipe-filter", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/util/pipes/format/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "pipe-format", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/zone-flags.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 2 | (window as any)['__zone_symbol__PASSIVE_EVENTS'] = ['scroll']; 3 | -------------------------------------------------------------------------------- /packages/abc/down-file/public_api.ts: -------------------------------------------------------------------------------- 1 | export { DownFileDirective } from './down-file.directive'; 2 | export { DownFileModule } from './down-file.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/error-collect/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "error-collect", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/full-content/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "full-content", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/global-footer/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "global-footer", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/zip/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './zip.types'; 2 | export { ZipService } from './zip.service'; 3 | export { ZipModule } from './zip.module'; 4 | -------------------------------------------------------------------------------- /packages/chart/number-info/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "number-info", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/form/examples/acl/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: acl 3 | subtitle: ACL 4 | type: Examples 5 | --- 6 | 7 | 结合 `@delon/acl` 权限可以利用一个 Schema 来构建不同角色或权限点的表单。 -------------------------------------------------------------------------------- /packages/theme/layout-blank/style/theme-compact.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @alain-blank-content-padding-horizontal: @layout-gutter; 4 | -------------------------------------------------------------------------------- /packages/theme/theme-btn/ng-package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "lib": { 4 | "flatModuleFile": "theme-btn", 5 | "entryFile": "public_api.ts" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/util/pipes/currency/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "pipe-currency", 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/count-down/public_api.ts: -------------------------------------------------------------------------------- 1 | export { CountDownComponent } from './count-down.component'; 2 | export { CountDownModule } from './count-down.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/footer-toolbar/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "footer-toolbar", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/observers/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "chart-observer-size", 4 | "entryFile": "public-api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/abc/quick-menu/public_api.ts: -------------------------------------------------------------------------------- 1 | export { QuickMenuComponent } from './quick-menu.component'; 2 | export { QuickMenuModule } from './quick-menu.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/tag-select/public_api.ts: -------------------------------------------------------------------------------- 1 | export { TagSelectComponent } from './tag-select.component'; 2 | export { TagSelectModule } from './tag-select.module'; 3 | -------------------------------------------------------------------------------- /packages/chart/chart-echarts/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "chart-echarts", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/chart/mini-progress/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "lib": { 3 | "flatModuleFile": "mini-progress", 4 | "entryFile": "public_api.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/ng-package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "lib": { 4 | "flatModuleFile": "layout-blank", 5 | "entryFile": "public_api.ts" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/app/layout/header/search-box.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/abc/page-header/public_api.ts: -------------------------------------------------------------------------------- 1 | export { PageHeaderComponent } from './page-header.component'; 2 | export { PageHeaderModule } from './page-header.module'; 3 | -------------------------------------------------------------------------------- /packages/license-banner.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * @license ng-alain(cipchk@qq.com) v0.0.0-PLACEHOLDER 3 | * (c) 2020 cipchk https://ng-alain.com/ 4 | * License: MIT 5 | */ 6 | -------------------------------------------------------------------------------- /packages/theme/layout-default/ng-package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "lib": { 4 | "flatModuleFile": "layout-default", 5 | "entryFile": "public_api.ts" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/fix/_notice-icon.less: -------------------------------------------------------------------------------- 1 | @{alain-default-prefix}__nav-item .@{ant-prefix}-badge-count { 2 | top: 6px; 3 | right: 18px; 4 | } 5 | -------------------------------------------------------------------------------- /packages/theme/setting-drawer/ng-package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "lib": { 4 | "flatModuleFile": "setting-drawer", 5 | "entryFile": "public_api.ts" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/theme/system/mixins/index.less: -------------------------------------------------------------------------------- 1 | @import './_freak.less'; 2 | @import './_functions.less'; 3 | @import './_text-truncate.less'; 4 | @import './_router.less'; 5 | -------------------------------------------------------------------------------- /packages/util/pipes/currency/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mega.pipe'; 2 | export * from './price.pipe'; 3 | export * from './module'; 4 | export * from './cny.pipe'; 5 | -------------------------------------------------------------------------------- /packages/util/pipes/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@delon/util/pipes/currency'; 2 | export * from '@delon/util/pipes/format'; 3 | export * from '@delon/util/pipes/filter'; 4 | -------------------------------------------------------------------------------- /packages/abc/lodop/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './lodop.types'; 2 | export { LodopService } from './lodop.service'; 3 | export { LodopModule } from './lodop.module'; 4 | -------------------------------------------------------------------------------- /packages/abc/qr/qr.types.ts: -------------------------------------------------------------------------------- 1 | import { AlainQRConfig } from '@delon/util/config'; 2 | 3 | export interface QROptions extends AlainQRConfig { 4 | value: string; 5 | } 6 | -------------------------------------------------------------------------------- /packages/form/src/widgets/custom/schema.ts: -------------------------------------------------------------------------------- 1 | import { SFUISchemaItem } from '../../schema/ui'; 2 | 3 | export interface SFCustomWidgetSchema extends SFUISchemaItem {} 4 | -------------------------------------------------------------------------------- /packages/util/format/index.ts: -------------------------------------------------------------------------------- 1 | export * from './string'; 2 | export * from './validate'; 3 | export * from './currency.service'; 4 | export * from './currency.types'; 5 | -------------------------------------------------------------------------------- /schematics/plugin/files/ie/tsconfig-es5.app.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | extends: './tsconfig.app.json', 3 | compilerOptions: { 4 | target: 'es5', 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /schematics/plugin/files/ie/tsconfig-es5.spec.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | extends: './tsconfig.spec.json', 3 | compilerOptions: { 4 | target: 'es5', 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/abc/error-collect/public_api.ts: -------------------------------------------------------------------------------- 1 | export { ErrorCollectComponent } from './error-collect.component'; 2 | export { ErrorCollectModule } from './error-collect.module'; 3 | -------------------------------------------------------------------------------- /packages/abc/se/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './se-container.component'; 2 | export * from './se.component'; 3 | export * from './se.module'; 4 | export * from './se.types'; 5 | -------------------------------------------------------------------------------- /packages/theme/src/locale/locale.tokens.ts: -------------------------------------------------------------------------------- 1 | import { InjectionToken } from '@angular/core'; 2 | 3 | export const DELON_LOCALE = new InjectionToken('delon-locale'); 4 | -------------------------------------------------------------------------------- /packages/theme/system/utils/_img.less: -------------------------------------------------------------------------------- 1 | /** 2 | * Responsive images 3 | * 4 | * 响应式图像 5 | */ 6 | .img-fluid { 7 | max-width: 100%; 8 | height: auto; 9 | } 10 | -------------------------------------------------------------------------------- /packages/util/docs/getting-started.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: Getting Started 4 | type: Documents 5 | --- 6 | 7 | `@delon/util` is a collection of tool functions. 8 | -------------------------------------------------------------------------------- /packages/abc/footer-toolbar/public_api.ts: -------------------------------------------------------------------------------- 1 | export { FooterToolbarComponent } from './footer-toolbar.component'; 2 | export { FooterToolbarModule } from './footer-toolbar.module'; 3 | -------------------------------------------------------------------------------- /packages/util/config/abc/exception.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainExceptionType { 2 | typeDict?: { [key: number | string]: { img: string; title: string; desc?: string } }; 3 | } 4 | -------------------------------------------------------------------------------- /packages/abc/date-picker/public_api.ts: -------------------------------------------------------------------------------- 1 | export { DatePickerModule } from './date-picker.module'; 2 | export * from './range.directive'; 3 | export * from './range-shortcut.component'; 4 | -------------------------------------------------------------------------------- /packages/abc/qr/public_api.ts: -------------------------------------------------------------------------------- 1 | export { QRComponent } from './qr.component'; 2 | export * from './qr.config'; 3 | export * from './qr.types'; 4 | export { QRModule } from './qr.module'; 5 | -------------------------------------------------------------------------------- /packages/abc/sv/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './sv-container.component'; 2 | export * from './sv-value.component'; 3 | export * from './sv.component'; 4 | export * from './sv.module'; 5 | -------------------------------------------------------------------------------- /packages/acl/src/acl.config.ts: -------------------------------------------------------------------------------- 1 | import type { AlainACLConfig } from '@delon/util/config'; 2 | 3 | export const ACL_DEFAULT_CONFIG: AlainACLConfig = { 4 | guard_url: `/403` 5 | }; 6 | -------------------------------------------------------------------------------- /packages/abc/loading/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './loading.component'; 2 | export * from './loading.service'; 3 | export * from './loading.module'; 4 | export * from './loading.types'; 5 | -------------------------------------------------------------------------------- /packages/theme/setting-drawer/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './setting-drawer-item.component'; 2 | export * from './setting-drawer.component'; 3 | export * from './setting-drawer.module'; 4 | -------------------------------------------------------------------------------- /src/app/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components/dialog/modal.component'; 2 | export * from './components/dialog/drawer.component'; 3 | export * from './components/dialog/sf.component'; 4 | -------------------------------------------------------------------------------- /packages/abc/pdf/public_api.ts: -------------------------------------------------------------------------------- 1 | export { PdfComponent } from './pdf.component'; 2 | export * from './pdf.config'; 3 | export * from './pdf.types'; 4 | export { PdfModule } from './pdf.module'; 5 | -------------------------------------------------------------------------------- /packages/chart/chart-echarts/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './echarts.service'; 2 | export * from './echarts.component'; 3 | export * from './echarts.module'; 4 | export * from './echarts.types'; 5 | -------------------------------------------------------------------------------- /packages/util/browser/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cookie.service'; 2 | export * from './copy'; 3 | export * from './is-empty'; 4 | export * from './scroll.service'; 5 | export * from './style'; 6 | -------------------------------------------------------------------------------- /schematics/plugin/files/sts/swagger-list/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/theme/system/widgets/index.less: -------------------------------------------------------------------------------- 1 | @import './_abs.less'; 2 | @import './_form.less'; 3 | @import './_half-float.less'; 4 | @import './_masonry-grid.less'; 5 | @import './_header-dropdown.less'; 6 | -------------------------------------------------------------------------------- /schematics/plugin/plugin.asdf.ts: -------------------------------------------------------------------------------- 1 | import { Rule } from '@angular-devkit/schematics'; 2 | 3 | export function pluginAsdf(): Rule { 4 | return () => { 5 | console.log(`哈哈……什么都不做的!`); 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /schematics/plugin/schema.ts: -------------------------------------------------------------------------------- 1 | export interface Schema { 2 | name: string; 3 | type: 'add' | 'remove'; 4 | project?: string; 5 | packageManager?: 'npm' | 'yarn'; 6 | defaultLanguage?: string; 7 | } 8 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | export NODE_OPTIONS="--max-old-space-size=4096" 4 | npx --no-install tsc -p packages/tsconfig.json --noEmit 5 | npx --no-install lint-staged 6 | -------------------------------------------------------------------------------- /packages/abc/onboarding/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './onboarding.service'; 2 | export * from './onboarding.types'; 3 | export * from './onboarding.component'; 4 | 5 | export * from './onboarding.module'; 6 | -------------------------------------------------------------------------------- /packages/chart/core/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './types/interaction'; 2 | export * from './types/time'; 3 | export * from './g2.servicce'; 4 | export * from './g2.base.component'; 5 | export * from './utils'; 6 | -------------------------------------------------------------------------------- /packages/theme/system/index.less: -------------------------------------------------------------------------------- 1 | // antd: base 2 | @import 'ng-zorro-antd/style/entry.less'; 3 | // antd: all components 4 | @import 'ng-zorro-antd/components.less'; 5 | // system 6 | @import './entry.less'; 7 | -------------------------------------------------------------------------------- /packages/util/config/abc/sg.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainSGConfig { 2 | /** 3 | * 间距,默认:`32` 4 | */ 5 | gutter?: number; 6 | /** 7 | * 列数,默认:`2` 8 | */ 9 | col?: number; 10 | } 11 | -------------------------------------------------------------------------------- /schematics/module/schema.ts: -------------------------------------------------------------------------------- 1 | import { Schema as ModuleSchema } from '@schematics/angular/module/schema'; 2 | 3 | export interface Schema extends ModuleSchema { 4 | service?: 'ignore' | 'none' | 'root'; 5 | } 6 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | packages/theme/system/mixins/**/* 2 | src/assets/**/* 3 | 4 | packages/theme/system/utils/_border.less 5 | packages/theme/system/utils/_color.less 6 | packages/theme/system/utils/_spacing.less 7 | -------------------------------------------------------------------------------- /packages/abc/xlsx/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './xlsx.types'; 2 | export { XlsxService } from './xlsx.service'; 3 | export { XlsxDirective } from './xlsx.directive'; 4 | export { XlsxModule } from './xlsx.module'; 5 | -------------------------------------------------------------------------------- /packages/abc/zip/zip.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | @NgModule({ 5 | imports: [CommonModule] 6 | }) 7 | export class ZipModule {} 8 | -------------------------------------------------------------------------------- /schematics/application/schema.ts: -------------------------------------------------------------------------------- 1 | export interface Schema { 2 | form?: boolean; 3 | mock?: boolean; 4 | i18n?: boolean; 5 | codeStyle?: boolean; 6 | project?: string; 7 | defaultLanguage?: string; 8 | } 9 | -------------------------------------------------------------------------------- /packages/abc/exception/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{exception-prefix}-rtl { 2 | direction: rtl; 3 | @{exception-prefix}__cont-actions { 4 | .@{ant-prefix}-btn:not(:last-child) { 5 | margin-right: 0; 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/abc/global-footer/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './global-footer.types'; 2 | export * from './global-footer.component'; 3 | export * from './global-footer-item.component'; 4 | export * from './global-footer.module'; 5 | -------------------------------------------------------------------------------- /packages/mock/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './src/interface'; 2 | export * from './src/status.error'; 3 | export * from './src/mock.service'; 4 | export * from './src/mock.interceptor'; 5 | export * from './src/mock.module'; 6 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/fix/_quick-menu.less: -------------------------------------------------------------------------------- 1 | @{quick-menu-prefix} { 2 | @media (max-width: @mobile-max) { 3 | right: -(@alain-default-content-padding + @quick-menu-border-width) !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /schematics/utils/code-style.ts: -------------------------------------------------------------------------------- 1 | export const LINT_STAGED = 'lint-staged'; 2 | 3 | export const LINT_STAGED_CONFIG = { 4 | '(src)/**/*.{html,ts}': ['eslint --fix'], 5 | '(src)/**/*.less': ['npm run lint:style'] 6 | }; 7 | -------------------------------------------------------------------------------- /.github/semantic.yml: -------------------------------------------------------------------------------- 1 | titleAndCommits: true 2 | types: 3 | - feat 4 | - fix 5 | - docs 6 | - style 7 | - refactor 8 | - perf 9 | - test 10 | - build 11 | - ci 12 | - chore 13 | - revert 14 | - release 15 | -------------------------------------------------------------------------------- /packages/mock/src/status.error.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | 3 | export class MockStatusError { 4 | statusText?: string; 5 | 6 | constructor(public status: number, public error?: any) {} 7 | } 8 | -------------------------------------------------------------------------------- /packages/abc/avatar-list/public_api.ts: -------------------------------------------------------------------------------- 1 | export { AvatarListItemComponent } from './avatar-list-item.component'; 2 | export { AvatarListComponent } from './avatar-list.component'; 3 | export { AvatarListModule } from './avatar-list.module'; 4 | -------------------------------------------------------------------------------- /packages/form/examples/i18n/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: i18n 3 | subtitle: 国际化 4 | type: Examples 5 | --- 6 | 7 | JSON Schema 本身只是一个 JSON 对象,因此本质上已经是支持国际化。此外,`sf` 还支持一些比较快捷的国际化方式,但它支持的元素比较基础:`title`、`description`、`optionalHelp` 三个元素。 8 | -------------------------------------------------------------------------------- /packages/tsconfig.lib.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.lib.json", 3 | "compilerOptions": { 4 | "declarationMap": false 5 | }, 6 | "angularCompilerOptions": { 7 | "compilationMode": "partial" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /schematics/ng-add/schema.ts: -------------------------------------------------------------------------------- 1 | export interface Schema { 2 | form?: boolean; 3 | mock?: boolean; 4 | defaultLanguage?: string; 5 | i18n?: boolean; 6 | codeStyle?: boolean; 7 | npm?: boolean; 8 | yarn?: boolean; 9 | } 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Enforce Unix newlines 2 | *.css text eol=lf 3 | *.html text eol=lf 4 | *.js text eol=lf 5 | *.ts text eol=lf 6 | *.json text eol=lf 7 | *.less text eol=lf 8 | *.md text eol=lf 9 | *.yml text eol=lf 10 | -------------------------------------------------------------------------------- /_mock/upload.ts: -------------------------------------------------------------------------------- 1 | export const UPLOADS = { 2 | 'POST /upload': () => { 3 | return { 4 | resource_id: +new Date(), 5 | url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' 6 | }; 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /ng-alain.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./schematics/schema.json", 3 | "theme": { 4 | "list": [ 5 | { 6 | "theme": "dark" 7 | }, 8 | { 9 | "theme": "compact" 10 | } 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/util/config/abc/error-collect.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainErrorCollectConfig { 2 | /** 3 | * 监听频率,默认:`500` 4 | */ 5 | freq?: number; 6 | /** 7 | * 顶部偏移值,默认:`145` 8 | */ 9 | offsetTop?: number; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/core/index.ts: -------------------------------------------------------------------------------- 1 | export * from './code/code.service'; 2 | export * from './i18n/service'; 3 | export * from './app.service'; 4 | export * from './meta.service'; 5 | export * from './mobile.service'; 6 | export * from './startup.service'; 7 | -------------------------------------------------------------------------------- /schematics/ng-update/data/class-names.ts: -------------------------------------------------------------------------------- 1 | import { ClassNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const classNames: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /schematics/ng-update/data/input-names.ts: -------------------------------------------------------------------------------- 1 | import { InputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const inputNames: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /src/dev/demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-demo', 5 | template: `` 6 | }) 7 | export class DemoComponent { 8 | _n(): void { 9 | console.log('n'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/abc/highlight/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Other 3 | title: highlight 4 | subtitle: 高亮 5 | cols: 1 6 | module: import { NzHighlightModule } from 'ng-zorro-antd/core/highlight'; 7 | --- 8 | 9 | 来自 `ng-zorro-antd/core/highlight` 的高亮组件。 10 | -------------------------------------------------------------------------------- /packages/mock/src/mock.config.ts: -------------------------------------------------------------------------------- 1 | import type { AlainMockConfig } from '@delon/util/config'; 2 | 3 | export const MOCK_DEFULAT_CONFIG: AlainMockConfig = { 4 | delay: 300, 5 | force: false, 6 | log: true, 7 | executeOtherInterceptors: true 8 | }; 9 | -------------------------------------------------------------------------------- /packages/mock/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/*": ["../../dist/@delon/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/style/_layout.less: -------------------------------------------------------------------------------- 1 | @{alain-blank-prefix} { 2 | display: block; 3 | padding: @alain-blank-content-padding-vertical @alain-blank-content-padding-horizontal; 4 | background-color: @alain-blank-bg; 5 | .router-ant(); 6 | } 7 | -------------------------------------------------------------------------------- /packages/theme/system/antd/_input-number.less: -------------------------------------------------------------------------------- 1 | /** 2 | * Hide step icon 3 | * 4 | * 隐藏步数操作区 5 | */ 6 | .@{ant-prefix}-input-number__hide-step { 7 | .@{ant-prefix}-input-number-handler-wrap { 8 | visibility: hidden; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /schematics/application/files/src/app/shared/index.ts: -------------------------------------------------------------------------------- 1 | // Components 2 | 3 | // Utils 4 | export * from './utils/yuan'; 5 | 6 | // Module 7 | export * from './shared.module'; 8 | <% if (form) { %>export * from './json-schema/json-schema.module';<% } %> 9 | -------------------------------------------------------------------------------- /schematics/ng-update/data/output-names.ts: -------------------------------------------------------------------------------- 1 | import { OutputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const outputNames: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /packages/cache/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/*": ["../../dist/@delon/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/testing/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/*": ["../../dist/@delon/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /schematics/ng-update/data/css-selectors.ts: -------------------------------------------------------------------------------- 1 | import { CssSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const cssSelectors: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /schematics/ng-update/data/property-names.ts: -------------------------------------------------------------------------------- 1 | import { PropertyNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const propertyNames: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /packages/abc/global-footer/global-footer.types.ts: -------------------------------------------------------------------------------- 1 | import type { NzSafeAny } from 'ng-zorro-antd/core/types'; 2 | 3 | export interface GlobalFooterLink { 4 | [key: string]: NzSafeAny; 5 | title: string; 6 | href: string; 7 | blankTarget?: boolean; 8 | } 9 | -------------------------------------------------------------------------------- /packages/theme/default.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @import './system/index.less'; 4 | @import './layout-default/style/index.less'; 5 | @import './layout-blank/style/index.less'; 6 | @import '../abc/index.less'; 7 | @import '../chart/index.less'; 8 | -------------------------------------------------------------------------------- /packages/util/pipes/filter/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: filter 3 | subtitle: 过滤数组 4 | type: Pipes 5 | module: import { FilterPipeModule } from '@delon/util/pipes/filter'; 6 | --- 7 | 8 | ## filter 9 | 10 | 过滤数组。 11 | 12 | [comment]: 13 | -------------------------------------------------------------------------------- /packages/util/pipes/format/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: format 3 | subtitle: 掩码 4 | type: Pipes 5 | module: import { FormatPipeModule } from '@delon/util/pipes/format'; 6 | --- 7 | 8 | ## mask 9 | 10 | 格式化掩码。 11 | 12 | [comment]: 13 | -------------------------------------------------------------------------------- /packages/util/token/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: token 3 | subtitle: Token 4 | type: Tools 5 | --- 6 | 7 | ## WINDOW 8 | 9 | 访问全局 `window` 对象。 10 | 11 | ## PAGE_VISIBILITY 12 | 13 | 通过 `visibilitychange` 事件来监听浏览器选项卡是否可见,一般用于当用户离开应用时暂时中断后端持续发送请求时。 14 | -------------------------------------------------------------------------------- /schematics/ng-update/data/method-call-checks.ts: -------------------------------------------------------------------------------- 1 | import { MethodCallUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const methodCallChecks: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /src/app/core/code/files/sandbox.config.json.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | infiniteLoopProtection: true, 3 | hardReloadOnChange: false, 4 | view: 'browser', 5 | template: 'node', 6 | container: { 7 | node: '16', 8 | port: 4200 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /src/app/routes/404/404.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

404

4 |

你要找的页面不存在,你可能在找:

5 | 8 |
9 |
10 | -------------------------------------------------------------------------------- /packages/chart/docs/faq.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 100 3 | title: 常见问题 4 | type: Documents 5 | --- 6 | 7 | ## 如何自适应容器宽高? 8 | 9 | G2 当前版本并不会根据容器宽高自适应,目前只会根据浏览器窗体大小才会重新变更图表尺寸,因此需要手动监听容器大小的变化并调用 `chart.forceFit()` 重新渲染图表尺寸。 10 | 11 | [comment]: 12 | -------------------------------------------------------------------------------- /packages/theme/system/utils/_code.less: -------------------------------------------------------------------------------- 1 | // Inline code 2 | code { 3 | margin: 0 4px; 4 | padding: 2px 4px; 5 | font-size: 90%; 6 | background-color: @code-bg; 7 | border: 1px solid @code-border-color; 8 | border-radius: @border-radius-base; 9 | } 10 | -------------------------------------------------------------------------------- /packages/theme/theme-dark.less: -------------------------------------------------------------------------------- 1 | @import 'ng-zorro-antd/src/style/themes/dark.less'; 2 | @import './system/theme-dark.less'; 3 | @import './layout-default/style/theme-dark.less'; 4 | @import './layout-blank/style/theme-dark.less'; 5 | @import '../abc/theme-dark.less'; 6 | -------------------------------------------------------------------------------- /scripts/ci/helper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rm -rf archive-docs 3 | git clone https://github.com/ng-alain/archive-docs.git 4 | cp -r archive-docs/issue-helper src/dist/browser/issue-helper 5 | cp -r archive-docs/version src/dist/browser/version 6 | rm -rf archive-docs 7 | -------------------------------------------------------------------------------- /src/styles/_ng.less: -------------------------------------------------------------------------------- 1 | app-root, 2 | app-docs, 3 | .menu-site nz-dropdown, 4 | .menu-site .ant-dropdown-trigger { 5 | display: block; 6 | } 7 | 8 | .ant-btn + .ant-btn { 9 | margin-left: 8px; 10 | } 11 | 12 | .ant-menu-item { 13 | outline: none; 14 | } 15 | -------------------------------------------------------------------------------- /packages/acl/src/style/index.less: -------------------------------------------------------------------------------- 1 | /** 2 | * [ACL](https://ng-alain.com/acl/control) 使用 `display: none` 隐藏未授权元素 3 | * [ACL](https://ng-alain.com/acl/control) Hides the unauthorized element with `display: none` 4 | */ 5 | .acl__hide { 6 | display: none !important; 7 | } 8 | -------------------------------------------------------------------------------- /packages/form/src/model/boolean.property.ts: -------------------------------------------------------------------------------- 1 | import { SFValue } from '../interface'; 2 | import { AtomicProperty } from './atomic.property'; 3 | 4 | export class BooleanProperty extends AtomicProperty { 5 | fallbackValue(): SFValue { 6 | return null; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/util/pipes/filter/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: filter 3 | subtitle: Filter 4 | type: Pipes 5 | module: import { FilterPipeModule } from '@delon/util/pipes/filter'; 6 | --- 7 | 8 | ## filter 9 | 10 | Filter array. 11 | 12 | [comment]: 13 | -------------------------------------------------------------------------------- /packages/util/pipes/format/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: format 3 | subtitle: Mask 4 | type: Pipes 5 | module: import { FormatPipeModule } from '@delon/util/pipes/format'; 6 | --- 7 | 8 | ## mask 9 | 10 | Format mask. 11 | 12 | [comment]: 13 | -------------------------------------------------------------------------------- /schematics/ng-update/data/element-selectors.ts: -------------------------------------------------------------------------------- 1 | import { ElementSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const elementSelectors: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /packages/abc/highlight/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Other 3 | title: highlight 4 | subtitle: Highlight 5 | cols: 1 6 | module: import { NzHighlightModule } from 'ng-zorro-antd/core/highlight'; 7 | --- 8 | 9 | Highlight component from `ng-zorro-antd/core/highlight`. 10 | -------------------------------------------------------------------------------- /packages/abc/notice-icon/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './notice-icon.types'; 2 | export { NoticeIconTabComponent } from './notice-icon-tab.component'; 3 | export { NoticeIconComponent } from './notice-icon.component'; 4 | export { NoticeIconModule } from './notice-icon.module'; 5 | -------------------------------------------------------------------------------- /packages/form/examples/conditional/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: visibleIf 3 | subtitle: 条件表达式 4 | type: Examples 5 | --- 6 | 7 | `sf` 支持两种类型的条件表达式,分别为: 8 | - JSON Schema 标准 [if-then-else](https://ajv.js.org/json-schema.html#if-then-else) 9 | - 灵活性更强的 `visibleIf` 10 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/style/theme-default.less: -------------------------------------------------------------------------------- 1 | @alain-blank-prefix: ~'.alain-blank'; 2 | @alain-blank-zindex: @zindex-base; 3 | 4 | @alain-blank-bg: #f5f7fa; 5 | @alain-blank-content-padding-vertical: 0; 6 | @alain-blank-content-padding-horizontal: @layout-gutter * 2; 7 | -------------------------------------------------------------------------------- /schematics/ng-update/data/attribute-selectors.ts: -------------------------------------------------------------------------------- 1 | import { AttributeSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | export const attributeSelectors: VersionChanges = { 4 | [TargetVersion.V15]: [] 5 | }; 6 | -------------------------------------------------------------------------------- /packages/theme/theme-compact.less: -------------------------------------------------------------------------------- 1 | @import 'ng-zorro-antd/src/style/themes/compact.less'; 2 | @import './system/theme-compact.less'; 3 | @import './layout-default/style/theme-compact.less'; 4 | @import './layout-blank/style/theme-compact.less'; 5 | @import '../abc/theme-compact.less'; 6 | -------------------------------------------------------------------------------- /packages/theme/theme-default.less: -------------------------------------------------------------------------------- 1 | @import 'ng-zorro-antd/src/style/themes/default.less'; 2 | @import './system/theme-default.less'; 3 | @import './layout-default/style/theme-default.less'; 4 | @import './layout-blank/style/theme-default.less'; 5 | @import '../abc/theme-default.less'; 6 | -------------------------------------------------------------------------------- /packages/abc/error-collect/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{error-collect-prefix}-rtl { 2 | padding-right: 0; 3 | padding-left: 24px; 4 | direction: rtl; 5 | @{error-collect-prefix} { 6 | &__count { 7 | padding-right: 8px; 8 | padding-left: 0; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/theme/system/antd/_tag.less: -------------------------------------------------------------------------------- 1 | .@{ant-prefix}-tag { 2 | &__plus { 3 | /** 4 | * Tag: [+] style 5 | * 6 | * 标签:【+】的样式 7 | */ 8 | .@{ant-prefix}-tag { 9 | background: #fff; 10 | border-style: dashed; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/theme/system/delon/index.less: -------------------------------------------------------------------------------- 1 | @import '../../../form/src/style/index.less'; 2 | @import '../../../acl/src/style/index.less'; 3 | @import '../../setting-drawer/style/index.less'; 4 | @import '../../theme-btn/style/index.less'; 5 | @import '../../src/pipes/yn/style/index.less'; 6 | -------------------------------------------------------------------------------- /schematics/application/files/src/app/core/index.ts: -------------------------------------------------------------------------------- 1 | <% if (i18n) { %>export * from './i18n/i18n.service';<% } %> 2 | export * from './module-import-guard'; 3 | export * from './net/default.interceptor'; 4 | export * from './startup/startup.service'; 5 | export * from './start-page.guard'; 6 | -------------------------------------------------------------------------------- /packages/acl/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src/acl.service'; 2 | export * from './src/acl-if.directive'; 3 | export * from './src/acl.directive'; 4 | export * from './src/acl.config'; 5 | export * from './src/acl.type'; 6 | export * from './src/acl-guard'; 7 | export * from './src/acl.module'; 8 | -------------------------------------------------------------------------------- /packages/testing/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/testing", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "testing", 7 | "entryFile": "public_api.ts" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/fix/index.less: -------------------------------------------------------------------------------- 1 | @import './_sidebar-nav.less'; 2 | @import './_footer-toolbar.less'; 3 | @import './_full-content.less'; 4 | @import './_page-header.less'; 5 | @import './_quick-menu.less'; 6 | @import './_reuse-tab.less'; 7 | @import './_notice-icon.less'; 8 | -------------------------------------------------------------------------------- /packages/util/pipes/filter/module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { FilterPipe } from './filter.pipe'; 4 | 5 | const PIPES = [FilterPipe]; 6 | 7 | @NgModule({ 8 | declarations: PIPES, 9 | exports: PIPES 10 | }) 11 | export class FilterPipeModule {} 12 | -------------------------------------------------------------------------------- /packages/auth/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/*": ["../../dist/@delon/*"] 8 | }, 9 | "types": ["../dev-mode-types"] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/form/examples/conditional/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Conditional expression 3 | type: Examples 4 | --- 5 | 6 | `sf` supports two types of conditional expressions: 7 | - JSON Schema Standard [if-then-else](https://ajv.js.org/json-schema.html#if-then-else) 8 | - More flexible `visibleIf` 9 | -------------------------------------------------------------------------------- /packages/form/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/*": ["../../dist/@delon/*"] 8 | }, 9 | "types": ["../dev-mode-types"] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/util/pipes/format/module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { FormatMaskPipe } from './mask.pipe'; 4 | 5 | const PIPES = [FormatMaskPipe]; 6 | 7 | @NgModule({ 8 | declarations: PIPES, 9 | exports: PIPES 10 | }) 11 | export class FormatPipeModule {} 12 | -------------------------------------------------------------------------------- /schematics/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './json'; 2 | export * from './package'; 3 | export * from './file'; 4 | export * from './workspace'; 5 | export * from './html'; 6 | export * from './lib-versions'; 7 | export * from './log'; 8 | export * from './ast'; 9 | export * from './alain'; 10 | -------------------------------------------------------------------------------- /packages/abc/full-content/style/index.less: -------------------------------------------------------------------------------- 1 | @import '../../../theme/theme-default.less'; 2 | @full-content-prefix: ~'.full-content'; 3 | 4 | @{full-content-prefix} { 5 | display: block; 6 | height: 100%; 7 | overflow: auto; 8 | 9 | &__body { 10 | overflow: hidden; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/abc/let/let.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { LetDirective } from './let.directive'; 4 | 5 | const DIRECTIVES = [LetDirective]; 6 | 7 | @NgModule({ 8 | declarations: DIRECTIVES, 9 | exports: DIRECTIVES 10 | }) 11 | export class LetModule {} 12 | -------------------------------------------------------------------------------- /src/assets/schema/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "name": { 4 | "type": "string" 5 | }, 6 | "password": { 7 | "type": "string", 8 | "ui": { 9 | "type": "password" 10 | } 11 | } 12 | }, 13 | "required": [ "name", "password" ] 14 | } 15 | -------------------------------------------------------------------------------- /src/templates/examples_index.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: `{{selector}}`, 5 | template: `{{{demos}}}`, 6 | styles: [ `:host { display: block } `] 7 | }) 8 | export class {{componentName}} { 9 | item: any = {{{item}}}; 10 | } 11 | -------------------------------------------------------------------------------- /packages/util/config/theme/responsive.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainThemeResponsiveConfig { 2 | rules: { 3 | [key: number]: { 4 | xs?: number; 5 | sm?: number; 6 | md?: number; 7 | lg?: number; 8 | xl?: number; 9 | xxl?: number; 10 | }; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /schematics/edit/index.ts: -------------------------------------------------------------------------------- 1 | import { chain, Rule } from '@angular-devkit/schematics'; 2 | 3 | import { buildAlain } from '../utils'; 4 | import { Schema } from './schema'; 5 | 6 | export default function (options: Schema): Rule { 7 | return chain([buildAlain({ schematicName: 'edit', ...options })]); 8 | } 9 | -------------------------------------------------------------------------------- /schematics/empty/index.ts: -------------------------------------------------------------------------------- 1 | import { chain, Rule } from '@angular-devkit/schematics'; 2 | 3 | import { buildAlain } from '../utils'; 4 | import { Schema } from './schema'; 5 | 6 | export default function (options: Schema): Rule { 7 | return chain([buildAlain({ schematicName: 'empty', ...options })]); 8 | } 9 | -------------------------------------------------------------------------------- /schematics/list/index.ts: -------------------------------------------------------------------------------- 1 | import { chain, Rule } from '@angular-devkit/schematics'; 2 | 3 | import { buildAlain } from '../utils'; 4 | import { Schema } from './schema'; 5 | 6 | export default function (options: Schema): Rule { 7 | return chain([buildAlain({ schematicName: 'list', ...options })]); 8 | } 9 | -------------------------------------------------------------------------------- /schematics/view/index.ts: -------------------------------------------------------------------------------- 1 | import { chain, Rule } from '@angular-devkit/schematics'; 2 | 3 | import { buildAlain } from '../utils'; 4 | import { Schema } from './schema'; 5 | 6 | export default function (options: Schema): Rule { 7 | return chain([buildAlain({ schematicName: 'view', ...options })]); 8 | } 9 | -------------------------------------------------------------------------------- /packages/abc/full-content/public_api.ts: -------------------------------------------------------------------------------- 1 | export { FullContentComponent } from './full-content.component'; 2 | export { FullContentService } from './full-content.service'; 3 | export { FullContentToggleDirective } from './full-content-toggle.directive'; 4 | export { FullContentModule } from './full-content.module'; 5 | -------------------------------------------------------------------------------- /packages/acl/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/util/*": ["../../dist/@delon/util/*"], 8 | "@delon/*": ["../../dist/@delon/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/util/config/abc/zip.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainZipConfig { 2 | /** 3 | * Zip library path, Default: `//cdn.bootcss.com/jszip/3.3.0/jszip.min.js` 4 | */ 5 | url?: string; 6 | /** 7 | * Defines which zip optional utils should get loaded 8 | */ 9 | utils?: string[]; 10 | } 11 | -------------------------------------------------------------------------------- /packages/abc/hotkey/hotkey.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { HotkeyDirective } from './hotkey.directive'; 4 | 5 | const DIRECTIVES = [HotkeyDirective]; 6 | 7 | @NgModule({ 8 | declarations: DIRECTIVES, 9 | exports: DIRECTIVES 10 | }) 11 | export class HotkeyModule {} 12 | -------------------------------------------------------------------------------- /packages/abc/pdf/style/index.less: -------------------------------------------------------------------------------- 1 | @import '../../../theme/theme-default.less'; 2 | @pdf-prefix: ~'.pdf'; 3 | 4 | @{pdf-prefix} { 5 | &-container { 6 | position: absolute; 7 | width: 100%; 8 | height: 100%; 9 | overflow-x: auto; 10 | -webkit-overflow-scrolling: touch; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/form/src/terminator.service.ts: -------------------------------------------------------------------------------- 1 | import { Subject } from 'rxjs'; 2 | 3 | export class TerminatorService { 4 | onDestroy: Subject; 5 | 6 | constructor() { 7 | this.onDestroy = new Subject(); 8 | } 9 | 10 | destroy(): void { 11 | this.onDestroy.next(true); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/theme/system/antd/index.less: -------------------------------------------------------------------------------- 1 | @import './_link.less'; 2 | 3 | @import './_input-number.less'; 4 | @import './_card.less'; 5 | @import './_drawer.less'; 6 | @import './_form.less'; 7 | @import './_modal.less'; 8 | @import './_table.less'; 9 | @import './_tag.less'; 10 | @import './_animation.less'; 11 | -------------------------------------------------------------------------------- /packages/theme/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/theme/*": ["../../dist/@delon/theme/*"], 8 | "@delon/*": ["../../dist/@delon/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/abc/footer-toolbar/footer-toolbar.component.html: -------------------------------------------------------------------------------- 1 | 4 | 8 | -------------------------------------------------------------------------------- /packages/testing/public_api.ts: -------------------------------------------------------------------------------- 1 | // from angular 2 | export * from './src/dispatch-events'; 3 | export * from './src/event-objects'; 4 | export * from './src/type-in-element'; 5 | 6 | export * from './src/zorro'; 7 | export * from './src/g2'; 8 | export * from './src/suite'; 9 | export * from './src/cdk-overlay'; 10 | -------------------------------------------------------------------------------- /packages/abc/exception/demo/404.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 0 3 | title: 404 4 | --- 5 | 6 | 404 页面。 7 | 8 | ```ts 9 | import { Component } from '@angular/core'; 10 | 11 | @Component({ 12 | selector: 'app-demo', 13 | template: ` `, 14 | }) 15 | export class DemoComponent {} 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/abc/exception/demo/500.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: 500 4 | --- 5 | 6 | 500 页面。 7 | 8 | ```ts 9 | import { Component } from '@angular/core'; 10 | 11 | @Component({ 12 | selector: 'app-demo', 13 | template: ` `, 14 | }) 15 | export class DemoComponent {} 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/abc/tag-select/tag-select.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ expand ? locale.collapse : locale.expand }} 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/index.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @import './_layout.less'; 4 | @import './_header.less'; 5 | @import './_aside.less'; 6 | 7 | @import './_progress-bar.less'; 8 | @import './fix/index.less'; 9 | @import './widgets/index.less'; 10 | 11 | @import './_fixed.less'; 12 | -------------------------------------------------------------------------------- /packages/abc/global-footer/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{global-footer-prefix}-rtl { 2 | direction: rtl; 3 | @{global-footer-prefix} { 4 | &__links { 5 | &-item { 6 | &:not(:last-child) { 7 | margin-right: inherit; 8 | margin-left: 40px; 9 | } 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/acl/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/acl", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "acl", 7 | "entryFile": "index.ts" 8 | }, 9 | "allowedNonPeerDependencies": ["@delon/util"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/auth/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/auth", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "auth", 7 | "entryFile": "index.ts" 8 | }, 9 | "allowedNonPeerDependencies": ["@delon/util"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/theme/system/antd/_card.less: -------------------------------------------------------------------------------- 1 | .@{ant-prefix}-card { 2 | margin-bottom: @md; 3 | } 4 | 5 | /** 6 | * Set `nz-card` content area without spacing 7 | * 8 | * 设置 `nz-card` 内容区域无间距 9 | */ 10 | .@{ant-prefix}-card__body-nopadding { 11 | .@{ant-prefix}-card-body { 12 | padding: 0 !important; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/util/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/util", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "entryFile": "index.ts" 7 | }, 8 | "allowedNonPeerDependencies": ["date-fns", "extend", "@ant-design/icons-angular"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/abc/notice-icon/demo/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: 通知图标 4 | --- 5 | 6 | 通常用在导航工具栏上。 7 | 8 | ```ts 9 | import { Component } from '@angular/core'; 10 | 11 | @Component({ 12 | selector: 'app-demo', 13 | template: ` `, 14 | }) 15 | export class DemoComponent {} 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/theme/layout-default/layout-header-item-trigger.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[layout-default-header-item-trigger]', 5 | host: { 6 | '[class.alain-default__nav-item]': `true` 7 | } 8 | }) 9 | export class LayoutDefaultHeaderItemTriggerDirective {} 10 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | useTabs: false, 4 | printWidth: 120, 5 | tabWidth: 2, 6 | semi: true, 7 | htmlWhitespaceSensitivity: 'strict', 8 | arrowParens: 'avoid', 9 | bracketSpacing: true, 10 | proseWrap: 'preserve', 11 | trailingComma: 'none', 12 | endOfLine: 'lf' 13 | }; 14 | -------------------------------------------------------------------------------- /packages/abc/auto-focus/auto-focus.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { AutoFocusDirective } from './auto-focus.directive'; 4 | 5 | const COMPONENTS = [AutoFocusDirective]; 6 | 7 | @NgModule({ 8 | declarations: COMPONENTS, 9 | exports: COMPONENTS 10 | }) 11 | export class AutoFocusModule {} 12 | -------------------------------------------------------------------------------- /packages/auth/src/token/simple/simple.model.ts: -------------------------------------------------------------------------------- 1 | import { ITokenModel } from '../interface'; 2 | 3 | export class SimpleTokenModel implements ITokenModel { 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | [key: string]: any; 6 | 7 | token: string | null | undefined; 8 | 9 | expired?: number; 10 | } 11 | -------------------------------------------------------------------------------- /packages/cache/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/cache", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "cache", 7 | "entryFile": "public_api.ts" 8 | }, 9 | "allowedNonPeerDependencies": ["@delon/util"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/form/src/model/index.ts: -------------------------------------------------------------------------------- 1 | export * from './form.property'; 2 | export * from './form.property.factory'; 3 | export * from './atomic.property'; 4 | export * from './object.property'; 5 | export * from './array.property'; 6 | export * from './string.property'; 7 | export * from './number.property'; 8 | export * from './boolean.property'; 9 | -------------------------------------------------------------------------------- /src/main.server.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | 3 | import { environment } from './environments/environment'; 4 | 5 | if (environment.production) { 6 | enableProdMode(); 7 | } 8 | 9 | export { AppServerModule } from './app/app.server.module'; 10 | export { renderModule } from '@angular/platform-server'; 11 | -------------------------------------------------------------------------------- /packages/mock/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/mock", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "mock", 7 | "entryFile": "public_api.ts" 8 | }, 9 | "allowedNonPeerDependencies": ["mockjs", "@delon/util"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/theme-compact.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @alain-default-header-hg: 56px; 4 | @alain-default-header-icon-fs: 16px; 5 | 6 | @alain-default-aside-collapsed-nav-fs: 20px; 7 | @alain-default-aside-collapsed-nav-img-wh: 20px; 8 | 9 | @alain-default-header-top-menu-item-padding: 0 8px; 10 | -------------------------------------------------------------------------------- /schematics/application/files/src/app/routes/dashboard/dashboard.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-dashboard', 5 | templateUrl: './dashboard.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class DashboardComponent {} 9 | -------------------------------------------------------------------------------- /packages/abc/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/abc/*": ["../../dist/@delon/abc/*"], 8 | "@delon/*": ["../../dist/@delon/*"] 9 | }, 10 | "types": ["../dev-mode-types"] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/chart/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/chart/*": ["../../dist/@delon/chart/*"], 8 | "@delon/*": ["../../dist/@delon/*"] 9 | } 10 | }, 11 | "files": ["public_api.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/theme/system/antd/_animation.less: -------------------------------------------------------------------------------- 1 | .forced-turn-off-nz-modal-animation-mixin(@enabled) when(@enabled=true) { 2 | .@{ant-prefix}-modal { 3 | &, 4 | &-mask { 5 | animation-duration: unset !important; 6 | } 7 | } 8 | } 9 | 10 | .forced-turn-off-nz-modal-animation-mixin(@forced-turn-off-nz-modal-animation-enabled); 11 | -------------------------------------------------------------------------------- /packages/util/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.lib.prod.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": ".", 6 | "paths": { 7 | "@delon/util/*": ["../../dist/@delon/util/*"], 8 | "@delon/*": ["../../dist/@delon/*"] 9 | }, 10 | "types": ["../dev-mode-types"] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /packages/abc/error-collect/style/index.less: -------------------------------------------------------------------------------- 1 | @import '../../../theme/theme-default.less'; 2 | @error-collect-prefix: ~'.error-collect'; 3 | 4 | @{error-collect-prefix} { 5 | padding-right: 24px; 6 | color: @error-collect-color; 7 | cursor: pointer; 8 | 9 | &__count { 10 | padding-left: 8px; 11 | } 12 | } 13 | 14 | @import './rtl.less'; 15 | -------------------------------------------------------------------------------- /packages/util/other/logger.spec.ts: -------------------------------------------------------------------------------- 1 | import { warn } from './logger'; 2 | 3 | describe('util.logger', () => { 4 | beforeEach(() => { 5 | spyOn(console, 'warn'); 6 | }); 7 | it('should be once warn when same content', () => { 8 | warn('once'); 9 | warn('once'); 10 | expect(console.warn).toHaveBeenCalledTimes(1); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/abc/pdf/pdf.config.ts: -------------------------------------------------------------------------------- 1 | import { AlainPdfConfig } from '@delon/util/config'; 2 | 3 | export const PDF_DEFULAT_CONFIG: AlainPdfConfig = { 4 | lib: `https://cdn.jsdelivr.net/npm/pdfjs-dist@2.x/`, 5 | showAll: true, 6 | renderText: true, 7 | showBorders: false, 8 | originalSize: true, 9 | fitToPage: false, 10 | autoReSize: true 11 | }; 12 | -------------------------------------------------------------------------------- /packages/form/src/style/_issues.less: -------------------------------------------------------------------------------- 1 | // TODO: 由于 https://github.com/ant-design/ant-design/pull/34694 的重构,导致需要 NG-ZORRO 需要额外进行支持 2 | // 暂时按以下进行解决以此修复 https://github.com/ng-alain/ng-alain/issues/2275 的问题 3 | @{sf-prefix} { 4 | &__item { 5 | .@{ant-prefix}-select, 6 | .@{ant-prefix}-cascader-picker { 7 | width: 100%; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/form/examples/i18n/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: i18n 3 | subtitle: Internationalization 4 | type: Examples 5 | --- 6 | 7 | JSON Schema just a JSON object, it's support for internationalization. In addition, `sf` also supports some faster internationalization methods, but the elements it supports are based on the following: `title`, `description`, `optionalHelp`. -------------------------------------------------------------------------------- /packages/testing/src/cdk-overlay.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 清除Cdk的窗体,以便下一次使用,一般这样使用: 3 | * ```ts 4 | * afterEach(cleanCdkOverlayHtml); 5 | * ``` 6 | */ 7 | export function cleanCdkOverlayHtml(): void { 8 | const els = document.querySelectorAll('.cdk-overlay-container'); 9 | if (els && els.length > 0) { 10 | els.forEach(el => (el.innerHTML = '')); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/theme/tsconfig.json: -------------------------------------------------------------------------------- 1 | // Configuration for IDEs only. 2 | { 3 | "extends": "../../tsconfig.json", 4 | "compilerOptions": { 5 | "rootDir": "..", 6 | "baseUrl": ".", 7 | "paths": { 8 | "@delon/theme/*": ["./*"], 9 | "@delon/*": ["../*"] 10 | } 11 | }, 12 | "files": ["public_api.ts"], 13 | "include": ["./**/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/abc/theme-compact.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @page-header-padding: 8px 16px 0 16px; 4 | 5 | @sv-bottom: @layout-gutter; 6 | 7 | @footer-toolbar-height: 48px; 8 | @footer-toolbar-padding: 0 16px; 9 | 10 | @reuse-tab-height: 44px; 11 | 12 | // tag-select 13 | // -- 14 | @tag-select-margin: 8px; 15 | @tag-select-item-margin-right: 12px; 16 | -------------------------------------------------------------------------------- /packages/test.ts: -------------------------------------------------------------------------------- 1 | import { getTestBed } from '@angular/core/testing'; 2 | import { 3 | BrowserDynamicTestingModule, 4 | platformBrowserDynamicTesting, 5 | } from '@angular/platform-browser-dynamic/testing'; 6 | 7 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 8 | teardown: { destroyAfterEach: false } 9 | }); 10 | -------------------------------------------------------------------------------- /packages/abc/qr/qr.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { QRComponent } from './qr.component'; 5 | 6 | const COMPONENTS = [QRComponent]; 7 | 8 | @NgModule({ 9 | imports: [CommonModule], 10 | declarations: COMPONENTS, 11 | exports: COMPONENTS 12 | }) 13 | export class QRModule {} 14 | -------------------------------------------------------------------------------- /packages/theme/setting-drawer/style/rtl.less: -------------------------------------------------------------------------------- 1 | @{setting-drawer-prefix}-rtl { 2 | direction: rtl; 3 | @{setting-drawer-prefix} { 4 | &__handle { 5 | right: inherit; 6 | left: 0; 7 | border-radius: 0 4px 4px 0; 8 | 9 | &-opened { 10 | right: inherit; 11 | left: @setting-drawer-width; 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /schematics/edit/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts.template: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { _HttpClient } from '@delon/theme'; 3 | 4 | @Injectable(<% if(service === 'root') { %>{ providedIn: 'root' }<% } %>) 5 | export class <%= serviceName %> { 6 | 7 | constructor(private http: _HttpClient) { } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /schematics/empty/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts.template: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { _HttpClient } from '@delon/theme'; 3 | 4 | @Injectable(<% if(service === 'root') { %>{ providedIn: 'root' }<% } %>) 5 | export class <%= serviceName %> { 6 | 7 | constructor(private http: _HttpClient) { } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /schematics/list/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts.template: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { _HttpClient } from '@delon/theme'; 3 | 4 | @Injectable(<% if(service === 'root') { %>{ providedIn: 'root' }<% } %>) 5 | export class <%= serviceName %> { 6 | 7 | constructor(private http: _HttpClient) { } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /schematics/view/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts.template: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { _HttpClient } from '@delon/theme'; 3 | 4 | @Injectable(<% if(service === 'root') { %>{ providedIn: 'root' }<% } %>) 5 | export class <%= serviceName %> { 6 | 7 | constructor(private http: _HttpClient) { } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/app/app.server.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ServerModule } from '@angular/platform-server'; 3 | 4 | import { AppComponent } from './app.component'; 5 | import { AppModule } from './app.module'; 6 | 7 | @NgModule({ 8 | imports: [AppModule, ServerModule], 9 | bootstrap: [AppComponent] 10 | }) 11 | export class AppServerModule {} 12 | -------------------------------------------------------------------------------- /src/templates/content.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: `{{selector}}`, 5 | template: `{{{demos}}}`, 6 | styles: [ `:host { display: block } `] 7 | }) 8 | export class {{componentName}} { 9 | item: any = {{{item}}}; 10 | codes: any[] = {{{codes}}}; 11 | } 12 | -------------------------------------------------------------------------------- /schematics/module/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts.template: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { _HttpClient } from '@delon/theme'; 3 | 4 | @Injectable(<% if(service === 'root') { %>{ providedIn: 'root' }<% } %>) 5 | export class <%= classify(name) %>Service { 6 | 7 | constructor(private http: _HttpClient) { } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /schematics/ng-update/data/index.ts: -------------------------------------------------------------------------------- 1 | export * from './attribute-selectors'; 2 | export * from './class-names'; 3 | export * from './constructor-checks'; 4 | export * from './css-selectors'; 5 | export * from './element-selectors'; 6 | export * from './input-names'; 7 | export * from './method-call-checks'; 8 | export * from './output-names'; 9 | export * from './property-names'; 10 | -------------------------------------------------------------------------------- /packages/abc/xlsx/xlsx.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { XlsxDirective } from './xlsx.directive'; 5 | 6 | const COMPONENTS = [XlsxDirective]; 7 | 8 | @NgModule({ 9 | imports: [CommonModule], 10 | declarations: COMPONENTS, 11 | exports: COMPONENTS 12 | }) 13 | export class XlsxModule {} 14 | -------------------------------------------------------------------------------- /packages/form/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/form", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "form", 7 | "entryFile": "public_api.ts" 8 | }, 9 | "allowedNonPeerDependencies": ["ajv", "ajv-formats", "@delon/theme", "@delon/util", "@delon/acl"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/form/src/widgets/text/text.widget.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/util/tsconfig.json: -------------------------------------------------------------------------------- 1 | // Configuration for IDEs only. 2 | { 3 | "extends": "../../tsconfig.json", 4 | "compilerOptions": { 5 | "rootDir": "..", 6 | "baseUrl": ".", 7 | "paths": { 8 | "@delon/util/*": ["./*"], 9 | "@delon/*": ["../*"] 10 | } 11 | }, 12 | "files": ["index.ts"], 13 | "include": ["./**/*.ts", "../dev-mode-types.d.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/abc/media/media.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { MediaComponent } from './media.component'; 5 | 6 | const COMPONENTS = [MediaComponent]; 7 | 8 | @NgModule({ 9 | imports: [CommonModule], 10 | declarations: COMPONENTS, 11 | exports: COMPONENTS 12 | }) 13 | export class MediaModule {} 14 | -------------------------------------------------------------------------------- /packages/abc/quick-menu/quick-menu.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 | 10 |
11 | -------------------------------------------------------------------------------- /packages/chart/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/chart", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "chart", 7 | "entryFile": "public_api.ts" 8 | }, 9 | "allowedNonPeerDependencies": ["@delon/theme", "@delon/util", "@antv/g2", "@antv/data-set", "echarts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/chart/number-info/demo/theme.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: 主题 4 | --- 5 | 6 | 暗系。 7 | 8 | ```ts 9 | import { Component } from '@angular/core'; 10 | 11 | @Component({ 12 | selector: 'app-demo', 13 | template: ` `, 14 | }) 15 | export class DemoComponent {} 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/util/config/abc/xlsx.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainXlsxConfig { 2 | /** 3 | * Xlsx library path, default: `//cdn.bootcss.com/xlsx/0.15.6/xlsx.full.min.js` 4 | */ 5 | url?: string; 6 | /** 7 | * Defines which Xlsx optional modules should get loaded, e.g: 8 | * 9 | * `[ '//cdn.bootcss.com/xlsx/0.15.6/cpexcel.js' ]` 10 | */ 11 | modules?: string[]; 12 | } 13 | -------------------------------------------------------------------------------- /packages/util/config/theme/http.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainThemeHttpClientConfig { 2 | /** 3 | * 空值处理,默认:`include` 4 | * - include:包含 5 | * - ignore:忽略 6 | */ 7 | nullValueHandling?: 'include' | 'ignore'; 8 | /** 9 | * 时间值处理,默认:`timestamp` 10 | * - timestamp:时间戳 11 | * - ignore:忽略处理,保持原始状态 12 | */ 13 | dateValueHandling?: 'timestamp' | 'ignore'; 14 | } 15 | -------------------------------------------------------------------------------- /src/styles/theme.less: -------------------------------------------------------------------------------- 1 | @import '../../packages/theme/theme-default.less'; 2 | 3 | @site-heading-color: @heading-color; 4 | @site-text-color: @heading-color; 5 | @site-text-color-secondary: @text-color-secondary; 6 | @site-border-color-split: @border-color-split; 7 | @site-header-box-shadow: 0 2px 8px rgba(240, 241, 242, 65); 8 | @site-markdown-code-bg: #f2f4f5; 9 | @site-mobile: 1200px; 10 | -------------------------------------------------------------------------------- /packages/chart/trend/demo/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 0 3 | title: 演示 4 | --- 5 | 6 | 在数值背后添加一个小图标来标识涨跌情况。 7 | 8 | ```ts 9 | import { Component } from '@angular/core'; 10 | 11 | @Component({ 12 | selector: 'app-demo', 13 | template: ` 14 | 12% 15 | 11% 16 | `, 17 | }) 18 | export class DemoComponent {} 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/chart/tsconfig.json: -------------------------------------------------------------------------------- 1 | // Configuration for IDEs only. 2 | { 3 | "extends": "../../tsconfig.json", 4 | "compilerOptions": { 5 | "rootDir": "..", 6 | "baseUrl": ".", 7 | "paths": { 8 | "@delon/chart/*": ["./*"], 9 | "@delon/*": ["../*"] 10 | } 11 | }, 12 | "files": ["public_api.ts"], 13 | "include": ["./**/*.ts", "../dev-mode-types.d.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/theme/src/services/rtl/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Service 3 | order: 6 4 | title: RTLService 5 | subtitle: RTL服务 6 | --- 7 | 8 | RTL服务控制。 9 | 10 | ## API 11 | 12 | | 接口名 | 参数 | 描述 | 13 | |-----|----|----| 14 | | `dir` | `Direction` | 获取或设置当前文字方向 | 15 | | `nextDir` | `Direction` | 获取下一次文字方向 | 16 | | `change` | `Observable` | 订阅变更通知 | 17 | | `toggle()` | - | 切换文字方向 | 18 | -------------------------------------------------------------------------------- /packages/theme/system/entry.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | // Angular 4 | @import './ng/index.less'; 5 | 6 | // Antd patch 7 | @import './antd/index.less'; 8 | 9 | // Core CSS 10 | @import './_type.less'; 11 | 12 | // widgets 13 | @import './widgets/index.less'; 14 | 15 | // @delon 16 | @import './delon/index.less'; 17 | 18 | // Utils 19 | @import './utils/index.less'; 20 | -------------------------------------------------------------------------------- /packages/chart/mini-progress/demo/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 0 3 | title: 4 | zh-CN: 基础 5 | en-US: Basic 6 | --- 7 | 8 | 基础用法。 9 | 10 | ```ts 11 | import { Component } from '@angular/core'; 12 | 13 | @Component({ 14 | selector: 'app-demo', 15 | template: ` `, 16 | }) 17 | export class DemoComponent {} 18 | ``` 19 | -------------------------------------------------------------------------------- /packages/util/config/abc/image.type.ts: -------------------------------------------------------------------------------- 1 | import type { ModalOptions } from 'ng-zorro-antd/modal'; 2 | 3 | export interface AlainImageConfig { 4 | /** 5 | * 默认大小,默认值:`64`,单位:px 6 | */ 7 | size?: number; 8 | 9 | /** 10 | * 错误图片,默认:`./assets/img/logo.svg` 11 | */ 12 | error?: string; 13 | 14 | /** 15 | * 预览大图对话框参数 16 | */ 17 | previewModalOptions?: ModalOptions; 18 | } 19 | -------------------------------------------------------------------------------- /packages/theme/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/@delon/theme", 4 | "deleteDestPath": true, 5 | "lib": { 6 | "flatModuleFile": "theme", 7 | "entryFile": "public_api.ts" 8 | }, 9 | "allowedNonPeerDependencies": ["date-fns", "ng-zorro-antd", "@delon/acl", "@delon/util", "@ant-design/icons-angular"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/theme/src/pipes/safe/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: safe 4 | subtitle: 安全HTML等 5 | type: Pipe 6 | --- 7 | 8 | ## html 9 | 10 | 简化 `bypassSecurityTrustHtml` 的使用。 11 | 12 | ```html 13 |
14 | ``` 15 | 16 | ## url 17 | 18 | 简化 `bypassSecurityTrustUrl` 的使用。 19 | 20 | ```html 21 | 22 | ``` 23 | -------------------------------------------------------------------------------- /packages/theme/src/pipes/yn/style/index.less: -------------------------------------------------------------------------------- 1 | @yn-prefix: ~'.yn'; 2 | 3 | @{yn-prefix} { 4 | &__yes, 5 | &__no { 6 | display: inline-flex; 7 | align-items: center; 8 | font-style: normal; 9 | 10 | span { 11 | margin-left: 4px; 12 | } 13 | } 14 | 15 | &__yes { 16 | color: @yn-yes-color; 17 | } 18 | 19 | &__no { 20 | color: @yn-no-color; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/theme/system/mixins/_router.less: -------------------------------------------------------------------------------- 1 | .router-ant() { 2 | .router-ant-mixin(@enabled) when(@enabled=true) { 3 | router-outlet + * { 4 | display: block; 5 | // animation-fill-mode: both; 6 | animation-name: @router-animation-name; // fadeIn; 7 | animation-duration: @router-animation-duration; 8 | } 9 | } 10 | .router-ant-mixin(@router-animation-enabled); 11 | } 12 | -------------------------------------------------------------------------------- /packages/theme/system/widgets/_header-dropdown.less: -------------------------------------------------------------------------------- 1 | .header-dropdown { 2 | background-color: @popover-background; 3 | border-radius: 4px; 4 | box-shadow: @shadow-1-down; 5 | } 6 | 7 | @media screen and (max-width: @screen-xs) { 8 | .header-dropdown { 9 | right: 0 !important; 10 | left: 0 !important; 11 | width: 100% !important; 12 | border-radius: 0 !important; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/util/token/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: token 3 | subtitle: Token 4 | type: Tools 5 | --- 6 | 7 | ## WINDOW 8 | 9 | Access to global `window` object. 10 | 11 | ## PAGE_VISIBILITY 12 | 13 | Use the `visibilitychange` event to monitor whether the browser tab is visible, which is generally used when the user leaves the browser tab to temp interrupt the backend to continue sending requests. 14 | -------------------------------------------------------------------------------- /src/assets/schema/validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "name": { 4 | "type": "string", 5 | "minLength": 3, 6 | "ui": { 7 | "errors": { 8 | "required": "姓名不能为空", 9 | "minLength": "姓名至少3个字符以上" 10 | }, 11 | "_validator": "无法模拟,请参考https://ng-alain.com/form/error" 12 | } 13 | } 14 | }, 15 | "required": [ "name" ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/abc/tsconfig.json: -------------------------------------------------------------------------------- 1 | // Configuration for IDEs only. 2 | { 3 | "extends": "../../tsconfig.json", 4 | "compilerOptions": { 5 | "rootDir": "..", 6 | "baseUrl": ".", 7 | "paths": { 8 | "@delon/abc/*": ["./*"], 9 | "@delon/*": [ "../*" ] 10 | } 11 | }, 12 | "files": [ 13 | "public_api.ts" 14 | ], 15 | "include": ["./**/*.ts", "../dev-mode-types.d.ts"] 16 | } 17 | -------------------------------------------------------------------------------- /packages/theme/system/antd/_form.less: -------------------------------------------------------------------------------- 1 | .@{ant-prefix}-form-item-label { 2 | em { 3 | color: @grey-6; 4 | } 5 | } 6 | 7 | .@{ant-prefix}-form-item-control { 8 | em { 9 | margin-left: @layout-gutter; 10 | } 11 | } 12 | 13 | [dir='rtl'] { 14 | .@{ant-prefix}-form-item-control { 15 | em { 16 | margin-right: @layout-gutter; 17 | margin-left: inherit; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/chart/mini-bar/mini-bar.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { G2MiniBarComponent } from './mini-bar.component'; 5 | 6 | const COMPONENTS = [G2MiniBarComponent]; 7 | 8 | @NgModule({ 9 | imports: [CommonModule], 10 | declarations: COMPONENTS, 11 | exports: COMPONENTS 12 | }) 13 | export class G2MiniBarModule {} 14 | -------------------------------------------------------------------------------- /packages/chart/number-info/demo/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 0 3 | title: 4 | zh-CN: 基本 5 | en-US: Basic 6 | --- 7 | 8 | 各种数据文案的展现方式。 9 | 10 | ```ts 11 | import { Component } from '@angular/core'; 12 | 13 | @Component({ 14 | selector: 'app-demo', 15 | template: ` `, 16 | }) 17 | export class DemoComponent {} 18 | ``` 19 | -------------------------------------------------------------------------------- /packages/theme/src/locale/locale.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import zhCN from './languages/zh-CN'; 4 | import { DELON_LOCALE_SERVICE_PROVIDER } from './locale.service'; 5 | import { DELON_LOCALE } from './locale.tokens'; 6 | 7 | @NgModule({ 8 | providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER] 9 | }) 10 | export class DelonLocaleModule {} 11 | -------------------------------------------------------------------------------- /scripts/site/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * Load the TypeScript compiler, then load the TypeScript gulpfile which simply loads all 4 | * the tasks. The tasks are really inside tools/gulp/tasks. 5 | */ 6 | 7 | const path = require('path'); 8 | 9 | // Register TS compilation. 10 | require('ts-node').register({ 11 | project: path.join(__dirname, 'tsconfig.json') 12 | }); 13 | 14 | require('./index'); 15 | -------------------------------------------------------------------------------- /src/app/routes/404/404.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Inject } from '@angular/core'; 2 | 3 | import { ALAIN_I18N_TOKEN } from '@delon/theme'; 4 | 5 | import { I18NService } from '@core'; 6 | 7 | @Component({ 8 | selector: 'not-found', 9 | templateUrl: './404.component.html' 10 | }) 11 | export class NotFoundComponent { 12 | constructor(@Inject(ALAIN_I18N_TOKEN) public i18n: I18NService) {} 13 | } 14 | -------------------------------------------------------------------------------- /packages/chart/mini-area/mini-area.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { G2MiniAreaComponent } from './mini-area.component'; 5 | 6 | const COMPONENTS = [G2MiniAreaComponent]; 7 | 8 | @NgModule({ 9 | imports: [CommonModule], 10 | declarations: COMPONENTS, 11 | exports: COMPONENTS 12 | }) 13 | export class G2MiniAreaModule {} 14 | -------------------------------------------------------------------------------- /schematics/application/files/src/app/shared/shared-delon.module.ts: -------------------------------------------------------------------------------- 1 | import { PageHeaderModule } from '@delon/abc/page-header'; 2 | import { ResultModule } from '@delon/abc/result'; 3 | import { SEModule } from '@delon/abc/se'; 4 | import { STModule } from '@delon/abc/st'; 5 | import { SVModule } from '@delon/abc/sv'; 6 | 7 | export const SHARED_DELON_MODULES = [PageHeaderModule, STModule, SEModule, SVModule, ResultModule]; 8 | -------------------------------------------------------------------------------- /schematics/module/files/__name@dasherize@if-flat__/__name@dasherize__-routing.module.ts.template: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | const routes: Routes = [ 5 | ]; 6 | 7 | @NgModule({ 8 | imports: [RouterModule.for<%= routingScope %>(routes)], 9 | exports: [RouterModule] 10 | }) 11 | export class <%= classify(name) %>RoutingModule { } 12 | -------------------------------------------------------------------------------- /packages/abc/qr/qr.config.ts: -------------------------------------------------------------------------------- 1 | import { AlainQRConfig } from '@delon/util/config'; 2 | 3 | export const QR_DEFULAT_CONFIG: AlainQRConfig = { 4 | lib: `https://cdn.jsdelivr.net/npm/qrious/dist/qrious.min.js`, 5 | background: 'white', 6 | backgroundAlpha: 1, 7 | foreground: 'black', 8 | foregroundAlpha: 1, 9 | level: 'L', 10 | mime: 'image/png', 11 | padding: 10, 12 | size: 220, 13 | delay: 0 14 | }; 15 | -------------------------------------------------------------------------------- /packages/auth/src/token.ts: -------------------------------------------------------------------------------- 1 | import { HttpContextToken } from '@angular/common/http'; 2 | 3 | /** 4 | * Whether to allow anonymous login 5 | * 6 | * 是否允许匿名登录 7 | * 8 | * @example 9 | * this.http.post(`login`, { 10 | * name: 'cipchk', pwd: '123456' 11 | * }, { 12 | * context: new HttpContext().set(ALLOW_ANONYMOUS, true) 13 | * }) 14 | */ 15 | export const ALLOW_ANONYMOUS = new HttpContextToken(() => false); 16 | -------------------------------------------------------------------------------- /packages/chart/docs/faq.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 100 3 | title: FAQ 4 | type: Documents 5 | --- 6 | 7 | ## How to auto-resize of the container? 8 | 9 | The G2 uses `window.addEventListener('resize', this.onResize)` to detect a change in parent dom element's size. So you need to manually monitor the change in the size of the container and call `chart.forceFit()` to force resize. 10 | 11 | [comment]: 12 | -------------------------------------------------------------------------------- /packages/chart/single-bar/single-bar.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { G2SingleBarComponent } from './single-bar.component'; 5 | 6 | const COMPONENTS = [G2SingleBarComponent]; 7 | 8 | @NgModule({ 9 | imports: [CommonModule], 10 | declarations: COMPONENTS, 11 | exports: COMPONENTS 12 | }) 13 | export class G2SingleBarModule {} 14 | -------------------------------------------------------------------------------- /packages/chart/trend/demo/reverse.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: 颜色反转 4 | --- 5 | 6 | 在数值背后添加一个小图标来标识涨跌情况。 7 | 8 | ```ts 9 | import { Component } from '@angular/core'; 10 | 11 | @Component({ 12 | selector: 'app-demo', 13 | template: ` 14 | 12% 15 | 11% 16 | `, 17 | }) 18 | export class DemoComponent {} 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/form/src/widgets/text/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: text 3 | subtitle: 文本 4 | type: Widgets 5 | --- 6 | 7 | 一般用于直接显示文本。 8 | 9 | ## 规则 10 | 11 | - 强制取消 `required` 效果 12 | - 若不指定 `defaultText` 值不存在时自动渲染 `-` 13 | 14 | ## API 15 | 16 | ### ui 属性 17 | 18 | | 参数 | 说明 | 类型 | 默认值 | 19 | |----|----|----|-----| 20 | | `[defaultText]` | 当值不存在时所指定的文本 | `string` | `-` | 21 | | `[html]` | 是否支持HTML | `boolean` | `true` | 22 | -------------------------------------------------------------------------------- /packages/theme/src/pipes/safe/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: safe 4 | subtitle: XSS 5 | type: Pipe 6 | --- 7 | 8 | ## html 9 | 10 | Simplify the use of `bypassSecurityTrustHtml`. 11 | 12 | ```html 13 |
14 | ``` 15 | 16 | ## url 17 | 18 | Simplify the use of `bypassSecurityTrustUrl`. 19 | 20 | ```html 21 | 22 | ``` 23 | -------------------------------------------------------------------------------- /packages/theme/layout-default/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './layout.component'; 2 | export * from './layout.module'; 3 | export * from './layout-header.component'; 4 | export * from './layout-header-item.component'; 5 | export * from './layout-header-item-trigger.directive'; 6 | export * from './layout-top-menu-item'; 7 | export * from './layout-nav.component'; 8 | export * from './types'; 9 | export * from './layout.service'; 10 | -------------------------------------------------------------------------------- /packages/theme/src/pipes/safe/url.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; 3 | 4 | @Pipe({ name: 'url' }) 5 | export class URLPipe implements PipeTransform { 6 | constructor(private dom: DomSanitizer) {} 7 | 8 | transform(url: string): string | SafeUrl { 9 | return url ? this.dom.bypassSecurityTrustUrl(url) : ''; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/theme/system/utils/_overflow.less: -------------------------------------------------------------------------------- 1 | /** 2 | * If overflow is clipped, a scroll-bar should be added to see the rest of the content 3 | * 4 | * 如果溢出框,则应该提供滚动机制 5 | */ 6 | .overflow-auto { 7 | overflow: auto !important; 8 | } 9 | 10 | /** 11 | * The overflow is clipped, and the rest of the content will be invisible 12 | * 13 | * 裁剪内容,不提供滚动机制 14 | */ 15 | .overflow-hidden { 16 | overflow: hidden !important; 17 | } 18 | -------------------------------------------------------------------------------- /packages/util/pipes/currency/module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { CurrencyCNYPipe } from './cny.pipe'; 4 | import { CurrencyMegaPipe } from './mega.pipe'; 5 | import { CurrencyPricePipe } from './price.pipe'; 6 | 7 | const PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe]; 8 | 9 | @NgModule({ 10 | declarations: PIPES, 11 | exports: PIPES 12 | }) 13 | export class CurrencyPipeModule {} 14 | -------------------------------------------------------------------------------- /schematics/plugin/interface.ts: -------------------------------------------------------------------------------- 1 | export interface PluginOptions { 2 | type: 'add' | 'remove'; 3 | /** 项目名 */ 4 | name: string; 5 | /** 前缀名 */ 6 | projectPrefix: string; 7 | /** 项目根目录 */ 8 | root: string; 9 | /** 项目源文件目录,例如:`src` */ 10 | sourceRoot: string; 11 | /** 命令行指定项目名,使用时务必采用 @name 参数 */ 12 | project?: string; 13 | /** 包管理类型 */ 14 | packageManager?: 'npm' | 'yarn'; 15 | defaultLanguage?: string; 16 | } 17 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /packages/form/src/widgets/text/schema.ts: -------------------------------------------------------------------------------- 1 | import { SFUISchemaItem } from '../../schema/ui'; 2 | 3 | export interface SFTextWidgetSchema extends SFUISchemaItem { 4 | /** 5 | * 当值不存在时所指定的文本,默认:`-` 6 | * 7 | * Default text of this item, Default: `-` 8 | */ 9 | defaultText?: string; 10 | 11 | /** 12 | * 是否支持HTML,默认:`true` 13 | * 14 | * Whether to support HTML, default: `true` 15 | */ 16 | html?: boolean; 17 | } 18 | -------------------------------------------------------------------------------- /packages/theme/src/pipes/safe/html.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; 3 | 4 | @Pipe({ name: 'html' }) 5 | export class HTMLPipe implements PipeTransform { 6 | constructor(private dom: DomSanitizer) {} 7 | 8 | transform(html: string): string | SafeHtml { 9 | return html ? this.dom.bypassSecurityTrustHtml(html) : ''; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "rootDir": "./", 6 | "outDir": "../out-tsc/spec", 7 | "types": ["jasmine", "node"], 8 | "paths": { 9 | "@delon/*": ["./*"] 10 | }, 11 | "esModuleInterop": true, 12 | "noImplicitThis": false 13 | }, 14 | "files": ["test.ts"], 15 | "include": ["**/*.spec.ts", "**/*.d.ts"] 16 | } 17 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/style/fix/_page-header.less: -------------------------------------------------------------------------------- 1 | @{page-header-prefix} { 2 | margin-right: -@alain-blank-content-padding-horizontal; 3 | margin-bottom: @alain-blank-content-padding-vertical; 4 | margin-left: -@alain-blank-content-padding-horizontal; 5 | padding: @alain-blank-content-padding-horizontal; 6 | padding-top: @alain-blank-content-padding-horizontal - 12; 7 | padding-bottom: @alain-blank-content-padding-horizontal - 12; 8 | } 9 | -------------------------------------------------------------------------------- /src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app-server", 5 | "module": "commonjs", 6 | "types": ["node"], 7 | "typeRoots": ["../node_modules/@types"] 8 | }, 9 | "files": ["main.server.ts", "server.ts", "../packages/dev-mode-types.d.ts"], 10 | "angularCompilerOptions": { 11 | "entryModule": "./app/app.server.module#AppServerModule" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/abc/exception/demo/403.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 2 3 | title: 403 4 | --- 5 | 6 | 403 页面,配合自定义操作。 7 | 8 | ```ts 9 | import { Component } from '@angular/core'; 10 | 11 | @Component({ 12 | selector: 'app-demo', 13 | template: ` 14 | 15 | 16 | 17 | 18 | `, 19 | }) 20 | export class DemoComponent {} 21 | ``` 22 | -------------------------------------------------------------------------------- /packages/abc/tag-select/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Layout 3 | title: tag-select 4 | subtitle: 标签选择器 5 | cols: 1 6 | module: import { TagSelectModule } from '@delon/abc/tag-select'; 7 | --- 8 | 9 | 增加标签的展开与收进功能。 10 | 11 | ## API 12 | 13 | ### tag-select 14 | 15 | | 成员 | 说明 | 类型 | 默认值 | 16 | |----|----|----|-----| 17 | | `[expandable]` | 是否启用 `展开与收进` | `boolean` | `true` | 18 | | `(change)` | 展开与收进回调函数,参数:`boolean` | `EventEmitter` | - | 19 | -------------------------------------------------------------------------------- /src/styles/_custom.less: -------------------------------------------------------------------------------- 1 | #header .ant-row-rtl { 2 | github-button .gh-count { 3 | display: none !important; 4 | } 5 | } 6 | 7 | .copy-import-module { 8 | padding: 2px 6px; 9 | color: #fff; 10 | font-size: 12px; 11 | background: @highlight-color; 12 | border-radius: 34px; 13 | cursor: pointer; 14 | } 15 | 16 | .menu-deprecated { 17 | opacity: 0.5; 18 | 19 | .ant-badge { 20 | text-decoration: line-through; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.md 2 | **/*.svg 3 | # **/*.html 4 | **/test.ts 5 | src/index.html 6 | 7 | .stylelintrc 8 | .prettierrc 9 | 10 | _nginx/ 11 | _screenshot/ 12 | node_modules/ 13 | coverage/ 14 | dist/ 15 | package.json 16 | src/app/routes/gen/ 17 | src/templates/ 18 | schematics/**/files/ 19 | packages/theme/system/mixins/_freak.less 20 | packages/theme/system/mixins/_functions.less 21 | theme-default.less 22 | theme-dark.less 23 | theme-compact.less 24 | -------------------------------------------------------------------------------- /packages/util/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@delon/util/array'; 2 | export * from '@delon/util/browser'; 3 | export * from '@delon/util/config'; 4 | export * from '@delon/util/date-time'; 5 | export * from '@delon/util/form'; 6 | export * from '@delon/util/format'; 7 | export * from '@delon/util/math'; 8 | export * from '@delon/util/decorator'; 9 | export * from '@delon/util/other'; 10 | export * from '@delon/util/pipes'; 11 | export * from '@delon/util/token'; 12 | -------------------------------------------------------------------------------- /.github/workflows/mirror.yml: -------------------------------------------------------------------------------- 1 | name: GiteeMirror 2 | 3 | on: push 4 | 5 | jobs: 6 | to_gitee: 7 | if: "!startsWith(github.event.commits[0].message, 'release')" 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v1 11 | - uses: pixta-dev/repository-mirroring-action@v1 12 | with: 13 | target_repo_url: git@gitee.com:ng-alain/delon.git 14 | ssh_private_key: ${{ secrets.GITEE_SSH_PRIVATE_KEY }} 15 | -------------------------------------------------------------------------------- /packages/abc/pdf/pdf.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzSkeletonModule } from 'ng-zorro-antd/skeleton'; 5 | 6 | import { PdfComponent } from './pdf.component'; 7 | 8 | const COMPONENTS = [PdfComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzSkeletonModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class PdfModule {} 16 | -------------------------------------------------------------------------------- /packages/abc/sg/sg.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { SGContainerComponent } from './sg-container.component'; 5 | import { SGComponent } from './sg.component'; 6 | 7 | const COMPONENTS = [SGContainerComponent, SGComponent]; 8 | 9 | @NgModule({ 10 | imports: [CommonModule], 11 | declarations: COMPONENTS, 12 | exports: COMPONENTS 13 | }) 14 | export class SGModule {} 15 | -------------------------------------------------------------------------------- /packages/theme/system/utils/_float.less: -------------------------------------------------------------------------------- 1 | /** 2 | * Set element not float 3 | * 4 | * 设置元素不浮动 5 | */ 6 | .float-none { 7 | float: none !important; 8 | } 9 | 10 | /** 11 | * Set the element to float to the left 12 | * 13 | * 设置元素向左浮动 14 | */ 15 | .float-left { 16 | float: left !important; 17 | } 18 | 19 | /** 20 | * Set the element to float to the right 21 | * 22 | * 设置元素向右浮动 23 | */ 24 | .float-right { 25 | float: right !important; 26 | } 27 | -------------------------------------------------------------------------------- /packages/util/config/abc/sv.type.ts: -------------------------------------------------------------------------------- 1 | export class AlainSVConfig { 2 | /** 大小,默认:`large` */ 3 | size?: 'small' | 'large'; 4 | /** 间距,默认:`32` */ 5 | gutter?: number; 6 | /** 布局,默认:`horizontal` */ 7 | layout?: 'horizontal' | 'vertical'; 8 | /** 列数,默认:`3` */ 9 | col?: number; 10 | /** 是否显示默认值,当内容为空值时显示 `-`,默认:`true` */ 11 | default?: boolean; 12 | /** `label` 固定宽度,若 `null` 或 `undefined` 表示非固定,默认:`null` */ 13 | labelWidth?: number; 14 | } 15 | -------------------------------------------------------------------------------- /packages/util/config/theme/i18n.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainThemeI18nConfig { 2 | /** 3 | * Overrides the default interpolation start and end delimiters ({{ and }}). 4 | * 5 | * 改写默认的插值表达式起止分界符({{ 和 }})。 6 | */ 7 | interpolation?: [string, string]; 8 | 9 | /** 10 | * Internationalization code URL guard parameter name, default: `i18n` 11 | * 12 | * 国际化代码 URL 守卫参数名,默认:`i18n` 13 | */ 14 | paramNameOfUrlGuard?: string; 15 | } 16 | -------------------------------------------------------------------------------- /src/app/core/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { ReplaySubject } from 'rxjs'; 3 | 4 | export type SiteTheme = 'default' | 'dark' | 'compact'; 5 | 6 | @Injectable({ providedIn: 'root' }) 7 | export class AppService { 8 | theme: SiteTheme = 'default'; 9 | theme$ = new ReplaySubject(1); 10 | 11 | setTheme(theme: SiteTheme): void { 12 | this.theme = theme; 13 | this.theme$.next(theme); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/app/core/mobile.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { BehaviorSubject, Observable } from 'rxjs'; 3 | 4 | @Injectable({ providedIn: 'root' }) 5 | export class MobileService { 6 | private notify$ = new BehaviorSubject(null!); 7 | 8 | next(value: boolean): void { 9 | this.notify$.next(value); 10 | } 11 | 12 | get change(): Observable { 13 | return this.notify$.asObservable(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/abc/observers/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Basic 3 | title: Observers 4 | subtitle: 观察者 5 | order: 7 6 | module: import { ObserversModule } from '@delon/abc/observers'; 7 | --- 8 | 9 | `ObserversModule` 包提供了基于原生 Web 平台的观察者 API(比如 `MutationObserver`) 的便捷指令。 10 | 11 | ## API 12 | 13 | ### [observeSize] 14 | 15 | 观察DOM大小变化。 16 | 17 | | 成员 | 说明 | 类型 | 默认值 | 全局配置 | 18 | |----|----|----|-----|------| 19 | | `(observeSize)` | 事件 | `MutationRecord[]` | - | | 20 | -------------------------------------------------------------------------------- /packages/chart/trend/trend.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzIconModule } from 'ng-zorro-antd/icon'; 5 | 6 | import { TrendComponent } from './trend.component'; 7 | 8 | const COMPONENTS = [TrendComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzIconModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class TrendModule {} 16 | -------------------------------------------------------------------------------- /packages/theme/system/theme-dark.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | // Grey patch 4 | @greyColorer: lighter lighten(@black, 6%), darker lighten(@black, 4%); 5 | 6 | @nz-table-rep-even-background: darken(@table-row-hover-bg, 10%); 7 | @nz-table-rep-column-name-color: darken(@text-color, 30%); 8 | 9 | @sf-optional-color: darken(@text-color, 50%); 10 | @sf-widget-array-type-card-remove-bg: rgba(0, 0, 0, 0.66); 11 | @sf-widget-array-transfer-bg: inherit; 12 | -------------------------------------------------------------------------------- /schematics/sta/templates/dto-type.eta: -------------------------------------------------------------------------------- 1 | <% 2 | const { utils, config, modelTypes } = it; 3 | const { _ } = utils; 4 | const dataContracts = config.modular ? _.map(modelTypes, "name") : []; 5 | %> 6 | <% if (dataContracts.length) { %> 7 | import type { <%~ dataContracts.join(", ") %> } from "../models" 8 | 9 | <% } %> 10 | <% it.route.routes.forEach((route) => { %> 11 | <%~ includeFile('dto.eta', { ...it, route, moduleName: it.route.moduleName }) %> 12 | <% }) %> 13 | -------------------------------------------------------------------------------- /packages/abc/st/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './st.interfaces'; 2 | export * from './st.types'; 3 | export * from './st-column-source'; 4 | export * from './st-data-source'; 5 | export * from './st-export'; 6 | export * from './st-widget'; 7 | export * from './st-widget-host.directive'; 8 | export { STComponent } from './st.component'; 9 | export { STRowDirective } from './st-row.directive'; 10 | export * from './st.config'; 11 | export { STModule } from './st.module'; 12 | -------------------------------------------------------------------------------- /packages/chart/trend/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: G2 3 | title: trend 4 | subtitle: 趋势标记 5 | cols: 1 6 | module: import { TrendModule } from '@delon/chart/trend'; 7 | --- 8 | 9 | 趋势符号,标记上升和下降趋势。通常用绿色代表“好”,红色代表“不好”,股票涨跌场景除外。 10 | 11 | ## API 12 | 13 | ### trend 14 | 15 | | 成员 | 说明 | 类型 | 默认值 | 16 | |----|----|----|-----| 17 | | `[colorful]` | 是否彩色标记 | `boolean` | `true` | 18 | | `[flag]` | 上升下降标识 | `'up','down'` | - | 19 | | `[reverseColor]` | 颜色反转 | `boolean` | `false` | 20 | -------------------------------------------------------------------------------- /packages/form/src/widgets/boolean/boolean.widget.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/theme/system/ng/_form.less: -------------------------------------------------------------------------------- 1 | @form-state-visual-feedback-enabled: false; 2 | 3 | .form-state-visual-feedback-mixin(@enabled) when(@enabled = true) { 4 | .ng-invalid { 5 | &:focus { 6 | box-shadow: 0 0 @outline-blur-size @outline-width fade-out(@error-color, 0.8); 7 | } 8 | 9 | &, 10 | &:hover { 11 | border-color: @error-color; 12 | } 13 | } 14 | } 15 | .form-state-visual-feedback-mixin(@form-state-visual-feedback-enabled); 16 | -------------------------------------------------------------------------------- /packages/auth/src/token/helper.spec.ts: -------------------------------------------------------------------------------- 1 | import { JWTTokenModel } from '../..'; 2 | import { CheckJwt } from './helper'; 3 | 4 | describe('helper: CheckJwt', () => { 5 | it('invalid jwt token should return false', () => { 6 | const tokenModel = new JWTTokenModel(); 7 | const offset = 10; 8 | tokenModel.token = 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTk1OD'; // bad jwt token 9 | expect(CheckJwt(tokenModel, offset)).toBe(false); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/assets/schema/onboarding.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../node_modules/@delon/abc/onboarding/schema.json", 3 | "maskClosable": false, 4 | "items": [ 5 | { 6 | "selectors": ".test1-1", 7 | "title": "This is title", 8 | "content": "This is content" 9 | }, 10 | { 11 | "selectors": ".test1-2", 12 | "title": "This is second title", 13 | "content": "This is second content", 14 | "width": 200 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/chart/gauge/gauge.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzSkeletonModule } from 'ng-zorro-antd/skeleton'; 5 | 6 | import { G2GaugeComponent } from './gauge.component'; 7 | 8 | const COMPONENTS = [G2GaugeComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzSkeletonModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class G2GaugeModule {} 16 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/fix/_page-header.less: -------------------------------------------------------------------------------- 1 | @{alain-default-prefix} { 2 | @{page-header-prefix} { 3 | margin-right: -@alain-default-content-padding; 4 | margin-bottom: @alain-default-content-padding; 5 | margin-left: -@alain-default-content-padding; 6 | padding: @alain-default-content-padding - 12 @alain-default-content-padding 0 @alain-default-content-padding; 7 | border-bottom: 1px solid @alain-default-content-heading-border; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/theme/src/services/i18n/i18n.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Inject, Pipe, PipeTransform } from '@angular/core'; 2 | 3 | import { AlainI18NService, ALAIN_I18N_TOKEN } from './i18n'; 4 | 5 | @Pipe({ name: 'i18n' }) 6 | export class I18nPipe implements PipeTransform { 7 | constructor(@Inject(ALAIN_I18N_TOKEN) private i18n: AlainI18NService) {} 8 | 9 | transform(key: string, params?: Record): string { 10 | return this.i18n.fanyi(key, params); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/util/config/abc/media.type.ts: -------------------------------------------------------------------------------- 1 | import type { NzSafeAny } from 'ng-zorro-antd/core/types'; 2 | 3 | export interface AlainMediaConfig { 4 | /** 5 | * Plyr library path, default: `["https://cdn.bootcdn.net/ajax/libs/plyr/3.5.10/plyr.min.js", "https://cdn.bootcdn.net/ajax/libs/plyr/3.5.10/plyr.css"]` 6 | */ 7 | urls?: string[]; 8 | /** 9 | * Please refer to [plyr options](https://github.com/sampotts/plyr#options) 10 | */ 11 | options?: NzSafeAny; 12 | } 13 | -------------------------------------------------------------------------------- /packages/util/config/index.ts: -------------------------------------------------------------------------------- 1 | export * from './abc/index'; 2 | export * from './acl/acl.type'; 3 | export * from './auth/auth.type'; 4 | export * from './cache/cache.type'; 5 | export * from './chart/chart.type'; 6 | export * from './util/array.type'; 7 | export * from './util/currency.type'; 8 | export * from './theme/index'; 9 | export * from './mock/mock.type'; 10 | export * from './sf/sf.type'; 11 | 12 | export * from './config.types'; 13 | export * from './config.service'; 14 | -------------------------------------------------------------------------------- /schematics/list/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/app/core/code/files/main.ts: -------------------------------------------------------------------------------- 1 | export default `import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch((err) => console.error(err)); 14 | `; 15 | -------------------------------------------------------------------------------- /packages/chart/water-wave/demo/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 0 3 | title: 4 | zh-CN: 基础 5 | en-US: Basic 6 | --- 7 | 8 | 基础用法。 9 | 10 | ```ts 11 | import { Component } from '@angular/core'; 12 | 13 | @Component({ 14 | selector: 'chart-water-wave-basic', 15 | template: ` 16 | 17 | `, 18 | host: { 19 | '[class.d-block]': 'true' 20 | } 21 | }) 22 | export class DemoComponent {} 23 | ``` 24 | -------------------------------------------------------------------------------- /packages/form/src/widgets/boolean/boolean.widget.ts: -------------------------------------------------------------------------------- 1 | import { Component, ViewEncapsulation } from '@angular/core'; 2 | 3 | import { ControlUIWidget } from '../../widget'; 4 | import { SFBooleanWidgetSchema } from './schema'; 5 | 6 | @Component({ 7 | selector: 'sf-boolean', 8 | templateUrl: './boolean.widget.html', 9 | preserveWhitespaces: false, 10 | encapsulation: ViewEncapsulation.None 11 | }) 12 | export class BooleanWidget extends ControlUIWidget {} 13 | -------------------------------------------------------------------------------- /schematics/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["es2017", "dom"], 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "outDir": "../dist/schematics-test", 7 | "noEmitOnError": false, 8 | "skipDefaultLibCheck": true, 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "experimentalDecorators": true, 12 | "target": "es6", 13 | "types": ["jasmine", "node"] 14 | }, 15 | "exclude": ["*/files/**/*"] 16 | } 17 | -------------------------------------------------------------------------------- /src/dev/lazy/layout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { format } from 'date-fns'; 4 | 5 | @Component({ 6 | selector: 'dev-lazy-layout', 7 | template: ` 8 | 9 |

Lazy Module, {{ now | json }}

10 |
11 | 12 |
13 | ` 14 | }) 15 | export class DevLazyLayoutComponent { 16 | now = format(new Date(), 'yyyy-MM-dd HH:mm:ss'); 17 | } 18 | -------------------------------------------------------------------------------- /packages/abc/auto-focus/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Other 3 | title: auto-focus 4 | subtitle: 自动获得焦点 5 | cols: 1 6 | module: import { AutoFocusModule } from '@delon/abc/auto-focus'; 7 | --- 8 | 9 | 允许在HTML元素出现后立即对其进行设置焦点,默认情况下会对 `input`、`textarea` 带有 `[autofocus="autofocus"]` 生效。 10 | 11 | ## API 12 | 13 | ### [auto-focus] 14 | 15 | | 成员 | 说明 | 类型 | 默认值 | 16 | |----|----|----|-----| 17 | | `[enabled]` | 是否启用 | `boolean` | `true` | 18 | | `[delay]` | 延迟时长(单位:毫秒) | `number` | `300` | 19 | -------------------------------------------------------------------------------- /packages/abc/count-down/count-down.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { CountdownModule } from 'ngx-countdown'; 5 | 6 | import { CountDownComponent } from './count-down.component'; 7 | 8 | const COMPONENTS = [CountDownComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, CountdownModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class CountDownModule {} 16 | -------------------------------------------------------------------------------- /packages/chart/custom/custom.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzSkeletonModule } from 'ng-zorro-antd/skeleton'; 5 | 6 | import { G2CustomComponent } from './custom.component'; 7 | 8 | const COMPONENTS = [G2CustomComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzSkeletonModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class G2CustomModule {} 16 | -------------------------------------------------------------------------------- /packages/form/src/model/string.property.ts: -------------------------------------------------------------------------------- 1 | import { SFValue } from '../interface'; 2 | import { AtomicProperty } from './atomic.property'; 3 | 4 | export class StringProperty extends AtomicProperty { 5 | fallbackValue(): null { 6 | return null; 7 | } 8 | 9 | setValue(value: SFValue, onlySelf: boolean): void { 10 | this._value = value == null ? '' : value; 11 | this.cd(onlySelf); 12 | this.updateValueAndValidity({ onlySelf, emitValueEvent: true }); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/theme-dark.less: -------------------------------------------------------------------------------- 1 | @import './theme-default.less'; 2 | 3 | @alain-default-header-bg: @component-background; 4 | @alain-default-header-box-shadow: @shadow-1-down; 5 | 6 | @alain-default-aside-bg: @component-background; 7 | @alain-default-aside-nav-selected-bg: @component-background; 8 | @alain-default-content-heading-bg: @component-background; 9 | @alain-default-content-heading-border: @border-color-split; 10 | @alain-default-content-bg: @body-background; 11 | -------------------------------------------------------------------------------- /packages/abc/down-file/down-file.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AlainThemeModule } from '@delon/theme'; 5 | 6 | import { DownFileDirective } from './down-file.directive'; 7 | 8 | const DIRECTIVES = [DownFileDirective]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, AlainThemeModule], 12 | declarations: [...DIRECTIVES], 13 | exports: [...DIRECTIVES] 14 | }) 15 | export class DownFileModule {} 16 | -------------------------------------------------------------------------------- /packages/abc/error-collect/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Form 3 | title: error-collect 4 | subtitle: 表单异常消息采集器 5 | cols: 2 6 | module: import { ErrorCollectModule } from '@delon/abc/error-collect'; 7 | --- 8 | 9 | 一个简单的表单异常消息采集器,点击图标跳转相应的位置;必须是一个标准 `form` 表单。 10 | 11 | ## API 12 | 13 | ### error-collect 14 | 15 | | 成员 | 说明 | 类型 | 默认值 | 全局配置 | 16 | |----|----|----|-----|------| 17 | | `[freq]` | 监听频率,单位:毫秒 | `number` | `500` | ✅ | 18 | | `[offsetTop]` | 顶部偏移值,单位:`px` | `number` | `145` | ✅ | 19 | -------------------------------------------------------------------------------- /packages/form/src/widgets/rate/schema.ts: -------------------------------------------------------------------------------- 1 | import { SFUISchemaItem } from '../../schema/ui'; 2 | 3 | export interface SFRateWidgetSchema extends SFUISchemaItem { 4 | /** 5 | * 是否允许再次点击后清除,默认:`true` 6 | */ 7 | allowClear?: boolean; 8 | 9 | /** 10 | * 自动获取焦点,默认:`false` 11 | */ 12 | autoFocus?: boolean; 13 | 14 | /** 15 | * 提醒文本模板,`{{value}}` 表示当前值(注意无任何空格) 16 | */ 17 | text?: string; 18 | 19 | /** 20 | * 自定义每项的提示信息 21 | */ 22 | tooltips?: string[]; 23 | } 24 | -------------------------------------------------------------------------------- /packages/util/config/mock/mock.type.ts: -------------------------------------------------------------------------------- 1 | export interface AlainMockConfig { 2 | /** 3 | * 请求延迟,单位:毫秒,默认:`300` 4 | */ 5 | delay?: number; 6 | /** 7 | * 是否强制所有请求都Mock,默认:`false`,`true` 表示当请求的URL不存在时直接返回 404 错误,`false` 表示未命中时发送真实HTTP请求 8 | */ 9 | force?: boolean; 10 | /** 11 | * 是否打印 Mock 请求信息,弥补浏览器无Network信息,默认:`true` 12 | */ 13 | log?: boolean; 14 | /** 15 | * 是否拦截命中后继续调用后续拦截器的 `intercept` 方法,默认:`true` 16 | */ 17 | executeOtherInterceptors?: boolean; 18 | } 19 | -------------------------------------------------------------------------------- /src/styles.less: -------------------------------------------------------------------------------- 1 | // 全部引入 2 | @import '../packages/theme/system/index.less'; 3 | @import '../packages/abc/index.less'; 4 | @import '../packages/chart/index.less'; 5 | @import '../packages/theme/layout-default/style/index.less'; 6 | 7 | // docs 8 | @import 'ng-zorro-antd/resizable/style/entry.less'; 9 | @import './styles/index.less'; 10 | @import './styles/theme.less'; 11 | 12 | .scrollbar-mixin(~'.ant-affix'); 13 | 14 | // 可以替换 dark, compact 15 | // @import '../packages/theme/theme-dark.less'; 16 | -------------------------------------------------------------------------------- /packages/abc/global-footer/global-footer.component.html: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/_fixed.less: -------------------------------------------------------------------------------- 1 | @{alain-default-prefix}__fixed { 2 | @{alain-default-prefix} { 3 | &__header { 4 | position: fixed; 5 | top: 0; 6 | left: 0; 7 | } 8 | 9 | &__aside { 10 | position: fixed; 11 | } 12 | } 13 | } 14 | 15 | @{alain-default-prefix}__fixed:not(@{alain-default-prefix}__hide-header) { 16 | @{alain-default-prefix} { 17 | &__content { 18 | margin-top: @alain-default-header-hg; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/abc/error-collect/error-collect.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzIconModule } from 'ng-zorro-antd/icon'; 5 | 6 | import { ErrorCollectComponent } from './error-collect.component'; 7 | 8 | const COMPONENTS = [ErrorCollectComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzIconModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class ErrorCollectModule {} 16 | -------------------------------------------------------------------------------- /packages/abc/full-content/full-content-toggle.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from '@angular/core'; 2 | 3 | import { FullContentComponent } from './full-content.component'; 4 | 5 | @Directive({ 6 | selector: '[full-toggle]', 7 | exportAs: 'fullToggle', 8 | host: { 9 | '(click)': '_click()' 10 | } 11 | }) 12 | export class FullContentToggleDirective { 13 | constructor(private parent: FullContentComponent) {} 14 | 15 | _click(): void { 16 | this.parent.toggle(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/chart/mini-progress/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: g2-mini-progress 3 | subtitle: 迷你进度条 4 | cols: 1 5 | type: G2 6 | module: import { G2MiniProgressModule } from '@delon/chart/mini-progress'; 7 | --- 8 | 9 | 用于显示跟速度相关图形再适合不过。 10 | 11 | ## API 12 | 13 | ### g2-mini-progress 14 | 15 | | 参数 | 说明 | 类型 | 默认值 | 16 | |----|----|----|-----| 17 | | `[target]` | 目标比例 | `number` | - | 18 | | `[color]` | 进度条颜色 | `string` | - | 19 | | `[strokeWidth]` | 进度条高度 | `number` | - | 20 | | `[percent]` | 进度比例 | `number` | - | -------------------------------------------------------------------------------- /packages/chart/tag-cloud/tag-cloud.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzSkeletonModule } from 'ng-zorro-antd/skeleton'; 5 | 6 | import { G2TagCloudComponent } from './tag-cloud.component'; 7 | 8 | const COMPONENTS = [G2TagCloudComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzSkeletonModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class G2TagCloudModule {} 16 | -------------------------------------------------------------------------------- /packages/util/token/window.ts: -------------------------------------------------------------------------------- 1 | import { DOCUMENT } from '@angular/common'; 2 | import { inject, InjectionToken } from '@angular/core'; 3 | 4 | /** 5 | * Access to global `window` object 6 | * 7 | * 访问全局 `window` 对象 8 | */ 9 | export const WINDOW = new InjectionToken('WINDOW', { 10 | factory: () => { 11 | const { defaultView } = inject(DOCUMENT); 12 | if (!defaultView) { 13 | throw new Error('Window is not available'); 14 | } 15 | return defaultView; 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /packages/chart/chart-echarts/echarts.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzSkeletonModule } from 'ng-zorro-antd/skeleton'; 5 | 6 | import { ChartEChartsComponent } from './echarts.component'; 7 | 8 | const COMPONENTS = [ChartEChartsComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzSkeletonModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class ChartEChartsModule {} 16 | -------------------------------------------------------------------------------- /packages/chart/water-wave/water-wave.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzOutletModule } from 'ng-zorro-antd/core/outlet'; 5 | 6 | import { G2WaterWaveComponent } from './water-wave.component'; 7 | 8 | const COMPONENTS = [G2WaterWaveComponent]; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, NzOutletModule], 12 | declarations: COMPONENTS, 13 | exports: COMPONENTS 14 | }) 15 | export class G2WaterWaveModule {} 16 | -------------------------------------------------------------------------------- /packages/theme/layout-default/style/fix/_footer-toolbar.less: -------------------------------------------------------------------------------- 1 | @{footer-toolbar-prefix} { 2 | &__left { 3 | margin-left: @alain-default-aside-wd; 4 | } 5 | } 6 | 7 | @{alain-default-prefix}__collapsed { 8 | @{footer-toolbar-prefix} { 9 | &__left { 10 | margin-left: @alain-default-aside-collapsed-wd; 11 | } 12 | } 13 | } 14 | 15 | @{footer-toolbar-prefix}__body { 16 | @{alain-default-prefix}__content { 17 | margin-bottom: @layout-gutter + @footer-toolbar-height; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/util/pipes/filter/filter.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | import type { NzSafeAny } from 'ng-zorro-antd/core/types'; 4 | 5 | @Pipe({ name: 'filter' }) 6 | export class FilterPipe implements PipeTransform { 7 | /** 8 | * Filter array 9 | * 10 | * 过滤数组 11 | */ 12 | transform(array: readonly T[], matcher: (item: T, ...args: NzSafeAny[]) => boolean, ...args: NzSafeAny[]): T[] { 13 | return array.filter(i => matcher(i, ...args)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /scripts/ci/lint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | readonly thisDir=$(cd $(dirname $0); pwd) 6 | 7 | cd $(dirname $0)/../.. 8 | 9 | TS=false 10 | LESS=false 11 | 12 | for ARG in "$@"; do 13 | case "$ARG" in 14 | -ts) 15 | TS=true 16 | ;; 17 | -less) 18 | LESS=true 19 | ;; 20 | esac 21 | done 22 | 23 | if [[ ${TS} == true ]]; then 24 | npm run lint:ts 25 | fi 26 | 27 | if [[ ${LESS} == true ]]; then 28 | $(npm bin)/stylelint 'packages/**/*.less' 29 | fi 30 | 31 | -------------------------------------------------------------------------------- /src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "sourceMap": true, 4 | "declaration": false, 5 | "moduleResolution": "node", 6 | "experimentalDecorators": true, 7 | "allowSyntheticDefaultImports": true, 8 | "lib": ["es2016"], 9 | "outDir": "../out-tsc/spec", 10 | "module": "commonjs", 11 | "target": "es6", 12 | "baseUrl": "", 13 | "types": ["jasmine", "node"] 14 | }, 15 | "files": ["test.ts", "polyfills.ts"], 16 | "include": ["**/*.spec.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/abc/full-content/full-content.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { BehaviorSubject, Observable, share } from 'rxjs'; 3 | 4 | @Injectable({ providedIn: 'root' }) 5 | export class FullContentService { 6 | private _change = new BehaviorSubject(null); 7 | 8 | /** 切换全屏工作区状态 */ 9 | toggle(): void { 10 | this._change.next(true); 11 | } 12 | 13 | get change(): Observable { 14 | return this._change.pipe(share()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /schematics/utils/less.ts: -------------------------------------------------------------------------------- 1 | import { Rule, Tree } from '@angular-devkit/schematics'; 2 | 3 | import { readJSON, writeJSON } from './json'; 4 | 5 | export function addImportNotation(): Rule { 6 | return (tree: Tree) => { 7 | const filePath = '.stylelintrc'; 8 | const json = readJSON(tree, filePath); 9 | if (json == null) return tree; 10 | if (!json.rules) json.rules = {}; 11 | json.rules['import-notation'] = 'string'; 12 | writeJSON(tree, filePath, json); 13 | return tree; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/chart/pie/demo/mini.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 0 3 | title: 4 | zh-CN: 迷你型 5 | en-US: Mini 6 | --- 7 | 8 | 通过简化 `pie` 属性的设置,可以快速的实现极简的饼状图,可配合 `chart-card` 组合展现更多业务场景。 9 | 10 | ```ts 11 | import { Component } from '@angular/core'; 12 | 13 | @Component({ 14 | selector: 'app-demo', 15 | template: ` 16 |
17 | 18 |
19 | `, 20 | }) 21 | export class DemoComponent {} 22 | ``` 23 | -------------------------------------------------------------------------------- /packages/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@delon/testing", 3 | "version": "0.0.0-PLACEHOLDER", 4 | "author": "cipchk", 5 | "license": "MIT", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/ng-alain/delon.git" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/ng-alain/ng-alain/issues" 12 | }, 13 | "homepage": "https://ng-alain.com", 14 | "keywords": [ 15 | "delon", 16 | "ng-alain", 17 | "angular", 18 | "testing" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /packages/util/token/page-visibility.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { first } from 'rxjs'; 3 | 4 | import { PAGE_VISIBILITY } from './page-visibility'; 5 | 6 | describe('util: PAGE_VISIBILITY', () => { 7 | it('should be working', done => { 8 | TestBed.configureTestingModule({}); 9 | TestBed.inject(PAGE_VISIBILITY) 10 | .pipe(first()) 11 | .subscribe(state => { 12 | expect(typeof state).toBe('boolean'); 13 | done(); 14 | }); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /packages/abc/let/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Basic 3 | order: 1 4 | title: let 5 | subtitle: 定义 6 | cols: 1 7 | module: import { LetModule } from '@delon/abc/let'; 8 | --- 9 | 10 | 允许在模板内复用计算值(包含异步),避免重复重新计算。 11 | 12 | ```html 13 |
14 |

{{ v }}

15 |
16 |
17 |

{{ time }}

18 |
19 | ``` 20 | 21 | ## API 22 | 23 | ### [let] 24 | 25 | | 参数 | 说明 | 类型 | 默认值 | 全局配置 | 26 | |----|----|----|-----|------| 27 | | `[let]` | 表达式 | `T` | - | - | 28 | -------------------------------------------------------------------------------- /packages/abc/tag-select/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Layout 3 | title: tag-select 4 | subtitle: Tag Select 5 | cols: 1 6 | module: import { TagSelectModule } from '@delon/abc/tag-select'; 7 | --- 8 | 9 | Increase the label expansion and retraction function. 10 | 11 | ## API 12 | 13 | ### tag-select 14 | 15 | | Property | Description | Type | Default | 16 | |----------|-------------|------|---------| 17 | | `[expandable]` | Whether to enabled | `boolean` | `true` | 18 | | `(change)` | Callback | `EventEmitter` | - | 19 | -------------------------------------------------------------------------------- /schematics/ng-update/data/constructor-checks.ts: -------------------------------------------------------------------------------- 1 | import { ConstructorChecksUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics'; 2 | 3 | /** 4 | * List of class names for which the constructor signature has been changed. The new constructor 5 | * signature types don't need to be stored here because the signature will be determined 6 | * automatically through type checking. 7 | */ 8 | export const constructorChecks: VersionChanges = { 9 | [TargetVersion.V15]: [] 10 | }; 11 | -------------------------------------------------------------------------------- /packages/abc/full-content/full-content.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { FullContentToggleDirective } from './full-content-toggle.directive'; 5 | import { FullContentComponent } from './full-content.component'; 6 | 7 | const COMPONENTS = [FullContentComponent, FullContentToggleDirective]; 8 | 9 | @NgModule({ 10 | imports: [CommonModule], 11 | declarations: COMPONENTS, 12 | exports: COMPONENTS 13 | }) 14 | export class FullContentModule {} 15 | -------------------------------------------------------------------------------- /packages/theme/src/services/rtl/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Service 3 | order: 6 4 | title: RTLService 5 | subtitle: RTL Service 6 | --- 7 | 8 | 9 | RTL service control. 10 | 11 | ## API 12 | 13 | | Method | Property | Description | 14 | |--------|----------|-------------| 15 | | `dir` | `Direction` | Get or Set the current text direction | 16 | | `nextDir` | `Direction` | Get the next text direction | 17 | | `change` | `Observable` | Subscription change notification | 18 | | `toggle()` | - | Toggle text direction | 19 | -------------------------------------------------------------------------------- /src/styles/_reset.less: -------------------------------------------------------------------------------- 1 | body, 2 | div, 3 | dl, 4 | dt, 5 | dd, 6 | ul, 7 | ol, 8 | li, 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6, 15 | pre, 16 | code, 17 | form, 18 | fieldset, 19 | legend, 20 | input, 21 | textarea, 22 | p, 23 | blockquote, 24 | th, 25 | td, 26 | hr, 27 | button, 28 | article, 29 | aside, 30 | details, 31 | figcaption, 32 | figure, 33 | footer, 34 | header, 35 | hgroup, 36 | menu, 37 | nav, 38 | section { 39 | margin: 0; 40 | padding: 0; 41 | } 42 | 43 | ul, 44 | ol { 45 | list-style: none; 46 | } 47 | -------------------------------------------------------------------------------- /packages/form/src/widgets/text/index.en-US.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: text 3 | subtitle: Text 4 | type: Widgets 5 | --- 6 | 7 | Text in form. 8 | 9 | ## Rules 10 | 11 | - Forced remove of the `required` effect 12 | - Auto render `-` if the `defaultText` value does not exist 13 | 14 | ## API 15 | 16 | ### ui 17 | 18 | | Property | Description | Type | Default | 19 | |----------|-------------|------|---------| 20 | | `[defaultText]` | Default text of this item | `string` | `-` | 21 | | `[html]` | Whether to support HTML | `boolean` | `true` | 22 | -------------------------------------------------------------------------------- /packages/util/pipes/currency/demo/currency-cny.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: example 3 | --- 4 | 5 | ```ts 6 | import { Component } from '@angular/core'; 7 | 8 | @Component({ 9 | selector: 'app-demo', 10 | template: ` 11 |

12 | {{ {{ value }} | cny }} = {{ value | cny }} 13 |

14 | 15 | 16 | 17 | `, 18 | }) 19 | export class DemoComponent { 20 | value = 100; 21 | } 22 | ``` 23 | -------------------------------------------------------------------------------- /packages/abc/xlsx/xlsx.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, Input } from '@angular/core'; 2 | 3 | import { XlsxService } from './xlsx.service'; 4 | import { XlsxExportOptions } from './xlsx.types'; 5 | 6 | @Directive({ 7 | selector: '[xlsx]', 8 | exportAs: 'xlsx', 9 | host: { 10 | '(click)': '_click()' 11 | } 12 | }) 13 | export class XlsxDirective { 14 | @Input('xlsx') data!: XlsxExportOptions; 15 | 16 | constructor(private srv: XlsxService) {} 17 | 18 | _click(): void { 19 | this.srv.export(this.data); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/cache/src/interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | 3 | export interface ICache { 4 | v: any; 5 | /** 过期时间戳,`0` 表示不过期 */ 6 | e: number; 7 | } 8 | 9 | export interface ICacheStore { 10 | get(key: string): ICache | null; 11 | 12 | set(key: string, value: ICache): boolean; 13 | 14 | remove(key: string): void; 15 | } 16 | 17 | export type CacheNotifyType = 'set' | 'remove' | 'expire'; 18 | 19 | export interface CacheNotifyResult { 20 | type: CacheNotifyType; 21 | value?: any; 22 | } 23 | -------------------------------------------------------------------------------- /schematics/application/files/src/app/core/core.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, Optional, SkipSelf } from '@angular/core'; 2 | import { throwIfAlreadyLoaded } from './module-import-guard'; 3 | <% if (i18n) { %> 4 | import { I18NService } from './i18n/i18n.service';<% } %> 5 | 6 | @NgModule({ 7 | providers: [<% if (i18n) { %> 8 | I18NService<% } %> 9 | ] 10 | }) 11 | export class CoreModule { 12 | constructor( @Optional() @SkipSelf() parentModule: CoreModule) { 13 | throwIfAlreadyLoaded(parentModule, 'CoreModule'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /schematics/view/schema.ts: -------------------------------------------------------------------------------- 1 | import { Schema as ComponentSchema } from '@schematics/angular/component/schema'; 2 | 3 | export interface Schema extends ComponentSchema { 4 | /** 5 | * 指定目标路径,支持 `bus/list` 写法 (Specifies relative path, could be set like `bus/list`.) 6 | */ 7 | target?: string; 8 | /** 9 | * 指定组件名不加前缀 (Without prefix to selectors) 10 | */ 11 | withoutPrefix?: boolean; 12 | /** 13 | * 指定是否使用模态框 (Specifies using modal mode) 14 | */ 15 | modal?: boolean; 16 | service?: 'ignore' | 'none' | 'root'; 17 | } 18 | -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [], 6 | "resolveJsonModule": true, 7 | "esModuleInterop": true 8 | }, 9 | "files": ["main.ts", "polyfills.ts", "../packages/dev-mode-types.d.ts"], 10 | "exclude": ["**/*.d.ts", "test.ts", "**/*.spec.ts", "templates/*.ts"], 11 | "angularCompilerOptions": { 12 | "strictInjectionParameters": true, 13 | "strictInputAccessModifiers": true, 14 | "strictTemplates": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/abc/hotkey/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Basic 3 | order: 1 4 | title: hotkey 5 | subtitle: 热键 6 | cols: 2 7 | module: import { HotkeyModule } from '@delon/abc/hotkey'; 8 | --- 9 | 10 | 基于 [@github/hotke](https://github.com/github/hotkey) 热键库。 11 | 12 | > 如果不清楚热键值,可通过[热键代码](https://github.github.io/hotkey/examples/hotkey_mapper.html)来获取。 13 | 14 | ## API 15 | 16 | ### [hotkey] 17 | 18 | | 成员 | 说明 | 类型 | 默认值 | 19 | |----|----|----|-----| 20 | | `hotkey` | 指定[热键格式](https://github.com/github/hotkey#hotkey-string-format) | `string` | - | 21 | -------------------------------------------------------------------------------- /packages/abc/result/result.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzOutletModule } from 'ng-zorro-antd/core/outlet'; 5 | import { NzIconModule } from 'ng-zorro-antd/icon'; 6 | 7 | import { ResultComponent } from './result.component'; 8 | 9 | const COMPONENTS = [ResultComponent]; 10 | 11 | @NgModule({ 12 | imports: [CommonModule, NzIconModule, NzOutletModule], 13 | declarations: COMPONENTS, 14 | exports: COMPONENTS 15 | }) 16 | export class ResultModule {} 17 | -------------------------------------------------------------------------------- /packages/chart/bar/bar.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { NzOutletModule } from 'ng-zorro-antd/core/outlet'; 5 | import { NzSkeletonModule } from 'ng-zorro-antd/skeleton'; 6 | 7 | import { G2BarComponent } from './bar.component'; 8 | 9 | const COMPONENTS = [G2BarComponent]; 10 | 11 | @NgModule({ 12 | imports: [CommonModule, NzOutletModule, NzSkeletonModule], 13 | declarations: COMPONENTS, 14 | exports: COMPONENTS 15 | }) 16 | export class G2BarModule {} 17 | -------------------------------------------------------------------------------- /packages/theme/src/pipes/date/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 1 3 | title: _date 4 | subtitle: 日期 5 | type: Pipe 6 | --- 7 | 8 | 基于 date-fns 日期格式化,显示更多细节参考 [date-fns](https://date-fns.org/v1.29.0/docs/format)(国内镜像:[moment format](http://momentjs.cn/docs/#/displaying/format/)) 9 | 10 | 最大好处是 date-fns 支持不同种类的时间格式,例如: 11 | 12 | + 2018-08-24 18:08:20 13 | + 2018-08-24 14 | + 20180824 15 | + 1503571962333 16 | 17 | 等等。 18 | 19 | ```html 20 | {{data.registered | _date: 'YYYY年MM月DD日'}} 21 | ``` 22 | 23 | 输出: 24 | 25 | ``` 26 | 2017年08月24日 27 | ``` 28 | -------------------------------------------------------------------------------- /packages/util/pipes/currency/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: currency 3 | subtitle: 货币管道 4 | type: Pipes 5 | module: import { CurrencyPipeModule } from '@delon/util/pipes/currency'; 6 | --- 7 | 8 | > 可以通过[全局配置](/docs/global-config)覆盖 `startingUnit`、`megaUnit`、`precision`、`ingoreZeroPrecision` 等参数。 9 | 10 | ## price 11 | 12 | 用逗号将数字格式化为千位分隔符。 13 | 14 | [comment]: 15 | 16 | ## mega 17 | 18 | 大数据格式化。 19 | 20 | [comment]: 21 | 22 | ## cny 23 | 24 | 转化成人民币表示法。 25 | 26 | [comment]: 27 | -------------------------------------------------------------------------------- /schematics/migration.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json", 3 | "schematics": { 4 | "migration-v15": { 5 | "version": "15", 6 | "description": "Updates NG-ALAIN to v15 [https://github.com/ng-alain/ng-alain/issues/2347]", 7 | "factory": "./ng-update/index#updateToV15" 8 | }, 9 | "ng-post-update": { 10 | "description": "Performs cleanup after ng-update.", 11 | "factory": "./ng-update/index#postUpdate", 12 | "private": true 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /scripts/site/converters/highlight.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | import { getCode } from '../utils/utils'; 3 | 4 | const JsonML = require('jsonml.js/lib/utils'); 5 | 6 | export function highlight(): any { 7 | return [ 8 | (node: any) => JsonML.isElement(node) && JsonML.getTagName(node) === 'pre', 9 | (node: any, index: number) => { 10 | const attr = JsonML.getAttributes(node); 11 | return `
${getCode(node)}
`; 12 | } 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/theme/system/widgets/_form.less: -------------------------------------------------------------------------------- 1 | .search__form-mixin(@enabled) when(@enabled = true) { 2 | /** 3 | * Search form, [Demo](https://ng-alain.surge.sh/#/pro/list/table-list) 4 | * 5 | * 搜索表单, [示例](https://ng-alain.gitee.io/#/pro/list/table-list) 6 | */ 7 | .search__form { 8 | .@{ant-prefix}-form-item { 9 | margin-right: 0; 10 | margin-bottom: @form-item-margin-bottom; 11 | } 12 | .@{ant-prefix}-form-item-control { 13 | flex: 1; 14 | } 15 | } 16 | } 17 | .search__form-mixin(@search__form-enabled); 18 | -------------------------------------------------------------------------------- /packages/util/pipes/currency/cny.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | import { CurrencyCNYOptions, CurrencyService } from '@delon/util/format'; 4 | 5 | @Pipe({ name: 'cny' }) 6 | export class CurrencyCNYPipe implements PipeTransform { 7 | constructor(private srv: CurrencyService) {} 8 | 9 | /** 10 | * Converted into RMB notation. 11 | * 12 | * 转化成人民币表示法 13 | */ 14 | transform(value: number | string, options?: CurrencyCNYOptions): string { 15 | return this.srv.cny(value, options); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/abc/down-file/style/index.less: -------------------------------------------------------------------------------- 1 | @import '../../../theme/theme-default.less'; 2 | @down-file-prefix: ~'.down-file'; 3 | 4 | @{down-file-prefix} { 5 | &__not-support { 6 | // @down-file-not-support-behavior 7 | .down-file-not-support-behavior-mixin(@value) when (@value = 'disabled') { 8 | pointer-events: none; 9 | } 10 | .down-file-not-support-behavior-mixin(@value) when (@value = 'hidden') { 11 | display: none; 12 | } 13 | .down-file-not-support-behavior-mixin(@down-file-not-support-behavior); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/abc/loading/loading.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 |
7 |
8 |
{{ options.text }}
9 | -------------------------------------------------------------------------------- /schematics/utils/ast.ts: -------------------------------------------------------------------------------- 1 | import { SchematicsException, Tree } from '@angular-devkit/schematics'; 2 | import * as ts from 'typescript'; 3 | 4 | /** Reads file given path and returns TypeScript source file. */ 5 | export function getSourceFile(tree: Tree, path: string): ts.SourceFile { 6 | const buffer = tree.read(path); 7 | if (!buffer) { 8 | throw new SchematicsException(`Could not find file for path: ${path}`); 9 | } 10 | const content = buffer.toString(); 11 | return ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true); 12 | } 13 | -------------------------------------------------------------------------------- /packages/abc/tag-select/tag-select.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { DelonLocaleModule } from '@delon/theme'; 5 | import { NzIconModule } from 'ng-zorro-antd/icon'; 6 | 7 | import { TagSelectComponent } from './tag-select.component'; 8 | 9 | const COMPONENTS = [TagSelectComponent]; 10 | 11 | @NgModule({ 12 | imports: [CommonModule, NzIconModule, DelonLocaleModule], 13 | declarations: COMPONENTS, 14 | exports: COMPONENTS 15 | }) 16 | export class TagSelectModule {} 17 | -------------------------------------------------------------------------------- /packages/auth/src/store/interface.ts: -------------------------------------------------------------------------------- 1 | import { InjectionToken } from '@angular/core'; 2 | 3 | import { ITokenModel } from '../token/interface'; 4 | import { DA_STORE_TOKEN_LOCAL_FACTORY } from './local-storage.service'; 5 | 6 | export const DA_STORE_TOKEN = new InjectionToken('AUTH_STORE_TOKEN', { 7 | providedIn: 'root', 8 | factory: DA_STORE_TOKEN_LOCAL_FACTORY 9 | }); 10 | 11 | export interface IStore { 12 | get(key: string): ITokenModel; 13 | 14 | set(key: string, value: ITokenModel): boolean; 15 | 16 | remove(key: string): void; 17 | } 18 | -------------------------------------------------------------------------------- /packages/chart/water-wave/water-wave.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 | {{ title }} 7 | 8 |

{{ percent }}%

9 |
10 | -------------------------------------------------------------------------------- /packages/theme/layout-blank/index.zh-CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: Theme 3 | order: 110 4 | title: 空白布局 5 | --- 6 | 7 | 用于无须任何顶部和侧边区域,一般用于高定制性页面,诸如大屏幕数据等。默认布局所有参数都以 `@alain-blank-` 开头。 8 | 9 | ## 使用方式 10 | 11 | 在 `src/styles.less` 引入: 12 | 13 | ```less 14 | @import '@delon/theme/layout-blank/style/index'; 15 | ``` 16 | 17 | ## 参数 18 | 19 | | 名称 | 默认值 | 功能 | 20 | | --- | --- | --- | 21 | | `@prefix` | `.alain-blank` | 布局样式前缀 | 22 | | `@bg` | `#f5f7fa` | 背景色 | 23 | | `@content-padding-vertical` | `0` | 垂直内边距 | 24 | | `@content-padding-horizontal` | `16px` | 水平内边距 | 25 | --------------------------------------------------------------------------------