Skip to content

Commit a427a80

Browse files
authored
Merge pull request #160 from opentiny/fix-opentiny-ng-checkbox-stream-rendering
Fix opentiny ng checkbox stream rendering & TiDateRange placeholder description
2 parents b784560 + 97621a7 commit a427a80

4 files changed

Lines changed: 46 additions & 21 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"patchedDependencies": {
2626
"ai@6.0.116": "patches/ai@6.0.116.patch",
2727
"@ai-sdk/deepseek@1.0.7": "patches/@ai-sdk__deepseek@1.0.7.patch",
28-
"@ai-sdk/openai-compatible@1.0.7": "patches/@ai-sdk__openai-compatible@1.0.7.patch"
28+
"@ai-sdk/openai-compatible@1.0.7": "patches/@ai-sdk__openai-compatible@1.0.7.patch",
29+
"@opentiny/ng-checkbox": "patches/@opentiny__ng-checkbox.patch"
2930
}
3031
},
3132
"keywords": [],

packages/materials/angular-opentiny-ng/src/render-config/bundle.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4495,7 +4495,7 @@
44954495
"property": "placeholder",
44964496
"label": {
44974497
"text": {
4498-
"zh_CN": "占位文本"
4498+
"zh_CN": "占位文本, 数组类型,示例:`['开始日期占位文本', '结束日期占位文本']`"
44994499
}
45004500
},
45014501
"description": {
@@ -4506,7 +4506,7 @@
45064506
"disabled": false,
45074507
"cols": 12,
45084508
"labelPosition": "left",
4509-
"type": "string",
4509+
"type": "Array",
45104510
"widget": {
45114511
"component": "I18nConfigurator",
45124512
"props": {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/fesm2020/opentiny-ng-checkbox.mjs b/fesm2020/opentiny-ng-checkbox.mjs
2+
index 6b33941eea01dd43c553ea92ea8dcf179ebebc41..306a70a0f49bca6e723be8a1a79dfa5f03383dca 100644
3+
--- a/fesm2020/opentiny-ng-checkbox.mjs
4+
+++ b/fesm2020/opentiny-ng-checkbox.mjs
5+
@@ -734,14 +734,14 @@ class TiCheckboxGroupComponent extends TiFormComponent {
6+
}
7+
}
8+
TiCheckboxGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TiCheckboxGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9+
-TiCheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TiCheckboxGroupComponent, selector: "ti-checkbox-group", inputs: { items: "items", labelKey: "labelKey", valueKey: "valueKey", direction: "direction" }, host: { properties: { "class.ti-checkboxgroup-horizon": "direction === \"horizontal\"", "class.ti-checkboxgroup-vertical": "direction === \"vertical\"", "class.ti-checkboxgroup-defalut-item": "!itemTemplate" } }, providers: [TiFormComponent.getValueAccessor(TiCheckboxGroupComponent)], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span style=\"display: none\">\r\n <input\r\n type=\"checkbox\"\r\n tiCheckgroup\r\n [items]=\"items\"\r\n [(checkeds)]=\"checkeds\"\r\n [valueKey]=\"valueKey\"\r\n (checkedsChange)=\"onCheckedsChange($event)\"\r\n />\r\n</span>\r\n<ng-container *ngFor=\"let item of items;let i = index\">\r\n <ng-container *ngIf=\"itemTemplate else defaultTemplate;\">\r\n <!-- \u81EA\u5B9A\u4E49label -->\r\n <span class=\"checkbox-group-item\">\r\n <input type=\"checkbox\" [id]=\"item.id\" tiCheckitem [item]=\"item\" [disabled]=\"item.disabled\" />\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: {$implicit: item,index: i}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <!-- \u9ED8\u8BA4label -->\r\n <input type=\"checkbox\" [id]=\"appendId(item.id || i)\" tiCheckitem [item]=\"item\" [label]=\"item[labelKey]\" [disabled]=\"item.disabled\" />\r\n </ng-template>\r\n</ng-container>\r\n", styles: ["ti-checkbox-group{display:inline-flex;flex-wrap:wrap;line-height:1.5em;vertical-align:bottom}ti-checkbox-group .ti3-checkbox{display:inline-flex!important;align-items:flex-start!important;flex-shrink:0;line-height:1.5em!important}ti-checkbox-group.ti-checkboxgroup-vertical{flex-direction:column}ti-checkbox-group.ti-checkboxgroup-vertical input[type=checkbox][tiCheckbox]+.ti3-checkbox,ti-checkbox-group.ti-checkboxgroup-vertical .checkbox-group-item{line-height:28px!important;line-height:var(--ti-common-size-7x, 28px)!important;flex-shrink:0}.checkbox-group-item{display:inline-flex}ti-checkbox-group.ti-checkboxgroup-horizon.ti-checkboxgroup-defalut-item label.ti3-checkbox{margin-right:20px;margin-right:var(--ti-common-space-5x, 20px)}\n"], components: [{ type: TiCheckgroupComponent, selector: "[tiCheckgroup]", inputs: ["items", "checkeds"], outputs: ["checkedsChange"] }, { type: TiCheckitemComponent, selector: "[tiCheckitem]", inputs: ["item", "beCheckeds", "valueKey"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
10+
+TiCheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TiCheckboxGroupComponent, selector: "ti-checkbox-group", inputs: { items: "items", labelKey: "labelKey", valueKey: "valueKey", direction: "direction" }, host: { properties: { "class.ti-checkboxgroup-horizon": "direction === \"horizontal\"", "class.ti-checkboxgroup-vertical": "direction === \"vertical\"", "class.ti-checkboxgroup-defalut-item": "!itemTemplate" } }, providers: [TiFormComponent.getValueAccessor(TiCheckboxGroupComponent)], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span style=\"display: none\">\r\n <input\r\n type=\"checkbox\"\r\n tiCheckgroup\r\n [items]=\"items || []\"\r\n [(checkeds)]=\"checkeds\"\r\n [valueKey]=\"valueKey\"\r\n (checkedsChange)=\"onCheckedsChange($event)\"\r\n />\r\n</span>\r\n<ng-container *ngFor=\"let item of items;let i = index\">\r\n <ng-container *ngIf=\"itemTemplate else defaultTemplate;\">\r\n <!-- \u81EA\u5B9A\u4E49label -->\r\n <span class=\"checkbox-group-item\">\r\n <input type=\"checkbox\" [id]=\"item.id\" tiCheckitem [item]=\"item\" [disabled]=\"item.disabled\" />\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: {$implicit: item,index: i}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <!-- \u9ED8\u8BA4label -->\r\n <input type=\"checkbox\" [id]=\"appendId(item.id || i)\" tiCheckitem [item]=\"item\" [label]=\"item[labelKey]\" [disabled]=\"item.disabled\" />\r\n </ng-template>\r\n</ng-container>\r\n", styles: ["ti-checkbox-group{display:inline-flex;flex-wrap:wrap;line-height:1.5em;vertical-align:bottom}ti-checkbox-group .ti3-checkbox{display:inline-flex!important;align-items:flex-start!important;flex-shrink:0;line-height:1.5em!important}ti-checkbox-group.ti-checkboxgroup-vertical{flex-direction:column}ti-checkbox-group.ti-checkboxgroup-vertical input[type=checkbox][tiCheckbox]+.ti3-checkbox,ti-checkbox-group.ti-checkboxgroup-vertical .checkbox-group-item{line-height:28px!important;line-height:var(--ti-common-size-7x, 28px)!important;flex-shrink:0}.checkbox-group-item{display:inline-flex}ti-checkbox-group.ti-checkboxgroup-horizon.ti-checkboxgroup-defalut-item label.ti3-checkbox{margin-right:20px;margin-right:var(--ti-common-space-5x, 20px)}\n"], components: [{ type: TiCheckgroupComponent, selector: "[tiCheckgroup]", inputs: ["items", "checkeds"], outputs: ["checkedsChange"] }, { type: TiCheckitemComponent, selector: "[tiCheckitem]", inputs: ["item", "beCheckeds", "valueKey"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TiCheckboxGroupComponent, decorators: [{
12+
type: Component,
13+
args: [{ selector: 'ti-checkbox-group', encapsulation: ViewEncapsulation.None, host: {
14+
'[class.ti-checkboxgroup-horizon]': 'direction === "horizontal"',
15+
'[class.ti-checkboxgroup-vertical]': 'direction === "vertical"',
16+
'[class.ti-checkboxgroup-defalut-item]': '!itemTemplate'
17+
- }, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TiFormComponent.getValueAccessor(TiCheckboxGroupComponent)], template: "<span style=\"display: none\">\r\n <input\r\n type=\"checkbox\"\r\n tiCheckgroup\r\n [items]=\"items\"\r\n [(checkeds)]=\"checkeds\"\r\n [valueKey]=\"valueKey\"\r\n (checkedsChange)=\"onCheckedsChange($event)\"\r\n />\r\n</span>\r\n<ng-container *ngFor=\"let item of items;let i = index\">\r\n <ng-container *ngIf=\"itemTemplate else defaultTemplate;\">\r\n <!-- \u81EA\u5B9A\u4E49label -->\r\n <span class=\"checkbox-group-item\">\r\n <input type=\"checkbox\" [id]=\"item.id\" tiCheckitem [item]=\"item\" [disabled]=\"item.disabled\" />\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: {$implicit: item,index: i}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <!-- \u9ED8\u8BA4label -->\r\n <input type=\"checkbox\" [id]=\"appendId(item.id || i)\" tiCheckitem [item]=\"item\" [label]=\"item[labelKey]\" [disabled]=\"item.disabled\" />\r\n </ng-template>\r\n</ng-container>\r\n", styles: ["ti-checkbox-group{display:inline-flex;flex-wrap:wrap;line-height:1.5em;vertical-align:bottom}ti-checkbox-group .ti3-checkbox{display:inline-flex!important;align-items:flex-start!important;flex-shrink:0;line-height:1.5em!important}ti-checkbox-group.ti-checkboxgroup-vertical{flex-direction:column}ti-checkbox-group.ti-checkboxgroup-vertical input[type=checkbox][tiCheckbox]+.ti3-checkbox,ti-checkbox-group.ti-checkboxgroup-vertical .checkbox-group-item{line-height:28px!important;line-height:var(--ti-common-size-7x, 28px)!important;flex-shrink:0}.checkbox-group-item{display:inline-flex}ti-checkbox-group.ti-checkboxgroup-horizon.ti-checkboxgroup-defalut-item label.ti3-checkbox{margin-right:20px;margin-right:var(--ti-common-space-5x, 20px)}\n"] }]
18+
+ }, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TiFormComponent.getValueAccessor(TiCheckboxGroupComponent)], template: "<span style=\"display: none\">\r\n <input\r\n type=\"checkbox\"\r\n tiCheckgroup\r\n [items]=\"items || []\"\r\n [(checkeds)]=\"checkeds\"\r\n [valueKey]=\"valueKey\"\r\n (checkedsChange)=\"onCheckedsChange($event)\"\r\n />\r\n</span>\r\n<ng-container *ngFor=\"let item of items;let i = index\">\r\n <ng-container *ngIf=\"itemTemplate else defaultTemplate;\">\r\n <!-- \u81EA\u5B9A\u4E49label -->\r\n <span class=\"checkbox-group-item\">\r\n <input type=\"checkbox\" [id]=\"item.id\" tiCheckitem [item]=\"item\" [disabled]=\"item.disabled\" />\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: {$implicit: item,index: i}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <!-- \u9ED8\u8BA4label -->\r\n <input type=\"checkbox\" [id]=\"appendId(item.id || i)\" tiCheckitem [item]=\"item\" [label]=\"item[labelKey]\" [disabled]=\"item.disabled\" />\r\n </ng-template>\r\n</ng-container>\r\n", styles: ["ti-checkbox-group{display:inline-flex;flex-wrap:wrap;line-height:1.5em;vertical-align:bottom}ti-checkbox-group .ti3-checkbox{display:inline-flex!important;align-items:flex-start!important;flex-shrink:0;line-height:1.5em!important}ti-checkbox-group.ti-checkboxgroup-vertical{flex-direction:column}ti-checkbox-group.ti-checkboxgroup-vertical input[type=checkbox][tiCheckbox]+.ti3-checkbox,ti-checkbox-group.ti-checkboxgroup-vertical .checkbox-group-item{line-height:28px!important;line-height:var(--ti-common-size-7x, 28px)!important;flex-shrink:0}.checkbox-group-item{display:inline-flex}ti-checkbox-group.ti-checkboxgroup-horizon.ti-checkboxgroup-defalut-item label.ti3-checkbox{margin-right:20px;margin-right:var(--ti-common-space-5x, 20px)}\n"] }]
19+
}], propDecorators: { items: [{
20+
type: Input
21+
}], labelKey: [{

0 commit comments

Comments
 (0)