@piying-lib/angular-core 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { computed, viewChild, input, inject, TemplateRef, forwardRef
|
|
2
|
+
import { computed, Component, viewChild, input, inject, TemplateRef, forwardRef } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { MatIcon } from '@angular/material/icon';
|
|
5
5
|
import { SelectorlessOutlet } from '@cyia/ngx-common/directive';
|
|
6
6
|
import { PurePipe } from '@cyia/ngx-common/pipe';
|
|
7
|
-
import { BaseControl, PiyingView, PI_INPUT_OPTIONS_TOKEN } from '@piying/view-angular';
|
|
7
|
+
import { BaseControl, PiyingView, PI_INPUT_OPTIONS_TOKEN, AttributesDirective, InsertFieldDirective, EventsDirective } from '@piying/view-angular';
|
|
8
8
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
9
|
|
|
10
10
|
const DefaultOptionConvert = {
|
|
@@ -64,6 +64,18 @@ function isSchema(input) {
|
|
|
64
64
|
return (input && typeof input === 'object' && '~run' in input && 'kind' in input && 'type' in input);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
class DivNFCC {
|
|
68
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DivNFCC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: DivNFCC, isStandalone: true, selector: "div", ngImport: i0, template: ``, isInline: true });
|
|
70
|
+
}
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DivNFCC, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{
|
|
74
|
+
selector: 'div',
|
|
75
|
+
template: ``,
|
|
76
|
+
}]
|
|
77
|
+
}] });
|
|
78
|
+
|
|
67
79
|
class StrOrTemplateComponent extends BaseControl {
|
|
68
80
|
static __version = 2;
|
|
69
81
|
PiyingView = PiyingView;
|
|
@@ -117,9 +129,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
117
129
|
], template: "<ng-template #templateRef>\n @let data = $any(content$$());\n @if (isString | pure: data) {\n {{ data }}\n } @else if (isTemplateRef | pure: data) {\n <ng-container *ngTemplateOutlet=\"$any(data)\"></ng-container>\n } @else if (isSchema | pure: data) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"piyingInput | pure: content$$ : schemaOptions$$\"\n ></ng-container>\n } @else if (isObject | pure: data) {\n @if (data['image']; as image) {\n <img [src]=\"image.src\" [alt]=\"image.alt\" />\n }\n @if (data['icon']; as icon) {\n <mat-icon\n [inline]=\"icon.inline\"\n [fontIcon]=\"icon.fontIcon\"\n [fontSet]=\"icon.fontSet\"\n [svgIcon]=\"icon.svgIcon\"\n ></mat-icon>\n }\n @if (data['title']) {\n <span>\n {{ data['title'] }}\n </span>\n }\n }\n</ng-template>\n" }]
|
|
118
130
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }] } });
|
|
119
131
|
|
|
132
|
+
class DivWC {
|
|
133
|
+
static __version = 2;
|
|
134
|
+
templateRef = viewChild.required('templateRef');
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DivWC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.14", type: DivWC, isStandalone: true, selector: "app-div-wrapper", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: `<ng-template #templateRef let-attr="attributes" let-events="events">
|
|
137
|
+
<div [attributes]="attr()" [events]="events()"><ng-container insertField></ng-container></div>
|
|
138
|
+
</ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: InsertFieldDirective, selector: "[insertField]", exportAs: ["insertField"] }, { kind: "directive", type: EventsDirective, selector: "[events]", inputs: ["events"] }] });
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DivWC, decorators: [{
|
|
141
|
+
type: Component,
|
|
142
|
+
args: [{
|
|
143
|
+
selector: 'app-div-wrapper',
|
|
144
|
+
template: `<ng-template #templateRef let-attr="attributes" let-events="events">
|
|
145
|
+
<div [attributes]="attr()" [events]="events()"><ng-container insertField></ng-container></div>
|
|
146
|
+
</ng-template>`,
|
|
147
|
+
imports: [AttributesDirective, InsertFieldDirective, EventsDirective],
|
|
148
|
+
}]
|
|
149
|
+
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
|
|
150
|
+
|
|
120
151
|
/**
|
|
121
152
|
* Generated bundle index. Do not edit.
|
|
122
153
|
*/
|
|
123
154
|
|
|
124
|
-
export { DefaultOptionConvert, StrOrTemplateComponent, computedWithPrev, isSchema, transformOption, transformOptions };
|
|
155
|
+
export { DefaultOptionConvert, DivNFCC, DivWC, StrOrTemplateComponent, computedWithPrev, isSchema, transformOption, transformOptions };
|
|
125
156
|
//# sourceMappingURL=piying-lib-angular-core.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"piying-lib-angular-core.mjs","sources":["../../../projects/core/util/options.ts","../../../projects/core/util/computed-with-prev.ts","../../../projects/core/util/is.ts","../../../projects/core/str-template/component.ts","../../../projects/core/str-template/component.html","../../../projects/core/piying-lib-angular-core.ts"],"sourcesContent":["export interface Option1 {\n label: string;\n value: any;\n disabled?: boolean;\n type?: 'option';\n description?: string;\n}\nexport interface OptionGroup {\n disabled?: boolean;\n label: string;\n children: Option1[];\n type: 'group';\n description?: string;\n}\nexport interface ResolvedOption {\n label: string;\n value: any;\n disabled?: boolean;\n type: 'option' | 'group' | (string & {});\n children?: ResolvedOption[];\n description?: string;\n origin: any;\n}\nexport interface OptionConvert {\n label: (input: any) => string;\n description: (input: any) => string;\n value: (input: any) => any;\n isGroup: (input: any) => boolean;\n children: (input: any) => any[];\n disabled?: (input: any) => boolean;\n type?: (input: any) => string;\n}\nexport type Option2 = string;\n\nexport const DefaultOptionConvert: OptionConvert = {\n label: (item) => (typeof item !== 'object' ? item : item.label),\n description: (item) => item.description,\n value: (item) => (typeof item !== 'object' ? item : item.value),\n disabled: (item) => typeof item === 'object' && item.disabled,\n isGroup: (item) => typeof item === 'object' && item.type === 'group',\n type: (item) => (typeof item === 'object' ? item.type : 'option'),\n children: (item) => item.children,\n};\n\nexport function transformOptions(options: any[], optionConvert: OptionConvert): ResolvedOption[] {\n return options.map((option) => {\n const resolvedItem: ResolvedOption = {\n ...option,\n label: optionConvert.label(option),\n value: optionConvert.value(option),\n disabled: optionConvert.disabled?.(option) ?? false,\n type: 'option',\n description: optionConvert.description(option),\n };\n if (optionConvert.isGroup(option)) {\n resolvedItem.type = 'group';\n resolvedItem.children = transformOptions(optionConvert.children(option), optionConvert);\n return resolvedItem;\n }\n return resolvedItem;\n });\n}\nexport function transformOption(option: any, optionConvert: OptionConvert): ResolvedOption {\n const resolvedItem: ResolvedOption = {\n label: optionConvert.label(option),\n value: optionConvert.value(option),\n disabled: optionConvert.disabled?.(option) ?? false,\n type: optionConvert.type?.(option) ?? 'option',\n description: optionConvert.description(option),\n origin: option,\n };\n if (optionConvert.isGroup(option)) {\n resolvedItem.type = 'group';\n resolvedItem.children = transformOptions(optionConvert.children(option), optionConvert);\n return resolvedItem;\n }\n return resolvedItem;\n}\n\nexport interface SelectOption {\n readonly label?: string;\n readonly value: any;\n readonly description?: string;\n readonly disabled?: boolean;\n /** 样式代替label */\n readonly style?: any;\n}\n","import { computed, CreateComputedOptions, Signal } from '@angular/core';\n\nexport function computedWithPrev<T>(\n computation: (prev: T | undefined) => T,\n options?: CreateComputedOptions<T>,\n): Signal<T> {\n let previous: T | undefined;\n return computed(() => {\n const newValue = computation(previous);\n previous = newValue;\n return newValue;\n }, options);\n}\n","export function isSchema(input: any) {\n return (\n input && typeof input === 'object' && '~run' in input && 'kind' in input && 'type' in input\n );\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n forwardRef,\n inject,\n input,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { SelectorlessOutlet } from '@cyia/ngx-common/directive';\nimport { PurePipe } from '@cyia/ngx-common/pipe';\nimport { isSchema } from '../util';\nimport { BaseControl, PI_INPUT_OPTIONS_TOKEN, PiyingView } from '@piying/view-angular';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'app-str-or-template',\n templateUrl: './component.html',\n imports: [PurePipe, NgTemplateOutlet, MatIcon, SelectorlessOutlet],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => StrOrTemplateComponent),\n multi: true,\n },\n ],\n})\nexport class StrOrTemplateComponent extends BaseControl {\n static __version = 2;\n readonly PiyingView = PiyingView;\n templateRef = viewChild.required('templateRef');\n content = input();\n context = input();\n content$$ = computed(() => {\n return this.content() ?? this.value$();\n });\n parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });\n schemaOptions$$ = computed(() => {\n return {\n ...this.parentPyOptions!(),\n context: { ...this.parentPyOptions!().context, ...(this.context() as any) },\n };\n });\n\n isString(input: any) {\n return typeof input === 'string' || typeof input === 'number' || typeof input === 'boolean';\n }\n isTemplateRef(input: any) {\n return input instanceof TemplateRef;\n }\n isObject(input: any) {\n return typeof input === 'object';\n }\n isSchema = isSchema;\n piyingInput = (schema: any, options: any) => {\n return {\n schema,\n options,\n selectorless: true,\n };\n };\n}\n","<ng-template #templateRef>\n @let data = $any(content$$());\n @if (isString | pure: data) {\n {{ data }}\n } @else if (isTemplateRef | pure: data) {\n <ng-container *ngTemplateOutlet=\"$any(data)\"></ng-container>\n } @else if (isSchema | pure: data) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"piyingInput | pure: content$$ : schemaOptions$$\"\n ></ng-container>\n } @else if (isObject | pure: data) {\n @if (data['image']; as image) {\n <img [src]=\"image.src\" [alt]=\"image.alt\" />\n }\n @if (data['icon']; as icon) {\n <mat-icon\n [inline]=\"icon.inline\"\n [fontIcon]=\"icon.fontIcon\"\n [fontSet]=\"icon.fontSet\"\n [svgIcon]=\"icon.svgIcon\"\n ></mat-icon>\n }\n @if (data['title']) {\n <span>\n {{ data['title'] }}\n </span>\n }\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAkCO,MAAM,oBAAoB,GAAkB;IACjD,KAAK,EAAE,CAAC,IAAI,MAAM,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/D,WAAW,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW;IACvC,KAAK,EAAE,CAAC,IAAI,MAAM,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;AAC/D,IAAA,QAAQ,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ;AAC7D,IAAA,OAAO,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,IAAI,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AAA,OAAA,EAEtB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAA,SAAA,EACvD;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,4BAA4B,CAAC;AACrD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,24BAAA,EAAA;yEAKgC,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhChD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"piying-lib-angular-core.mjs","sources":["../../../projects/core/util/options.ts","../../../projects/core/util/computed-with-prev.ts","../../../projects/core/util/is.ts","../../../projects/core/component/div/component.ts","../../../projects/core/component/str-template/component.ts","../../../projects/core/component/str-template/component.html","../../../projects/core/wrapper/div/component.ts","../../../projects/core/piying-lib-angular-core.ts"],"sourcesContent":["export interface Option1 {\n label: string;\n value: any;\n disabled?: boolean;\n type?: 'option';\n description?: string;\n}\nexport interface OptionGroup {\n disabled?: boolean;\n label: string;\n children: Option1[];\n type: 'group';\n description?: string;\n}\nexport interface ResolvedOption {\n label: string;\n value: any;\n disabled?: boolean;\n type: 'option' | 'group' | (string & {});\n children?: ResolvedOption[];\n description?: string;\n origin: any;\n}\nexport interface OptionConvert {\n label: (input: any) => string;\n description: (input: any) => string;\n value: (input: any) => any;\n isGroup: (input: any) => boolean;\n children: (input: any) => any[];\n disabled?: (input: any) => boolean;\n type?: (input: any) => string;\n}\nexport type Option2 = string;\n\nexport const DefaultOptionConvert: OptionConvert = {\n label: (item) => (typeof item !== 'object' ? item : item.label),\n description: (item) => item.description,\n value: (item) => (typeof item !== 'object' ? item : item.value),\n disabled: (item) => typeof item === 'object' && item.disabled,\n isGroup: (item) => typeof item === 'object' && item.type === 'group',\n type: (item) => (typeof item === 'object' ? item.type : 'option'),\n children: (item) => item.children,\n};\n\nexport function transformOptions(options: any[], optionConvert: OptionConvert): ResolvedOption[] {\n return options.map((option) => {\n const resolvedItem: ResolvedOption = {\n ...option,\n label: optionConvert.label(option),\n value: optionConvert.value(option),\n disabled: optionConvert.disabled?.(option) ?? false,\n type: 'option',\n description: optionConvert.description(option),\n };\n if (optionConvert.isGroup(option)) {\n resolvedItem.type = 'group';\n resolvedItem.children = transformOptions(optionConvert.children(option), optionConvert);\n return resolvedItem;\n }\n return resolvedItem;\n });\n}\nexport function transformOption(option: any, optionConvert: OptionConvert): ResolvedOption {\n const resolvedItem: ResolvedOption = {\n label: optionConvert.label(option),\n value: optionConvert.value(option),\n disabled: optionConvert.disabled?.(option) ?? false,\n type: optionConvert.type?.(option) ?? 'option',\n description: optionConvert.description(option),\n origin: option,\n };\n if (optionConvert.isGroup(option)) {\n resolvedItem.type = 'group';\n resolvedItem.children = transformOptions(optionConvert.children(option), optionConvert);\n return resolvedItem;\n }\n return resolvedItem;\n}\n\nexport interface SelectOption {\n readonly label?: string;\n readonly value: any;\n readonly description?: string;\n readonly disabled?: boolean;\n /** 样式代替label */\n readonly style?: any;\n}\n","import { computed, CreateComputedOptions, Signal } from '@angular/core';\n\nexport function computedWithPrev<T>(\n computation: (prev: T | undefined) => T,\n options?: CreateComputedOptions<T>,\n): Signal<T> {\n let previous: T | undefined;\n return computed(() => {\n const newValue = computation(previous);\n previous = newValue;\n return newValue;\n }, options);\n}\n","export function isSchema(input: any) {\n return (\n input && typeof input === 'object' && '~run' in input && 'kind' in input && 'type' in input\n );\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'div',\n template: ``,\n})\nexport class DivNFCC {}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n forwardRef,\n inject,\n input,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { SelectorlessOutlet } from '@cyia/ngx-common/directive';\nimport { PurePipe } from '@cyia/ngx-common/pipe';\nimport { BaseControl, PI_INPUT_OPTIONS_TOKEN, PiyingView } from '@piying/view-angular';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { isSchema } from '../../util';\n\n@Component({\n selector: 'app-str-or-template',\n templateUrl: './component.html',\n imports: [PurePipe, NgTemplateOutlet, MatIcon, SelectorlessOutlet],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => StrOrTemplateComponent),\n multi: true,\n },\n ],\n})\nexport class StrOrTemplateComponent extends BaseControl {\n static __version = 2;\n readonly PiyingView = PiyingView;\n templateRef = viewChild.required('templateRef');\n content = input();\n context = input();\n content$$ = computed(() => {\n return this.content() ?? this.value$();\n });\n parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });\n schemaOptions$$ = computed(() => {\n return {\n ...this.parentPyOptions!(),\n context: { ...this.parentPyOptions!().context, ...(this.context() as any) },\n };\n });\n\n isString(input: any) {\n return typeof input === 'string' || typeof input === 'number' || typeof input === 'boolean';\n }\n isTemplateRef(input: any) {\n return input instanceof TemplateRef;\n }\n isObject(input: any) {\n return typeof input === 'object';\n }\n isSchema = isSchema;\n piyingInput = (schema: any, options: any) => {\n return {\n schema,\n options,\n selectorless: true,\n };\n };\n}\n","<ng-template #templateRef>\n @let data = $any(content$$());\n @if (isString | pure: data) {\n {{ data }}\n } @else if (isTemplateRef | pure: data) {\n <ng-container *ngTemplateOutlet=\"$any(data)\"></ng-container>\n } @else if (isSchema | pure: data) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"piyingInput | pure: content$$ : schemaOptions$$\"\n ></ng-container>\n } @else if (isObject | pure: data) {\n @if (data['image']; as image) {\n <img [src]=\"image.src\" [alt]=\"image.alt\" />\n }\n @if (data['icon']; as icon) {\n <mat-icon\n [inline]=\"icon.inline\"\n [fontIcon]=\"icon.fontIcon\"\n [fontSet]=\"icon.fontSet\"\n [svgIcon]=\"icon.svgIcon\"\n ></mat-icon>\n }\n @if (data['title']) {\n <span>\n {{ data['title'] }}\n </span>\n }\n }\n</ng-template>\n","import { Component, viewChild } from '@angular/core';\nimport { AttributesDirective, EventsDirective, InsertFieldDirective } from '@piying/view-angular';\n\n@Component({\n selector: 'app-div-wrapper',\n template: `<ng-template #templateRef let-attr=\"attributes\" let-events=\"events\">\n <div [attributes]=\"attr()\" [events]=\"events()\"><ng-container insertField></ng-container></div>\n </ng-template>`,\n imports: [AttributesDirective, InsertFieldDirective, EventsDirective],\n})\nexport class DivWC {\n static __version = 2;\n templateRef = viewChild.required('templateRef');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAkCO,MAAM,oBAAoB,GAAkB;IACjD,KAAK,EAAE,CAAC,IAAI,MAAM,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/D,WAAW,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW;IACvC,KAAK,EAAE,CAAC,IAAI,MAAM,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;AAC/D,IAAA,QAAQ,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ;AAC7D,IAAA,OAAO,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,Q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AE,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,CAAC;AACtE,iBAAA;yEAGkC,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACZhD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { CreateComputedOptions, Signal, TemplateRef } from '@angular/core';
|
|
1
3
|
import * as valibot from 'valibot';
|
|
2
4
|
import * as _piying_view_angular from '@piying/view-angular';
|
|
3
5
|
import { BaseControl, PiyingView } from '@piying/view-angular';
|
|
4
6
|
import * as _piying_valibot_visit from '@piying/valibot-visit';
|
|
5
7
|
import * as _piying_view_angular_core from '@piying/view-angular-core';
|
|
6
|
-
import * as _angular_core from '@angular/core';
|
|
7
|
-
import { CreateComputedOptions, Signal, TemplateRef } from '@angular/core';
|
|
8
8
|
|
|
9
9
|
interface Option1 {
|
|
10
10
|
label: string;
|
|
@@ -65,6 +65,11 @@ declare function computedWithPrev<T>(computation: (prev: T | undefined) => T, op
|
|
|
65
65
|
|
|
66
66
|
declare function isSchema(input: any): any;
|
|
67
67
|
|
|
68
|
+
declare class DivNFCC {
|
|
69
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DivNFCC, never>;
|
|
70
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DivNFCC, "div", never, {}, {}, never, never, true, never>;
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
declare class StrOrTemplateComponent extends BaseControl {
|
|
69
74
|
static __version: number;
|
|
70
75
|
readonly PiyingView: typeof PiyingView;
|
|
@@ -100,5 +105,12 @@ declare class StrOrTemplateComponent extends BaseControl {
|
|
|
100
105
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrOrTemplateComponent, "app-str-or-template", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
101
106
|
}
|
|
102
107
|
|
|
103
|
-
|
|
108
|
+
declare class DivWC {
|
|
109
|
+
static __version: number;
|
|
110
|
+
templateRef: _angular_core.Signal<unknown>;
|
|
111
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DivWC, never>;
|
|
112
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DivWC, "app-div-wrapper", never, {}, {}, never, never, true, never>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { DefaultOptionConvert, DivNFCC, DivWC, StrOrTemplateComponent, computedWithPrev, isSchema, transformOption, transformOptions };
|
|
104
116
|
export type { AlertColor, Color, IconConfig, Option1, Option2, OptionConvert, OptionGroup, ResolvedOption, SelectOption, Size };
|