ngx-axis-appforge 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/axis-components/date-picker/design/index.d.ts +5 -0
- package/axis-components/date-picker/index.d.ts +36 -0
- package/axis-components/design/index.d.ts +16 -18
- package/axis-components/single-selector/index.d.ts +2 -0
- package/axis-components-covers/date-picker.svg +28 -0
- package/core/index.d.ts +20 -6
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs +115 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs +104 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +48 -50
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs +10 -3
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +3 -2
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +20 -3
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +47 -14
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +103 -95
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit } from '@angular/core';
|
|
3
|
+
import { ValueAccessOptions, ValueAccess } from 'ngx-axis-appforge/core';
|
|
4
|
+
|
|
5
|
+
declare class DatePickerOptions extends ValueAccessOptions {
|
|
6
|
+
readonly mode: _angular_core.WritableSignal<"date" | "week" | "month" | "quarter" | "year">;
|
|
7
|
+
readonly range: _angular_core.WritableSignal<boolean>;
|
|
8
|
+
readonly allowClear: _angular_core.WritableSignal<boolean>;
|
|
9
|
+
readonly selectTime: _angular_core.WritableSignal<boolean>;
|
|
10
|
+
readonly defaultNow: _angular_core.WritableSignal<boolean>;
|
|
11
|
+
readonly showToday: _angular_core.WritableSignal<boolean>;
|
|
12
|
+
readonly showNow: _angular_core.WritableSignal<boolean>;
|
|
13
|
+
readonly showWeek: _angular_core.WritableSignal<boolean>;
|
|
14
|
+
readonly placeHolder: _angular_core.WritableSignal<string>;
|
|
15
|
+
readonly format: _angular_core.WritableSignal<string>;
|
|
16
|
+
readonly size: _angular_core.WritableSignal<"default" | "large" | "small">;
|
|
17
|
+
readonly variant: _angular_core.WritableSignal<"outlined" | "borderless" | "filled" | "underlined">;
|
|
18
|
+
readonly inline: _angular_core.WritableSignal<boolean>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class DatePickerSelector extends ValueAccess<DatePickerOptions> implements OnInit {
|
|
22
|
+
options: DatePickerOptions;
|
|
23
|
+
readonly dateValue: _angular_core.ModelSignal<Date | Date[] | undefined>;
|
|
24
|
+
readonly showTime: _angular_core.Signal<boolean>;
|
|
25
|
+
format: _angular_core.Signal<string>;
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
writeValue(value: any): void;
|
|
28
|
+
setInitValue(value: any): void;
|
|
29
|
+
dateChange(): void;
|
|
30
|
+
private valueToDateValue;
|
|
31
|
+
private dateValueToValue;
|
|
32
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatePickerSelector, never>;
|
|
33
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerSelector, "axis-date-picker", never, { "dateValue": { "alias": "dateValue"; "required": false; "isSignal": true; }; }, { "dateValue": "dateValueChange"; }, never, never, true, never>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { DatePickerSelector };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnDestroy, ChangeDetectorRef, ComponentRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { OnDestroy, ChangeDetectorRef, ComponentRef, ElementRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import * as ngx_axis_appforge_core from 'ngx-axis-appforge/core';
|
|
4
|
-
import { OptionsNode, FlatNode, FilteredTreeResult, Base, BaseOptions, ScopeDirective, DynamicDirective, ElementNode, ValueAccessOptions, ValueAccess, Example, FunFieldValueBase, ScopeInfo, EventHandlerDesc, NextInfo, DesignConfig } from 'ngx-axis-appforge/core';
|
|
4
|
+
import { OptionsNode, FlatNode, OptionsChangeEvent, FilteredTreeResult, Base, BaseOptions, ScopeDirective, DynamicDirective, ElementNode, ValueAccessOptions, ValueAccess, Example, FunFieldValueBase, ScopeInfo, EventHandlerDesc, NextInfo, DesignConfig } from 'ngx-axis-appforge/core';
|
|
5
5
|
import * as rxjs from 'rxjs';
|
|
6
6
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
7
7
|
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
@@ -14,7 +14,7 @@ declare class DragDrop {
|
|
|
14
14
|
private optionIdflatNodes;
|
|
15
15
|
private treeControl;
|
|
16
16
|
private onChange;
|
|
17
|
-
constructor(optionsNodes: Map<string, OptionsNode>, optionIdflatNodes: Map<string, FlatNode>, treeControl: FlatTreeControl<FlatNode, string>, onChange: () => void);
|
|
17
|
+
constructor(optionsNodes: Map<string, OptionsNode>, optionIdflatNodes: Map<string, FlatNode>, treeControl: FlatTreeControl<FlatNode, string>, onChange: (e: OptionsChangeEvent) => void);
|
|
18
18
|
dragNode?: OptionsNode;
|
|
19
19
|
dropNode?: OptionsNode;
|
|
20
20
|
targetIndex?: number | string;
|
|
@@ -33,10 +33,7 @@ declare class Tree implements OnDestroy {
|
|
|
33
33
|
private cdRef;
|
|
34
34
|
readonly node: _angular_core.InputSignal<OptionsNode | null | undefined>;
|
|
35
35
|
readonly optionsNodes: _angular_core.InputSignal<Map<string, OptionsNode>>;
|
|
36
|
-
onChange: _angular_core.OutputEmitterRef<
|
|
37
|
-
value?: any;
|
|
38
|
-
nextNodeId?: string;
|
|
39
|
-
}>;
|
|
36
|
+
onChange: _angular_core.OutputEmitterRef<OptionsChangeEvent>;
|
|
40
37
|
readonly onSelect: _angular_core.OutputEmitterRef<string[]>;
|
|
41
38
|
readonly onContextMenu: _angular_core.OutputEmitterRef<{
|
|
42
39
|
nodeId: string;
|
|
@@ -83,7 +80,7 @@ declare class Tree implements OnDestroy {
|
|
|
83
80
|
reset(): void;
|
|
84
81
|
contextMenu(e: MouseEvent, nodeId: string): void;
|
|
85
82
|
removeSelected(): void;
|
|
86
|
-
addNodeForSelected(nodes: OptionsNode[], deleteSuccess?: boolean): void;
|
|
83
|
+
addNodeForSelected(nodes: OptionsNode[], deleteSuccess?: boolean, historyDesc?: string): void;
|
|
87
84
|
private deleteNode;
|
|
88
85
|
addRootComponent(): void;
|
|
89
86
|
ngOnDestroy(): void;
|
|
@@ -97,7 +94,7 @@ declare class Preview implements OnDestroy {
|
|
|
97
94
|
readonly optionsNodes: _angular_core.InputSignal<Map<string, OptionsNode>>;
|
|
98
95
|
readonly injectData: _angular_core.InputSignal<Observable<any>>;
|
|
99
96
|
readonly loader: ngx_axis_appforge_core.ComponentsLoader;
|
|
100
|
-
readonly onChange: _angular_core.OutputEmitterRef<
|
|
97
|
+
readonly onChange: _angular_core.OutputEmitterRef<OptionsChangeEvent>;
|
|
101
98
|
readonly onSelect: _angular_core.OutputEmitterRef<string[]>;
|
|
102
99
|
readonly onContextMenu: _angular_core.OutputEmitterRef<{
|
|
103
100
|
nodeId: string;
|
|
@@ -116,7 +113,7 @@ declare class Preview implements OnDestroy {
|
|
|
116
113
|
getNodeByElement(element: HTMLElement): OptionsNode | undefined;
|
|
117
114
|
onSelectChange(elements: HTMLElement[]): void;
|
|
118
115
|
onDragStart(): void;
|
|
119
|
-
onDragEnd(
|
|
116
|
+
onDragEnd(e?: OptionsChangeEvent): void;
|
|
120
117
|
forceRender(): void;
|
|
121
118
|
refresh(): void;
|
|
122
119
|
private getParentComponentRef;
|
|
@@ -162,9 +159,10 @@ declare class Toolbar {
|
|
|
162
159
|
readonly history: {
|
|
163
160
|
options: any;
|
|
164
161
|
time: Date;
|
|
162
|
+
desc: string;
|
|
165
163
|
}[];
|
|
166
164
|
historyIndex: number;
|
|
167
|
-
putHistory(options: any): void;
|
|
165
|
+
putHistory(options: any, desc: string): void;
|
|
168
166
|
undo(): void;
|
|
169
167
|
redo(): void;
|
|
170
168
|
switchHistory(index: number): void;
|
|
@@ -175,11 +173,15 @@ declare class Toolbar {
|
|
|
175
173
|
declare class Design extends ValueAccess<DesignOptions> implements OnDestroy {
|
|
176
174
|
constructor();
|
|
177
175
|
protected options: DesignOptions;
|
|
176
|
+
element: ElementRef<any>;
|
|
178
177
|
clipboard: ClipboardService;
|
|
179
178
|
loader: ngx_axis_appforge_core.ComponentsLoader;
|
|
180
179
|
injectDataObs: Observable<any>;
|
|
181
180
|
funcs: {
|
|
182
|
-
[name: string]: Function
|
|
181
|
+
[name: string]: Function | {
|
|
182
|
+
func: Function;
|
|
183
|
+
type: string;
|
|
184
|
+
};
|
|
183
185
|
};
|
|
184
186
|
treeNode: _angular_core.WritableSignal<OptionsNode | null | undefined>;
|
|
185
187
|
loadAndOptions: _angular_core.WritableSignal<[Promise<any>, any] | undefined>;
|
|
@@ -210,11 +212,11 @@ declare class Design extends ValueAccess<DesignOptions> implements OnDestroy {
|
|
|
210
212
|
}>;
|
|
211
213
|
readonly componentsCounter: Map<string, number>;
|
|
212
214
|
readonly scopInfoSubjects: Map<string, BehaviorSubject<ScopeInfo[]>>;
|
|
213
|
-
readonly changeSubject: Subject<
|
|
215
|
+
readonly changeSubject: Subject<OptionsChangeEvent>;
|
|
214
216
|
setInitValue(value: any): void;
|
|
215
217
|
writeValue(value: any): void;
|
|
216
218
|
inspect(nextInfo: NextInfo): Promise<OptionsNode | undefined>;
|
|
217
|
-
onChangeOptionsConfig(
|
|
219
|
+
onChangeOptionsConfig(e: OptionsChangeEvent): void;
|
|
218
220
|
render(value: any): void;
|
|
219
221
|
onSettingChange(settingValue: any): void;
|
|
220
222
|
onTreeSelect(nodeIds: string[]): void;
|
|
@@ -225,10 +227,6 @@ declare class Design extends ValueAccess<DesignOptions> implements OnDestroy {
|
|
|
225
227
|
private buildScopeInfoSubject;
|
|
226
228
|
private buildComponentInfoForSetting;
|
|
227
229
|
onContextMenu(e: MouseEvent, nodeId: string): void;
|
|
228
|
-
onTreeChange(e: {
|
|
229
|
-
value?: any;
|
|
230
|
-
nextNodeId?: string;
|
|
231
|
-
} | void): Promise<void>;
|
|
232
230
|
chooseComponent(...tags: string[]): Observable<{
|
|
233
231
|
options?: any;
|
|
234
232
|
config?: DesignConfig;
|
|
@@ -27,6 +27,8 @@ declare class SingleSelector extends ValueAccess<SingleSelectorOptions> implemen
|
|
|
27
27
|
readonly selectorValue: _angular_core.ModelSignal<any>;
|
|
28
28
|
readonly searchText: _angular_core.WritableSignal<string>;
|
|
29
29
|
writeValue(value: any): void;
|
|
30
|
+
setInitValue(value: any): void;
|
|
31
|
+
private valueToSelectorValue;
|
|
30
32
|
ngOnInit(): void;
|
|
31
33
|
onSelectorChange(value: any): void;
|
|
32
34
|
searchChange(input: string): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="140px" height="68px" viewBox="0 -18 120 68" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>DatePicker</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="DatePicker" transform="translate(-239.000000, -25.000000)">
|
|
6
|
+
<g transform="translate(239.000000, 25.000000)">
|
|
7
|
+
<g id="3.DataEntry/DatePicker/Default">
|
|
8
|
+
<g id="3.DataEntry/Selecte/Default/Unselected">
|
|
9
|
+
<g id="3.DataEntry/Input/Default/Basic-#">
|
|
10
|
+
<g id="9.Box/1.Cards/4.Border" fill-rule="nonzero">
|
|
11
|
+
<g id="Z/Shape/RectangleRC/2px/RC-A">
|
|
12
|
+
<rect id="BG/fill" fill="#FFFFFF" x="1" y="1" width="118" height="30" rx="1"></rect>
|
|
13
|
+
<rect id="outline" stroke="#000000" stroke-width="1" opacity="0.15" x="0.5" y="0.5" width="119" height="31" rx="2"></rect>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
<text id="✏️Text" opacity="0.25" font-family="PingFangSC-Regular, PingFang SC" font-size="14" font-weight="normal" line-spacing="22" fill="#000000">
|
|
17
|
+
<tspan x="12" y="20">|||||||||||||||||||</tspan>
|
|
18
|
+
</text>
|
|
19
|
+
</g>
|
|
20
|
+
<g id="7.Icon/interface/3.calendar/outline" transform="translate(98.000000, 9.000000)" fill="#000000" fill-rule="nonzero" opacity="0.65">
|
|
21
|
+
<path d="M12.03125,2.515625 L9.734375,2.515625 L9.734375,1.640625 C9.734375,1.58046875 9.68515625,1.53125 9.625,1.53125 L8.859375,1.53125 C8.79921875,1.53125 8.75,1.58046875 8.75,1.640625 L8.75,2.515625 L5.25,2.515625 L5.25,1.640625 C5.25,1.58046875 5.20078125,1.53125 5.140625,1.53125 L4.375,1.53125 C4.31484375,1.53125 4.265625,1.58046875 4.265625,1.640625 L4.265625,2.515625 L1.96875,2.515625 C1.72675781,2.515625 1.53125,2.71113281 1.53125,2.953125 L1.53125,12.03125 C1.53125,12.2732422 1.72675781,12.46875 1.96875,12.46875 L12.03125,12.46875 C12.2732422,12.46875 12.46875,12.2732422 12.46875,12.03125 L12.46875,2.953125 C12.46875,2.71113281 12.2732422,2.515625 12.03125,2.515625 Z M11.484375,11.484375 L2.515625,11.484375 L2.515625,6.2890625 L11.484375,6.2890625 L11.484375,11.484375 Z M2.515625,5.359375 L2.515625,3.5 L4.265625,3.5 L4.265625,4.15625 C4.265625,4.21640625 4.31484375,4.265625 4.375,4.265625 L5.140625,4.265625 C5.20078125,4.265625 5.25,4.21640625 5.25,4.15625 L5.25,3.5 L8.75,3.5 L8.75,4.15625 C8.75,4.21640625 8.79921875,4.265625 8.859375,4.265625 L9.625,4.265625 C9.68515625,4.265625 9.734375,4.21640625 9.734375,4.15625 L9.734375,3.5 L11.484375,3.5 L11.484375,5.359375 L2.515625,5.359375 Z" id="fill"></path>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</svg>
|
package/core/index.d.ts
CHANGED
|
@@ -70,9 +70,10 @@ declare class ScopeDirective implements OnInit, OnDestroy {
|
|
|
70
70
|
[name: string]: string;
|
|
71
71
|
} | null;
|
|
72
72
|
readonly injectData: any;
|
|
73
|
-
readonly
|
|
73
|
+
private readonly funcs;
|
|
74
|
+
injectFuncs?: {
|
|
74
75
|
[name: string]: Function;
|
|
75
|
-
}
|
|
76
|
+
};
|
|
76
77
|
readonly dataSources: _angular_core.InputSignal<DataSourceOptions[] | undefined>;
|
|
77
78
|
private readonly designBuilder;
|
|
78
79
|
private readonly ds;
|
|
@@ -274,6 +275,13 @@ interface OptionsNodeConfig {
|
|
|
274
275
|
contextMenu?: Type<BaseMenu>;
|
|
275
276
|
}
|
|
276
277
|
|
|
278
|
+
interface OptionsChangeEvent {
|
|
279
|
+
value?: any;
|
|
280
|
+
putHistory?: boolean;
|
|
281
|
+
historyDesc?: string;
|
|
282
|
+
nextNodeId?: string;
|
|
283
|
+
}
|
|
284
|
+
|
|
277
285
|
declare abstract class BaseMenu {
|
|
278
286
|
private readonly contextMenuService;
|
|
279
287
|
readonly optionsNodes: {
|
|
@@ -281,7 +289,7 @@ declare abstract class BaseMenu {
|
|
|
281
289
|
parent?: OptionsNode;
|
|
282
290
|
};
|
|
283
291
|
menu: NzDropdownMenuComponent;
|
|
284
|
-
onChange:
|
|
292
|
+
onChange?: (e: OptionsChangeEvent) => void;
|
|
285
293
|
contextMenu(e: MouseEvent): void;
|
|
286
294
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseMenu, never>;
|
|
287
295
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseMenu, never, never, {}, {}, never, never, true, never>;
|
|
@@ -491,7 +499,10 @@ declare const AXIS_EVENT_HANDLERS_TOKEN: InjectionToken<EventsHandler[]>;
|
|
|
491
499
|
declare const AXIS_EVENT_HANDLER_DESCS_TOKEN: InjectionToken<EventHandlerDescGroup[]>;
|
|
492
500
|
declare const AXIS_INJECT_DATA_TOKEN: InjectionToken<any>;
|
|
493
501
|
declare const AXIS_INJECT_FUNC_TOKEN: InjectionToken<{
|
|
494
|
-
[name: string]: Function
|
|
502
|
+
[name: string]: Function | {
|
|
503
|
+
func: Function;
|
|
504
|
+
type: string;
|
|
505
|
+
};
|
|
495
506
|
}>;
|
|
496
507
|
declare const AXIS_CURRENT_USER_PERMISSIONS_TOKEN: InjectionToken<string[]>;
|
|
497
508
|
declare const AXIS_FORM_REGISTE_CONTROL_TOKEN: InjectionToken<(opt: RegisteFormControlOptions) => void>;
|
|
@@ -528,7 +539,10 @@ declare class FunField implements ControlValueAccessor, OnDestroy, AfterContentI
|
|
|
528
539
|
[name: string]: string;
|
|
529
540
|
} | null;
|
|
530
541
|
readonly funcs: {
|
|
531
|
-
[name: string]: Function
|
|
542
|
+
[name: string]: Function | {
|
|
543
|
+
func: Function;
|
|
544
|
+
type: string;
|
|
545
|
+
};
|
|
532
546
|
} | null;
|
|
533
547
|
readonly funcsNames: string[];
|
|
534
548
|
readonly scopeds: _angular_core.Signal<ScopeInfo[]>;
|
|
@@ -770,4 +784,4 @@ interface DynamicFnOptions {
|
|
|
770
784
|
declare function fn(fnBody: string, argsObj: any, ignoreUndefined?: boolean, printError?: boolean): any;
|
|
771
785
|
|
|
772
786
|
export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_SCRIPTS_TOKEN, Base, BaseDesignSetting, BaseMenu, BaseOptions, CommonMenu, ComponentsLoader, DataHandler, DataOptions, DesignBuilder, DynamicDirective, ElementNode, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
|
|
773
|
-
export type { Cmplib, DataSourceOptions, DesignBindElementsResult, DesignBuildResult, DesignConfig, DynamicFnOptions, EventDesc, EventHandlerDesc, EventHandlerDescGroup, EventHandlerOptions, EventsHandler, Example, ExampleBuilder, ExampleDesc, ExampleGroup, FlatNode, FunFieldOptions, FunFieldValue, MyErrorsOptions, MyValidationErrors, NextInfo, RegisteFormControlOptions, RegisteValueAccessOptions, ScopeInfo, TriggeEventsOptions };
|
|
787
|
+
export type { Cmplib, DataSourceOptions, DesignBindElementsResult, DesignBuildResult, DesignConfig, DynamicFnOptions, EventDesc, EventHandlerDesc, EventHandlerDescGroup, EventHandlerOptions, EventsHandler, Example, ExampleBuilder, ExampleDesc, ExampleGroup, FlatNode, FunFieldOptions, FunFieldValue, MyErrorsOptions, MyValidationErrors, NextInfo, OptionsChangeEvent, RegisteFormControlOptions, RegisteValueAccessOptions, ScopeInfo, TriggeEventsOptions };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { FunFieldValueBase, FormValidators, valueFbConfig, baseFbConfig, valueFunField, baseFunField, BaseDesignSetting, ValueDesignSetting, FunField, InputTrigger, OptionsNode, SimpleMenu } from 'ngx-axis-appforge/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import * as i2 from 'ng-zorro-antd/collapse';
|
|
7
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
8
|
+
import * as i4 from 'ng-zorro-antd/form';
|
|
9
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
10
|
+
import * as i6 from 'ng-zorro-antd/input';
|
|
11
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
12
|
+
import * as i7 from 'ng-zorro-antd/radio';
|
|
13
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
14
|
+
import * as i8 from 'ng-zorro-antd/select';
|
|
15
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
16
|
+
import * as i5 from 'ng-zorro-antd/switch';
|
|
17
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
18
|
+
import * as i3 from 'ng-zorro-antd/grid';
|
|
19
|
+
|
|
20
|
+
class Setting extends FunFieldValueBase {
|
|
21
|
+
fg = this.fb.group({
|
|
22
|
+
...baseFbConfig,
|
|
23
|
+
...valueFbConfig,
|
|
24
|
+
mode: [undefined, FormValidators.requiredFun],
|
|
25
|
+
range: [false, FormValidators.required],
|
|
26
|
+
allowClear: [undefined, FormValidators.requiredFun],
|
|
27
|
+
selectTime: [undefined, FormValidators.requiredFun],
|
|
28
|
+
defaultNow: [false, FormValidators.required],
|
|
29
|
+
showToday: [undefined, FormValidators.requiredFun],
|
|
30
|
+
showNow: [undefined, FormValidators.requiredFun],
|
|
31
|
+
showWeek: [undefined, FormValidators.requiredFun],
|
|
32
|
+
placeHolder: [],
|
|
33
|
+
format: [],
|
|
34
|
+
size: [undefined, FormValidators.requiredFun],
|
|
35
|
+
variant: [undefined, FormValidators.requiredFun],
|
|
36
|
+
inline: [undefined, FormValidators.requiredFun],
|
|
37
|
+
});
|
|
38
|
+
funFields = {
|
|
39
|
+
...baseFunField,
|
|
40
|
+
...valueFunField,
|
|
41
|
+
mode: {
|
|
42
|
+
defaultValue: "date"
|
|
43
|
+
},
|
|
44
|
+
allowClear: {
|
|
45
|
+
defaultValue: true
|
|
46
|
+
},
|
|
47
|
+
selectTime: {
|
|
48
|
+
defaultValue: false
|
|
49
|
+
},
|
|
50
|
+
showToday: {
|
|
51
|
+
defaultValue: true
|
|
52
|
+
},
|
|
53
|
+
showNow: {
|
|
54
|
+
defaultValue: true
|
|
55
|
+
},
|
|
56
|
+
showWeek: {
|
|
57
|
+
defaultValue: true
|
|
58
|
+
},
|
|
59
|
+
placeHolder: {
|
|
60
|
+
defaultValue: ""
|
|
61
|
+
},
|
|
62
|
+
format: {
|
|
63
|
+
defaultValue: ""
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
defaultValue: "default"
|
|
67
|
+
},
|
|
68
|
+
variant: {
|
|
69
|
+
defaultValue: "outlined"
|
|
70
|
+
},
|
|
71
|
+
inline: {
|
|
72
|
+
defaultValue: false
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Setting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
76
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: Setting, isStandalone: true, selector: "axis-design-single-selector-setting", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9009\u62E9\u6A21\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"mode\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"date\" nzLabel=\"\u65E5\u671F\"></nz-option>\n <nz-option nzValue=\"week\" nzLabel=\"\u5468\"></nz-option>\n <nz-option nzValue=\"month\" nzLabel=\"\u6708\"></nz-option>\n <nz-option nzValue=\"quarter\" nzLabel=\"\u5B63\u5EA6\"></nz-option>\n <nz-option nzValue=\"year\" nzLabel=\"\u5E74\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u8303\u56F4\u9009\u62E9\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"range\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5141\u8BB8\u6E05\u7A7A\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"allowClear\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue()?.mode.funMode || formValue()?.mode.originValue === 'date') {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9009\u62E9\u65F6\u95F4\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"selectTime\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9ED8\u8BA4\u73B0\u5728\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"defaultNow\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5916\u89C2\u8BBE\u7F6E\">\n @if (formValue()?.mode.funMode || formValue()?.mode.originValue ===\n 'date') {\n @if (formValue()?.selectTime.funMode ||\n formValue()?.selectTime.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u663E\u793A\u73B0\u5728\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showNow\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }@else {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u663E\u793A\u4ECA\u5929\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showToday\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u663E\u793A\u5468\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showWeek\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u5360\u4F4D\u7B26\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"placeHolder\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u683C\u5F0F\u5316\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"format\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" placeholder=\"\u81EA\u52A8\u683C\u5F0F\u5316\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5927\u5C0F\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"size\">\n <nz-radio-group ngModel [ngModelOptions]=\"{standalone:true}\">\n <label nz-radio-button nzValue=\"large\">\u5927</label>\n <label nz-radio-button nzValue=\"default\">\u4E2D</label>\n <label nz-radio-button nzValue=\"small\">\u5C0F</label>\n </nz-radio-group>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5F62\u6001\u53D8\u4F53\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"variant\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"outlined\" nzLabel=\"\u5916\u8FB9\u6846\"></nz-option>\n <nz-option nzValue=\"borderless\" nzLabel=\"\u65E0\u8FB9\u6846\"></nz-option>\n <nz-option nzValue=\"filled\" nzLabel=\"\u586B\u5145\"></nz-option>\n <nz-option nzValue=\"underlined\" nzLabel=\"\u4E0B\u8FB9\u7EBF\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5185\u8054\u663E\u793A\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"inline\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i2.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i2.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition"], exportAs: ["nzCollapse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i3.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i4.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i4.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "component", type: BaseDesignSetting, selector: "axis-base-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "component", type: ValueDesignSetting, selector: "axis-value-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i5.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: InputTrigger, selector: "axis-input-trigger", inputs: ["internalTriggers", "value", "eventDesc", "isVisibleHandlerModal", "editEventHandler"], outputs: ["valueChange", "isVisibleHandlerModalChange", "editEventHandlerChange"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i7.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i7.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i8.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i8.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
77
|
+
}
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Setting, decorators: [{
|
|
79
|
+
type: Component,
|
|
80
|
+
args: [{ selector: 'axis-design-single-selector-setting', imports: [FormsModule, NzCollapseModule, ReactiveFormsModule, NzFormModule, BaseDesignSetting, ValueDesignSetting, FunField, NzSwitchModule, InputTrigger, NzInputModule, NzRadioModule, NzSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9009\u62E9\u6A21\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"mode\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"date\" nzLabel=\"\u65E5\u671F\"></nz-option>\n <nz-option nzValue=\"week\" nzLabel=\"\u5468\"></nz-option>\n <nz-option nzValue=\"month\" nzLabel=\"\u6708\"></nz-option>\n <nz-option nzValue=\"quarter\" nzLabel=\"\u5B63\u5EA6\"></nz-option>\n <nz-option nzValue=\"year\" nzLabel=\"\u5E74\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u8303\u56F4\u9009\u62E9\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"range\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5141\u8BB8\u6E05\u7A7A\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"allowClear\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue()?.mode.funMode || formValue()?.mode.originValue === 'date') {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9009\u62E9\u65F6\u95F4\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"selectTime\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9ED8\u8BA4\u73B0\u5728\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"defaultNow\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5916\u89C2\u8BBE\u7F6E\">\n @if (formValue()?.mode.funMode || formValue()?.mode.originValue ===\n 'date') {\n @if (formValue()?.selectTime.funMode ||\n formValue()?.selectTime.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u663E\u793A\u73B0\u5728\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showNow\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }@else {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u663E\u793A\u4ECA\u5929\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showToday\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u663E\u793A\u5468\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showWeek\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u5360\u4F4D\u7B26\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"placeHolder\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u683C\u5F0F\u5316\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"format\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" placeholder=\"\u81EA\u52A8\u683C\u5F0F\u5316\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5927\u5C0F\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"size\">\n <nz-radio-group ngModel [ngModelOptions]=\"{standalone:true}\">\n <label nz-radio-button nzValue=\"large\">\u5927</label>\n <label nz-radio-button nzValue=\"default\">\u4E2D</label>\n <label nz-radio-button nzValue=\"small\">\u5C0F</label>\n </nz-radio-group>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5F62\u6001\u53D8\u4F53\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"variant\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"outlined\" nzLabel=\"\u5916\u8FB9\u6846\"></nz-option>\n <nz-option nzValue=\"borderless\" nzLabel=\"\u65E0\u8FB9\u6846\"></nz-option>\n <nz-option nzValue=\"filled\" nzLabel=\"\u586B\u5145\"></nz-option>\n <nz-option nzValue=\"underlined\" nzLabel=\"\u4E0B\u8FB9\u7EBF\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5185\u8054\u663E\u793A\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"inline\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>" }]
|
|
81
|
+
}] });
|
|
82
|
+
|
|
83
|
+
const Config = {
|
|
84
|
+
componentName: "日期选择器",
|
|
85
|
+
buildOptionsNodes(nextInfo) {
|
|
86
|
+
return {
|
|
87
|
+
treeNode: new OptionsNode({
|
|
88
|
+
parentId: nextInfo.parentId,
|
|
89
|
+
scopeId: nextInfo.scopeId,
|
|
90
|
+
name: "日期选择器",
|
|
91
|
+
canSetting: true,
|
|
92
|
+
canDrag: true,
|
|
93
|
+
dragType: "component",
|
|
94
|
+
parentObj: nextInfo.parentObject,
|
|
95
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
96
|
+
rootOptions: nextInfo.currentObject,
|
|
97
|
+
settingType: Setting,
|
|
98
|
+
contextMenu: SimpleMenu,
|
|
99
|
+
icon: "calendar",
|
|
100
|
+
}),
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
bindElementsOptionsNode(element, options) {
|
|
104
|
+
return {
|
|
105
|
+
[options.id]: { element },
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Generated bundle index. Do not edit.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
export { Config };
|
|
115
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-date-picker-design.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-date-picker-design.mjs","sources":["../../../axis-components/date-picker/design/setting/setting.ts","../../../axis-components/date-picker/design/setting/setting.html","../../../axis-components/date-picker/design/config.ts","../../../axis-components/date-picker/design/ngx-axis-appforge-axis-components-date-picker-design.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { NzCollapseModule } from 'ng-zorro-antd/collapse';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\nimport { NzSelectModule } from 'ng-zorro-antd/select';\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\nimport { BaseDesignSetting, baseFbConfig, baseFunField, FormValidators, FunField, FunFieldOptions, FunFieldValueBase, InputTrigger, ValueDesignSetting, valueFbConfig, valueFunField } from 'ngx-axis-appforge/core';\n\n@Component({\n selector: 'axis-design-single-selector-setting',\n imports: [FormsModule, NzCollapseModule, ReactiveFormsModule, NzFormModule, BaseDesignSetting, ValueDesignSetting, FunField, NzSwitchModule, InputTrigger, NzInputModule, NzRadioModule, NzSelectModule],\n templateUrl: './setting.html',\n styleUrl: './setting.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Setting extends FunFieldValueBase {\n\n override fg: UntypedFormGroup = this.fb.group({\n ...baseFbConfig,\n ...valueFbConfig,\n mode: [undefined, FormValidators.requiredFun],\n range: [false, FormValidators.required],\n allowClear: [undefined, FormValidators.requiredFun],\n selectTime: [undefined, FormValidators.requiredFun],\n defaultNow: [false, FormValidators.required],\n showToday: [undefined, FormValidators.requiredFun],\n showNow: [undefined, FormValidators.requiredFun],\n showWeek: [undefined, FormValidators.requiredFun],\n placeHolder: [],\n format: [],\n size: [undefined, FormValidators.requiredFun],\n variant: [undefined, FormValidators.requiredFun],\n inline: [undefined, FormValidators.requiredFun],\n });\n\n protected override funFields: FunFieldOptions = {\n ...baseFunField,\n ...valueFunField,\n mode: {\n defaultValue: \"date\"\n },\n allowClear: {\n defaultValue: true\n },\n selectTime: {\n defaultValue: false\n },\n showToday: {\n defaultValue: true\n },\n showNow: {\n defaultValue: true\n },\n showWeek: {\n defaultValue: true\n },\n placeHolder: {\n defaultValue: \"\"\n },\n format: {\n defaultValue: \"\"\n },\n size: {\n defaultValue: \"default\"\n },\n variant: {\n defaultValue: \"outlined\"\n },\n inline: {\n defaultValue: false\n },\n };\n}\n","<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"基本设置\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 选择模式\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"mode\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"date\" nzLabel=\"日期\"></nz-option>\n <nz-option nzValue=\"week\" nzLabel=\"周\"></nz-option>\n <nz-option nzValue=\"month\" nzLabel=\"月\"></nz-option>\n <nz-option nzValue=\"quarter\" nzLabel=\"季度\"></nz-option>\n <nz-option nzValue=\"year\" nzLabel=\"年\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 范围选择\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"range\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 允许清空\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"allowClear\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue()?.mode.funMode || formValue()?.mode.originValue === 'date') {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 选择时间\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"selectTime\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 默认现在\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"defaultNow\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"外观设置\">\n @if (formValue()?.mode.funMode || formValue()?.mode.originValue ===\n 'date') {\n @if (formValue()?.selectTime.funMode ||\n formValue()?.selectTime.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 显示现在\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showNow\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }@else {\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 显示今天\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showToday\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 显示周数\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"showWeek\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 占位符\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"placeHolder\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 格式化\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"format\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" placeholder=\"自动格式化\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 大小\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"size\">\n <nz-radio-group ngModel [ngModelOptions]=\"{standalone:true}\">\n <label nz-radio-button nzValue=\"large\">大</label>\n <label nz-radio-button nzValue=\"default\">中</label>\n <label nz-radio-button nzValue=\"small\">小</label>\n </nz-radio-group>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 形态变体\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"variant\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"outlined\" nzLabel=\"外边框\"></nz-option>\n <nz-option nzValue=\"borderless\" nzLabel=\"无边框\"></nz-option>\n <nz-option nzValue=\"filled\" nzLabel=\"填充\"></nz-option>\n <nz-option nzValue=\"underlined\" nzLabel=\"下边线\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 内联显示\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"inline\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>","import { NextInfo, DesignBuildResult, DesignBindElementsResult, DesignConfig, OptionsNode, SimpleMenu } from \"ngx-axis-appforge/core\";\nimport { Setting } from \"./setting/setting\";\n\nexport const Config: DesignConfig = {\n\n componentName: \"日期选择器\",\n buildOptionsNodes(nextInfo: NextInfo): DesignBuildResult {\n return {\n treeNode: new OptionsNode({\n parentId: nextInfo.parentId,\n scopeId: nextInfo.scopeId,\n name: \"日期选择器\",\n canSetting: true,\n canDrag: true,\n dragType: \"component\",\n parentObj: nextInfo.parentObject,\n indexOfParentObj: nextInfo.indexOfParent,\n rootOptions: nextInfo.currentObject,\n settingType: Setting,\n contextMenu: SimpleMenu,\n icon: \"calendar\",\n }),\n };\n },\n bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {\n return {\n [options.id]: { element },\n }\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './config';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAiBM,MAAO,OAAQ,SAAQ,iBAAiB,CAAA;AAEnC,IAAA,EAAE,GAAqB,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AAC5C,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,aAAa;AAChB,QAAA,IAAI,EAAE,CAAC,SAAS,EAAE,cAAc,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AAa;AACnC,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,WAAW,EAAE,UAAU;AACvB,gBAAA,IAAI,EAAE,UAAU;aACnB,CAAC;SACL;KACJ;IACD,uBAAuB,CAAC,OAAoB,EAAE,OAAY,EAAA;QACtD,OAAO;AACH,YAAA,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE;SAC5B;KACJ;;;AC5BL;;AAEG;;;;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, model, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { ValueAccessOptions, ValueAccess } from 'ngx-axis-appforge/core';
|
|
4
|
+
import * as i1 from 'ng-zorro-antd/date-picker';
|
|
5
|
+
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
6
|
+
import * as i3 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import * as i2 from '@angular/forms';
|
|
9
|
+
import { FormsModule } from '@angular/forms';
|
|
10
|
+
|
|
11
|
+
class DatePickerOptions extends ValueAccessOptions {
|
|
12
|
+
mode = signal("date", ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
13
|
+
range = signal(false, ...(ngDevMode ? [{ debugName: "range" }] : []));
|
|
14
|
+
allowClear = signal(true, ...(ngDevMode ? [{ debugName: "allowClear" }] : []));
|
|
15
|
+
selectTime = signal(false, ...(ngDevMode ? [{ debugName: "selectTime" }] : []));
|
|
16
|
+
defaultNow = signal(false, ...(ngDevMode ? [{ debugName: "defaultNow" }] : []));
|
|
17
|
+
showToday = signal(true, ...(ngDevMode ? [{ debugName: "showToday" }] : []));
|
|
18
|
+
showNow = signal(true, ...(ngDevMode ? [{ debugName: "showNow" }] : []));
|
|
19
|
+
showWeek = signal(true, ...(ngDevMode ? [{ debugName: "showWeek" }] : []));
|
|
20
|
+
placeHolder = signal("", ...(ngDevMode ? [{ debugName: "placeHolder" }] : []));
|
|
21
|
+
format = signal("", ...(ngDevMode ? [{ debugName: "format" }] : []));
|
|
22
|
+
size = signal("default", ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
23
|
+
variant = signal("outlined", ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
24
|
+
inline = signal(false, ...(ngDevMode ? [{ debugName: "inline" }] : []));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
class DatePickerSelector extends ValueAccess {
|
|
28
|
+
options = new DatePickerOptions();
|
|
29
|
+
dateValue = model(...(ngDevMode ? [undefined, { debugName: "dateValue" }] : []));
|
|
30
|
+
showTime = computed(() => this.options.selectTime() && this.options.mode() == "date", ...(ngDevMode ? [{ debugName: "showTime" }] : []));
|
|
31
|
+
format = computed(() => {
|
|
32
|
+
if (this.options.format()) {
|
|
33
|
+
return this.options.format();
|
|
34
|
+
}
|
|
35
|
+
switch (this.options.mode()) {
|
|
36
|
+
case "date":
|
|
37
|
+
return this.showTime() ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd";
|
|
38
|
+
case "week":
|
|
39
|
+
return "yyyy-ww";
|
|
40
|
+
case "month":
|
|
41
|
+
return "yyyy-MM";
|
|
42
|
+
case "quarter":
|
|
43
|
+
return "yyyy-qQ";
|
|
44
|
+
case "year":
|
|
45
|
+
return "yyyy";
|
|
46
|
+
}
|
|
47
|
+
}, ...(ngDevMode ? [{ debugName: "format" }] : []));
|
|
48
|
+
ngOnInit() {
|
|
49
|
+
if (this.options.defaultNow()) {
|
|
50
|
+
const now = new Date().toISOString();
|
|
51
|
+
if (!this.options.range()) {
|
|
52
|
+
this.setInitValue(now);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.setInitValue([now, now]);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
writeValue(value) {
|
|
60
|
+
super.writeValue(value);
|
|
61
|
+
this.valueToDateValue();
|
|
62
|
+
}
|
|
63
|
+
setInitValue(value) {
|
|
64
|
+
super.setInitValue(value);
|
|
65
|
+
this.valueToDateValue();
|
|
66
|
+
}
|
|
67
|
+
dateChange() {
|
|
68
|
+
this.dateValueToValue();
|
|
69
|
+
this.onChange?.(this.value());
|
|
70
|
+
}
|
|
71
|
+
valueToDateValue() {
|
|
72
|
+
if (this.value() != undefined) {
|
|
73
|
+
if (Array.isArray(this.value())) {
|
|
74
|
+
this.dateValue.set(this.value().map(v => new Date(v)));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.dateValue.set(new Date(this.value()));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
dateValueToValue() {
|
|
82
|
+
if (this.dateValue() != undefined) {
|
|
83
|
+
if (Array.isArray(this.dateValue())) {
|
|
84
|
+
this.value.set(this.dateValue().map(v => v.toISOString()));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this.value.set(this.dateValue().toISOString());
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DatePickerSelector, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
92
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: DatePickerSelector, isStandalone: true, selector: "axis-date-picker", inputs: { dateValue: { classPropertyName: "dateValue", publicName: "dateValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateValue: "dateValueChange" }, usesInheritance: true, ngImport: i0, template: "@if (options.readonly()) {\n{{value() | date:format()}}\n}@else {\n@if (options.range()) {\n<nz-range-picker style=\"width: 100%;\" [(ngModel)]=\"dateValue\" (ngModelChange)=\"dateChange()\"\n [nzAllowClear]=\"options.allowClear()\" [nzDisabled]=\"options.disabled()\" [nzFormat]=\"format()\"\n [nzMode]=\"options.mode()\" [nzPlaceHolder]=\"options.placeHolder()\" [nzSize]=\"options.size()\"\n [nzVariant]=\"options.variant()\" [nzInline]=\"options.inline()\" [nzShowTime]=\"showTime()\"\n [nzShowToday]=\"options.showToday()\" [nzShowNow]=\"options.showNow()\"\n [nzShowWeekNumber]=\"options.showWeek()\"></nz-range-picker>\n}@else {\n<nz-date-picker style=\"width: 100%;\" [(ngModel)]=\"dateValue\" (ngModelChange)=\"dateChange()\"\n [nzAllowClear]=\"options.allowClear()\" [nzDisabled]=\"options.disabled()\" [nzFormat]=\"format()\"\n [nzMode]=\"options.mode()\" [nzPlaceHolder]=\"options.placeHolder()\" [nzSize]=\"options.size()\"\n [nzVariant]=\"options.variant()\" [nzInline]=\"options.inline()\" [nzShowTime]=\"showTime()\"\n [nzShowToday]=\"options.showToday()\" [nzShowNow]=\"options.showNow()\"\n [nzShowWeekNumber]=\"options.showWeek()\"></nz-date-picker>\n}\n}", styles: [":host{display:block;width:100%}nz-select{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i1.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
93
|
+
}
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DatePickerSelector, decorators: [{
|
|
95
|
+
type: Component,
|
|
96
|
+
args: [{ selector: 'axis-date-picker', imports: [NzDatePickerModule, CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (options.readonly()) {\n{{value() | date:format()}}\n}@else {\n@if (options.range()) {\n<nz-range-picker style=\"width: 100%;\" [(ngModel)]=\"dateValue\" (ngModelChange)=\"dateChange()\"\n [nzAllowClear]=\"options.allowClear()\" [nzDisabled]=\"options.disabled()\" [nzFormat]=\"format()\"\n [nzMode]=\"options.mode()\" [nzPlaceHolder]=\"options.placeHolder()\" [nzSize]=\"options.size()\"\n [nzVariant]=\"options.variant()\" [nzInline]=\"options.inline()\" [nzShowTime]=\"showTime()\"\n [nzShowToday]=\"options.showToday()\" [nzShowNow]=\"options.showNow()\"\n [nzShowWeekNumber]=\"options.showWeek()\"></nz-range-picker>\n}@else {\n<nz-date-picker style=\"width: 100%;\" [(ngModel)]=\"dateValue\" (ngModelChange)=\"dateChange()\"\n [nzAllowClear]=\"options.allowClear()\" [nzDisabled]=\"options.disabled()\" [nzFormat]=\"format()\"\n [nzMode]=\"options.mode()\" [nzPlaceHolder]=\"options.placeHolder()\" [nzSize]=\"options.size()\"\n [nzVariant]=\"options.variant()\" [nzInline]=\"options.inline()\" [nzShowTime]=\"showTime()\"\n [nzShowToday]=\"options.showToday()\" [nzShowNow]=\"options.showNow()\"\n [nzShowWeekNumber]=\"options.showWeek()\"></nz-date-picker>\n}\n}", styles: [":host{display:block;width:100%}nz-select{width:100%}\n"] }]
|
|
97
|
+
}] });
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Generated bundle index. Do not edit.
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
export { DatePickerSelector };
|
|
104
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-date-picker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-date-picker.mjs","sources":["../../../axis-components/date-picker/date-picker.options.ts","../../../axis-components/date-picker/date-picker.ts","../../../axis-components/date-picker/date-picker.html","../../../axis-components/date-picker/ngx-axis-appforge-axis-components-date-picker.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class DatePickerOptions extends ValueAccessOptions {\n\n readonly mode = signal<'date' | 'week' | 'month' | 'quarter' | 'year'>(\"date\");\n readonly range = signal(false);\n readonly allowClear = signal(true);\n readonly selectTime = signal(false);\n readonly defaultNow = signal(false);\n\n readonly showToday = signal(true);\n readonly showNow = signal(true);\n readonly showWeek = signal(true);\n readonly placeHolder = signal(\"\");\n readonly format = signal(\"\");\n readonly size = signal<'default' | 'large' | 'small'>(\"default\");\n readonly variant = signal<'outlined' | 'borderless' | 'filled' | 'underlined'>(\"outlined\");\n readonly inline = signal(false);\n}","import { ChangeDetectionStrategy, Component, computed, model, OnInit } from '@angular/core';\nimport { ValueAccess } from 'ngx-axis-appforge/core';\nimport { DatePickerOptions } from './date-picker.options';\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'axis-date-picker',\n imports: [NzDatePickerModule, CommonModule, FormsModule],\n templateUrl: './date-picker.html',\n styleUrl: './date-picker.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DatePickerSelector extends ValueAccess<DatePickerOptions> implements OnInit {\n\n override options: DatePickerOptions = new DatePickerOptions();\n readonly dateValue = model<Date | Date[]>();\n readonly showTime = computed(() => this.options.selectTime() && this.options.mode() == \"date\");\n\n format = computed(() => {\n if (this.options.format()) {\n return this.options.format();\n }\n switch (this.options.mode()) {\n case \"date\":\n return this.showTime() ? \"yyyy-MM-dd HH:mm:ss\" : \"yyyy-MM-dd\";\n case \"week\":\n return \"yyyy-ww\";\n case \"month\":\n return \"yyyy-MM\";\n case \"quarter\":\n return \"yyyy-qQ\";\n case \"year\":\n return \"yyyy\";\n }\n });\n\n ngOnInit(): void {\n if (this.options.defaultNow()) {\n const now = new Date().toISOString();\n if (!this.options.range()) {\n this.setInitValue(now);\n } else {\n this.setInitValue([now, now]);\n }\n }\n }\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.valueToDateValue();\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.valueToDateValue();\n }\n\n dateChange() {\n this.dateValueToValue();\n this.onChange?.(this.value());\n }\n\n private valueToDateValue() {\n if (this.value() != undefined) {\n if (Array.isArray(this.value())) {\n this.dateValue.set((this.value() as any[]).map(v => new Date(v)));\n } else {\n this.dateValue.set(new Date(this.value()));\n }\n }\n }\n\n private dateValueToValue() {\n if (this.dateValue() != undefined) {\n if (Array.isArray(this.dateValue())) {\n this.value.set((this.dateValue() as any[]).map(v => v.toISOString()));\n } else {\n this.value.set((this.dateValue() as Date).toISOString());\n }\n }\n }\n\n}\n","@if (options.readonly()) {\n{{value() | date:format()}}\n}@else {\n@if (options.range()) {\n<nz-range-picker style=\"width: 100%;\" [(ngModel)]=\"dateValue\" (ngModelChange)=\"dateChange()\"\n [nzAllowClear]=\"options.allowClear()\" [nzDisabled]=\"options.disabled()\" [nzFormat]=\"format()\"\n [nzMode]=\"options.mode()\" [nzPlaceHolder]=\"options.placeHolder()\" [nzSize]=\"options.size()\"\n [nzVariant]=\"options.variant()\" [nzInline]=\"options.inline()\" [nzShowTime]=\"showTime()\"\n [nzShowToday]=\"options.showToday()\" [nzShowNow]=\"options.showNow()\"\n [nzShowWeekNumber]=\"options.showWeek()\"></nz-range-picker>\n}@else {\n<nz-date-picker style=\"width: 100%;\" [(ngModel)]=\"dateValue\" (ngModelChange)=\"dateChange()\"\n [nzAllowClear]=\"options.allowClear()\" [nzDisabled]=\"options.disabled()\" [nzFormat]=\"format()\"\n [nzMode]=\"options.mode()\" [nzPlaceHolder]=\"options.placeHolder()\" [nzSize]=\"options.size()\"\n [nzVariant]=\"options.variant()\" [nzInline]=\"options.inline()\" [nzShowTime]=\"showTime()\"\n [nzShowToday]=\"options.showToday()\" [nzShowNow]=\"options.showNow()\"\n [nzShowWeekNumber]=\"options.showWeek()\"></nz-date-picker>\n}\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './date-picker';\n"],"names":[],"mappings":";;;;;;;;;;AAGM,MAAO,iBAAkB,SAAQ,kBAAkB,CAAA;AAE5C,IAAA,IAAI,GAAG,MAAM,CAAiD,MAAM,gDAAC;AACrE,IAAA,KAAK,GAAG,MAAM,CAAC,KAAK,iDAAC;AACrB,IAAA,UAAU,GAAG,MAAM,CAAC,IAAI,sDAAC;AACzB,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC;AAC1B,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC;AAE1B,IAAA,SAAS,GAAG,MAAM,CAAC,IAAI,qDAAC;AACxB,IAAA,OAAO,GAAG,MAAM,CAAC,IAAI,mDAAC;AACtB,IAAA,QAAQ,GAAG,MAAM,CAAC,IAAI,oDAAC;AACvB,IAAA,WAAW,GAAG,MAAM,CAAC,EAAE,uDAAC;AACxB,IAAA,MAAM,GAAG,MAAM,CAAC,EAAE,kDAAC;AACnB,IAAA,IAAI,GAAG,MAAM,CAAgC,SAAS,gDAAC;AACvD,IAAA,OAAO,GAAG,MAAM,CAAsD,UAAU,mDAAC;AACjF,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,kDAAC;AAClC;;ACLK,MAAO,kBAAmB,SAA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