Skip to content

Commit

Permalink
Merge branch 'v18'
Browse files Browse the repository at this point in the history
  • Loading branch information
EnochGao committed Dec 19, 2024
2 parents 0043bae + 280776d commit 03219e2
Show file tree
Hide file tree
Showing 11 changed files with 3,866 additions and 8,944 deletions.
134 changes: 70 additions & 64 deletions .docgenirc.js
Original file line number Diff line number Diff line change
@@ -1,82 +1,88 @@
/**
* @type {import('@docgeni/core').DocgeniConfig}
* @type {import('@docgeni/core').DocgeniLibrary[]}
*/
module.exports = {
mode: "full",
theme: "angular",
title: "ng-zorro-antd-extension",
description: "ng zorro 拓展包",
siteProjectName: "docs-site",
logoUrl: "https://avatars.githubusercontent.com/u/41459067?v=4",
repoUrl: "https://github.com/EnochGao/ng-zorro-antd-extension",
footer:
"Open-source MIT Licensed | Copyright © 2022-present Powered by EnochGao",
navs: [
{
title: "组件",
path: "components",
lib: "ng-zorro-antd-extension",
locales: {
"en-us": {
title: "Components",
const docsLibs = [
{
name: 'ng-zorro-antd-extension',
abbrName: 'nzx',
rootDir: './components',
include: [],
exclude: '',
categories: [
{
id: 'component',
title: '组件',
locales: {
'en-us': {
title: 'Component',
},
},
},
},
],

libs: [
{
name: "ng-zorro-antd-extension",
abbrName: "nzx",
rootDir: "./components",
include: [],
exclude: "",
categories: [
{
id: "component",
title: "组件",
locales: {
"en-us": {
title: "Component",
},
{
id: 'directive',
title: '指令',
locales: {
'en-us': {
title: 'Directive',
},
},
{
id: "directive",
title: "指令",
locales: {
"en-us": {
title: "Directive",
},
},
{
id: 'pipe',
title: '管道',
locales: {
'en-us': {
title: 'Pipe',
},
},
{
id: "pipe",
title: "管道",
locales: {
"en-us": {
title: "Pipe",
},
},
{
id: 'util',
title: '工具函数',
locales: {
'en-us': {
title: 'Util',
},
},
{
id: "util",
title: "工具函数",
locales: {
"en-us": {
title: "Util",
},
},
},
],
},
];

/**
* @type {import('@docgeni/core').DocgeniConfig}
*/
module.exports = {
mode: 'full',
theme: 'angular',
switchTheme: true,
title: 'ng-zorro-antd-extension',
description: 'ng zorro 拓展包',
siteProjectName: 'docs-site',
logoUrl: 'https://avatars.githubusercontent.com/u/41459067?v=4',
repoUrl: 'https://github.com/EnochGao/ng-zorro-antd-extension',
footer:
'Open-source MIT Licensed | Copyright © 2022-present Powered by EnochGao',
navs: [
{
title: '组件',
path: 'components',
lib: 'ng-zorro-antd-extension',
locales: {
'en-us': {
title: 'Components',
},
],
},
},
],

libs: docsLibs,
locales: [
{
key: "zh-cn",
name: "中文",
key: 'zh-cn',
name: '中文',
},
{ key: "en-us", name: "English" },
{ key: 'en-us', name: 'English' },
],
defaultLocale: "zh-cn",
defaultLocale: 'zh-cn',
};
33 changes: 9 additions & 24 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@
"base": "dist/docs-site"
},
"index": "src/index.html",
"polyfills": [
"src/polyfills.ts"
],
"polyfills": ["src/polyfills.ts"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/",
"."
]
"includePaths": ["node_modules/", "."]
},
"assets": [
{
Expand All @@ -54,9 +49,7 @@
],
"styles": ["src/styles.scss"],
"scripts": [],
"allowedCommonJsDependencies": [
"docsearch.js"
],
"allowedCommonJsDependencies": ["docsearch.js"],
"browser": "src/main.ts"
},
"configurations": {
Expand Down Expand Up @@ -202,9 +195,7 @@
"outputPath": "dist/ui",
"index": "projects/ui/src/index.html",
"browser": "projects/ui/src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "projects/ui/tsconfig.app.json",
"inlineStyleLanguage": "less",
"assets": [
Expand All @@ -213,9 +204,7 @@
"input": "projects/ui/public"
}
],
"styles": [
"projects/ui/src/styles.less"
],
"styles": ["projects/ui/src/styles.less"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -260,10 +249,7 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "projects/ui/tsconfig.spec.json",
"inlineStyleLanguage": "less",
"assets": [
Expand All @@ -272,9 +258,7 @@
"input": "projects/ui/public"
}
],
"styles": [
"projects/ui/src/styles.less"
],
"styles": ["projects/ui/src/styles.less"],
"scripts": []
}
}
Expand All @@ -290,6 +274,7 @@
}
},
"cli": {
"analytics": false
"analytics": false,
"schematicCollections": ["angular-eslint"]
}
}
19 changes: 13 additions & 6 deletions components/configurable-query/configurable-query.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,15 @@ export class NzxConfigurableQueryComponent
): void {
const control = this.getControl(config.controlName);
if (!control) {
if (config && config['hasOwnProperty']('collapse')) {
const hasCollapseProperty = this.controls.some((i) =>
i['hasOwnProperty']('collapse')
);
if (hasCollapseProperty) {
config.collapse = this.controls.some((i) => i.collapse === true);
}
}

this.generateControl(config, defaultValueResettable);

if (position === void 0 || position === null) {
Expand Down Expand Up @@ -256,12 +265,10 @@ export class NzxConfigurableQueryComponent
toggleCollapse(): void {
for (let index = 0; index < this.controls.length; index++) {
const config = this.controls[index];
if (config.hasOwnProperty('collapse') && config.collapse === true) {
(config.collapse as boolean) = false;
} else if (
config.hasOwnProperty('collapse') &&
(config.collapse as boolean) === false
) {
const hasProperty = config.hasOwnProperty('collapse');
if (hasProperty && config.collapse) {
config.collapse = false;
} else if (hasProperty && !config.collapse) {
config.collapse = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export class NzxConfigurableQueryExampleComponent implements OnInit {
label: '职业等级',
controlType: 'Template',
templateRef: this.levelRef,
collapse: true,
},
1
);
Expand Down
2 changes: 1 addition & 1 deletion components/configurable-query/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export interface NzxQueryControlOptions {
/**
* 折叠
*/
collapse?: true;
collapse?: boolean;
/**
* 隐藏控件(主要用来携带查询参数但界面不可见)
*/
Expand Down
2 changes: 1 addition & 1 deletion components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-zorro-antd-extension",
"version": "18.1.1",
"version": "18.1.2",
"license": "MIT",
"description": "An extension based on ng-zorro-antd",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions docs/changelog/v16.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ title: v16/17/v18
order: 1
---

## 14.4.2、15.15.2、 16.4.2、17.4.2、18.1.2

### 修复

`nzx-configurable-query`

`addControl` 方法 `collapse`异常问题

## 14.4.1、15.15.1、 16.4.1、17.4.1、18.1.1

### 修复
Expand Down
8 changes: 8 additions & 0 deletions docs/en-us/changelog/v16.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ title: v16/17/v18
order: 1
---

## 14.4.2、15.15.2、 16.4.2、17.4.2、18.1.2

### fixed

`nzx-configurable-query`

`addControl` method `collapse` error

## 14.4.1、15.15.1、 16.4.1、17.4.1、18.1.1

### fixed
Expand Down
Loading

0 comments on commit 03219e2

Please sign in to comment.