ngx-axis-appforge 0.0.32 → 0.0.34
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/checkbox/design/index.d.ts +5 -0
- package/axis-components/checkbox/index.d.ts +29 -0
- package/axis-components/rate/design/index.d.ts +5 -0
- package/axis-components/rate/index.d.ts +16 -0
- package/axis-components/select/index.d.ts +1 -0
- package/axis-components/table/index.d.ts +1 -1
- package/axis-components/tree-selector/index.d.ts +1 -1
- package/axis-components-covers/checkbox.svg +24 -0
- package/axis-components-covers/rate.svg +31 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox-design.mjs +88 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs +107 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +7 -5
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-radio.mjs +12 -11
- package/fesm2022/ngx-axis-appforge-axis-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-rate-design.mjs +80 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rate-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rate.mjs +30 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rate.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs +3 -2
- package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs +43 -6
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs +9 -3
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +19 -17
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +44 -0
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +50 -5
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +105 -89
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ValueAccessOptions, ValueAccess } from 'ngx-axis-appforge/core';
|
|
3
|
+
import { NzCheckboxOption } from 'ng-zorro-antd/checkbox';
|
|
4
|
+
|
|
5
|
+
declare class CheckboxOptions extends ValueAccessOptions {
|
|
6
|
+
readonly labelField: _angular_core.WritableSignal<string>;
|
|
7
|
+
readonly valueField: _angular_core.WritableSignal<string>;
|
|
8
|
+
readonly disabledField: _angular_core.WritableSignal<string>;
|
|
9
|
+
readonly fullValue: _angular_core.WritableSignal<boolean>;
|
|
10
|
+
readonly data: _angular_core.WritableSignal<any>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class Checkbox extends ValueAccess<CheckboxOptions> {
|
|
14
|
+
constructor();
|
|
15
|
+
options: CheckboxOptions;
|
|
16
|
+
readonly checkboxData: _angular_core.Signal<NzCheckboxOption[]>;
|
|
17
|
+
readonly displayValue: _angular_core.Signal<string>;
|
|
18
|
+
readonly checkboxValue: _angular_core.ModelSignal<any[] | undefined>;
|
|
19
|
+
writeValue(value: any): void;
|
|
20
|
+
setInitValue(value: any): void;
|
|
21
|
+
private valueToSelectorValue;
|
|
22
|
+
onCheckboxChange(value: any): void;
|
|
23
|
+
private buildCheckboxData;
|
|
24
|
+
private buildDisplay;
|
|
25
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Checkbox, never>;
|
|
26
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Checkbox, "axis-checkbox", never, { "checkboxValue": { "alias": "checkboxValue"; "required": false; "isSignal": true; }; }, { "checkboxValue": "checkboxValueChange"; }, never, never, true, never>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { Checkbox };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ValueAccessOptions, ValueAccess } from 'ngx-axis-appforge/core';
|
|
3
|
+
|
|
4
|
+
declare class RateOptions extends ValueAccessOptions {
|
|
5
|
+
readonly allowClear: _angular_core.WritableSignal<boolean>;
|
|
6
|
+
readonly allowHalf: _angular_core.WritableSignal<boolean>;
|
|
7
|
+
readonly count: _angular_core.WritableSignal<number>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class Rate extends ValueAccess<RateOptions> {
|
|
11
|
+
options: RateOptions;
|
|
12
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Rate, never>;
|
|
13
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Rate, "axis-rate", never, {}, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Rate };
|
|
@@ -6,6 +6,7 @@ declare class SelectOptions extends ValueAccessOptions {
|
|
|
6
6
|
readonly valueField: _angular_core.WritableSignal<string>;
|
|
7
7
|
readonly disabledField: _angular_core.WritableSignal<string>;
|
|
8
8
|
readonly fullValue: _angular_core.WritableSignal<boolean>;
|
|
9
|
+
readonly allowInvalidValue: _angular_core.WritableSignal<boolean>;
|
|
9
10
|
readonly data: _angular_core.WritableSignal<any>;
|
|
10
11
|
readonly mode: _angular_core.WritableSignal<"multiple" | "tags" | "default">;
|
|
11
12
|
readonly allowClear: _angular_core.WritableSignal<boolean>;
|
|
@@ -19,7 +19,7 @@ declare class TableOptions extends DataOptions {
|
|
|
19
19
|
readonly showDataSize: _angular_core.WritableSignal<boolean>;
|
|
20
20
|
readonly bordered: _angular_core.WritableSignal<boolean>;
|
|
21
21
|
readonly outerBordered: _angular_core.WritableSignal<boolean>;
|
|
22
|
-
readonly width: _angular_core.WritableSignal<
|
|
22
|
+
readonly width: _angular_core.WritableSignal<number | undefined>;
|
|
23
23
|
readonly actionsFieldWidth: _angular_core.WritableSignal<number | null>;
|
|
24
24
|
readonly showCheckbox: _angular_core.WritableSignal<boolean>;
|
|
25
25
|
readonly singleCheck: _angular_core.WritableSignal<boolean>;
|
|
@@ -16,7 +16,7 @@ declare class TreeSelectorOptions extends ValueAccessOptions {
|
|
|
16
16
|
readonly nodeFn: _angular_core.WritableSignal<string | undefined>;
|
|
17
17
|
readonly selectAbleLevel: _angular_core.WritableSignal<string>;
|
|
18
18
|
readonly multiple: _angular_core.WritableSignal<boolean>;
|
|
19
|
-
readonly maxSelectCount: _angular_core.WritableSignal<number>;
|
|
19
|
+
readonly maxSelectCount: _angular_core.WritableSignal<number | null>;
|
|
20
20
|
readonly defaultFirst: _angular_core.WritableSignal<boolean>;
|
|
21
21
|
readonly allowClear: _angular_core.WritableSignal<boolean>;
|
|
22
22
|
readonly type: _angular_core.WritableSignal<"tree" | "input-tree" | "cascader">;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="104px" height="75px" viewBox="0 0 104 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>CheckBox</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="CheckBox" transform="translate(-23.000000, -25.000000)">
|
|
6
|
+
<g transform="translate(24.000000, 25.000000)">
|
|
7
|
+
<g id="3.DataEntry/Checkbox#">
|
|
8
|
+
<g id="Group">
|
|
9
|
+
<g id="7.Icon/control/checkbox/Checked-">
|
|
10
|
+
<g id="icon/z/checkboxChecked-Copy" fill="#1890FF" fill-rule="nonzero">
|
|
11
|
+
<rect id="box" x="0" y="0" width="14" height="14" rx="1"></rect>
|
|
12
|
+
</g>
|
|
13
|
+
<g id="check" transform="translate(2.625000, 2.625000)">
|
|
14
|
+
<rect id="Rectangle" fill="#000000" opacity="0" x="0" y="0" width="8.75" height="8.75"></rect>
|
|
15
|
+
<path d="M8.28125,1.23046875 L7.59863281,1.23046875 C7.50292969,1.23046875 7.41210938,1.27441406 7.35351563,1.34960938 L3.32714844,6.45019531 L1.39648438,4.00390625 C1.33691406,3.92871094 1.24707031,3.88476562 1.15136719,3.88476562 L0.46875,3.88476562 C0.403320313,3.88476562 0.3671875,3.95996094 0.407226563,4.01074219 L3.08203125,7.39941406 C3.20703125,7.55761719 3.44726563,7.55761719 3.57324219,7.39941406 L8.34277344,1.35546875 C8.3828125,1.30566406 8.34667969,1.23046875 8.28125,1.23046875 Z" id="Path" stroke="#FFFFFF" stroke-width="0.833333333" fill="#FFFFFF"></path>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
<rect id="矩形复制-55备份-4" fill="#EBEBEB" x="23" y="0" width="80" height="14"></rect>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</svg>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="158px" height="22px" viewBox="0 0 158 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Rate</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Ant-Design-组件缩略图" transform="translate(-1294.000000, -142.000000)">
|
|
6
|
+
<g id="Rate" transform="translate(1294.000000, 142.000000)">
|
|
7
|
+
<text id="Text" font-family="HelveticaNeue, Helvetica Neue" font-size="14" font-weight="normal" line-spacing="22" fill="#000000" fill-opacity="0.65">
|
|
8
|
+
<tspan x="138" y="13">3.5</tspan>
|
|
9
|
+
</text>
|
|
10
|
+
<g id="Rate/_Resource/Star+unselected" transform="translate(104.000000, 3.000000)" fill="#000000" fill-opacity="0.04">
|
|
11
|
+
<path d="M14.3886837,6.37641211 C14.1796604,6.17267922 14.0842913,5.87914938 14.1336555,5.59147323 L14.9174679,1.02224826 C14.9787809,0.660183861 14.9175685,0.400689958 14.6206793,0.184424923 C14.4526922,0.0623018619 14.2528417,3.20934945e-06 14.052971,3.20934945e-06 C13.8994673,3.20934945e-06 13.7454607,0.0366944403 13.6040264,0.111042461 L9.41261655,2.37000729 C9.15428936,2.5058091 8.84567266,2.5058091 8.58734547,2.37000729 L4.57188854,0.111022345 C4.24651537,-0.0603442099 3.85260765,-0.0313774487 3.55473279,0.184404807 C3.2578436,0.400669842 3.02069836,0.659680966 3.08299701,1.02222814 L4.0431848,5.68631926 C4.09252887,5.9739954 3.99715983,6.26752525 3.7881566,6.47125814 L0.292230604,9.22104865 C0.028170413,9.47738437 -0.0659715611,9.86117384 0.0469988078,10.2106659 C0.16091462,10.560178 0.462651716,10.8145826 0.826627118,10.8676883 L5.37386551,11.6657025 C5.66260779,11.7077043 5.91220472,11.8890282 6.04138843,12.1506342 L8.13488064,16.568528 C8.2970945,16.8982261 8.63260604,17.1067867 9.00044367,17.1067867 C9.36828131,17.1067867 9.70282729,16.8982462 9.86600671,16.568528 L11.8773862,12.1507348 C12.0065498,11.8890483 12.2561869,11.7076439 12.5449896,11.6656623 L17.1742602,10.8676883 C17.5372902,10.8150654 17.8399727,10.560178 17.9529431,10.2106659 C18.0663962,9.86117384 17.9708059,9.47740448 17.7082142,9.22106876 L14.3886837,6.37641211 Z" id="Shape-Copy-4" transform="translate(9.000000, 8.553393) scale(1, -1) translate(-9.000000, -8.553393) "></path>
|
|
12
|
+
</g>
|
|
13
|
+
<g id="Rate/_Resource/Star_half+selected" transform="translate(78.000000, 3.000000)">
|
|
14
|
+
<g id="Group">
|
|
15
|
+
<path d="M14.3886837,6.37641211 C14.1796604,6.17267922 14.0842913,5.87914938 14.1336555,5.59147323 L14.9174679,1.02224826 C14.9787809,0.660183861 14.9175685,0.400689958 14.6206793,0.184424923 C14.4526922,0.0623018619 14.2528417,3.20934945e-06 14.052971,3.20934945e-06 C13.8994673,3.20934945e-06 13.7454607,0.0366944403 13.6040264,0.111042461 L9.41261655,2.37000729 C9.15428936,2.5058091 8.84567266,2.5058091 8.58734547,2.37000729 L4.57188854,0.111022345 C4.24651537,-0.0603442099 3.85260765,-0.0313774487 3.55473279,0.184404807 C3.2578436,0.400669842 3.02069836,0.659680966 3.08299701,1.02222814 L4.0431848,5.68631926 C4.09252887,5.9739954 3.99715983,6.26752525 3.7881566,6.47125814 L0.292230604,9.22104865 C0.028170413,9.47738437 -0.0659715611,9.86117384 0.0469988078,10.2106659 C0.16091462,10.560178 0.462651716,10.8145826 0.826627118,10.8676883 L5.37386551,11.6657025 C5.66260779,11.7077043 5.91220472,11.8890282 6.04138843,12.1506342 L8.13488064,16.568528 C8.2970945,16.8982261 8.63260604,17.1067867 9.00044367,17.1067867 C9.36828131,17.1067867 9.70282729,16.8982462 9.86600671,16.568528 L11.8773862,12.1507348 C12.0065498,11.8890483 12.2561869,11.7076439 12.5449896,11.6656623 L17.1742602,10.8676883 C17.5372902,10.8150654 17.8399727,10.560178 17.9529431,10.2106659 C18.0663962,9.86117384 17.9708059,9.47740448 17.7082142,9.22106876 L14.3886837,6.37641211 Z" id="Shape-Copy-5" fill-opacity="0.04" fill="#000000" transform="translate(9.000000, 8.553393) scale(1, -1) translate(-9.000000, -8.553393) "></path>
|
|
16
|
+
<path d="M8.97816303,14.7671228 C8.97158084,13.3567769 8.96657991,11.4396632 8.98581094,9.54615385 C9.01773657,6.40271944 8.98581053,3.35968632 8.98581053,2.43208441 L4.51698142,0.109688997 C4.19551589,-0.0596194926 3.80633889,-0.0310006142 3.51204142,0.182190156 C3.21871779,0.395857907 2.9844206,0.651758379 3.04597106,1.00995147 L3.99462726,5.61802813 C4.04337873,5.90224936 3.94915504,6.192254 3.74266189,6.39354011 L0.288720995,9.11030639 C0.0278320941,9.36356359 -0.0651792609,9.74274386 0.0464343651,10.0880386 C0.158982079,10.4333532 0.457095396,10.6847024 0.816699554,10.7371704 L5.30932686,11.5256006 C5.59460143,11.567098 5.84120077,11.7462442 5.96883302,12.0047085 L8.03718296,16.3695445 C8.19744868,16.695283 8.62239052,16.8835594 8.98581053,16.8835594 C8.98927129,16.6430546 8.98324573,15.856175 8.97816303,14.7671228 Z" id="Shape-Copy-2" fill="#FADB14" transform="translate(4.500000, 8.441780) scale(1, -1) translate(-4.500000, -8.441780) "></path>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
<g id="Rate/_Resource/Star+selected" transform="translate(52.000000, 3.000000)" fill="#FADB14">
|
|
20
|
+
<path d="M14.3886837,6.37641211 C14.1796604,6.17267922 14.0842913,5.87914938 14.1336555,5.59147323 L14.9174679,1.02224826 C14.9787809,0.660183861 14.9175685,0.400689958 14.6206793,0.184424923 C14.4526922,0.0623018619 14.2528417,3.20934945e-06 14.052971,3.20934945e-06 C13.8994673,3.20934945e-06 13.7454607,0.0366944403 13.6040264,0.111042461 L9.41261655,2.37000729 C9.15428936,2.5058091 8.84567266,2.5058091 8.58734547,2.37000729 L4.57188854,0.111022345 C4.24651537,-0.0603442099 3.85260765,-0.0313774487 3.55473279,0.184404807 C3.2578436,0.400669842 3.02069836,0.659680966 3.08299701,1.02222814 L4.0431848,5.68631926 C4.09252887,5.9739954 3.99715983,6.26752525 3.7881566,6.47125814 L0.292230604,9.22104865 C0.028170413,9.47738437 -0.0659715611,9.86117384 0.0469988078,10.2106659 C0.16091462,10.560178 0.462651716,10.8145826 0.826627118,10.8676883 L5.37386551,11.6657025 C5.66260779,11.7077043 5.91220472,11.8890282 6.04138843,12.1506342 L8.13488064,16.568528 C8.2970945,16.8982261 8.63260604,17.1067867 9.00044367,17.1067867 C9.36828131,17.1067867 9.70282729,16.8982462 9.86600671,16.568528 L11.8773862,12.1507348 C12.0065498,11.8890483 12.2561869,11.7076439 12.5449896,11.6656623 L17.1742602,10.8676883 C17.5372902,10.8150654 17.8399727,10.560178 17.9529431,10.2106659 C18.0663962,9.86117384 17.9708059,9.47740448 17.7082142,9.22106876 L14.3886837,6.37641211 Z" id="Shape" transform="translate(9.000000, 8.553393) scale(1, -1) translate(-9.000000, -8.553393) "></path>
|
|
21
|
+
</g>
|
|
22
|
+
<g id="Rate/_Resource/Star+selected" transform="translate(26.000000, 3.000000)" fill="#FADB14">
|
|
23
|
+
<path d="M14.3886837,6.37641211 C14.1796604,6.17267922 14.0842913,5.87914938 14.1336555,5.59147323 L14.9174679,1.02224826 C14.9787809,0.660183861 14.9175685,0.400689958 14.6206793,0.184424923 C14.4526922,0.0623018619 14.2528417,3.20934945e-06 14.052971,3.20934945e-06 C13.8994673,3.20934945e-06 13.7454607,0.0366944403 13.6040264,0.111042461 L9.41261655,2.37000729 C9.15428936,2.5058091 8.84567266,2.5058091 8.58734547,2.37000729 L4.57188854,0.111022345 C4.24651537,-0.0603442099 3.85260765,-0.0313774487 3.55473279,0.184404807 C3.2578436,0.400669842 3.02069836,0.659680966 3.08299701,1.02222814 L4.0431848,5.68631926 C4.09252887,5.9739954 3.99715983,6.26752525 3.7881566,6.47125814 L0.292230604,9.22104865 C0.028170413,9.47738437 -0.0659715611,9.86117384 0.0469988078,10.2106659 C0.16091462,10.560178 0.462651716,10.8145826 0.826627118,10.8676883 L5.37386551,11.6657025 C5.66260779,11.7077043 5.91220472,11.8890282 6.04138843,12.1506342 L8.13488064,16.568528 C8.2970945,16.8982261 8.63260604,17.1067867 9.00044367,17.1067867 C9.36828131,17.1067867 9.70282729,16.8982462 9.86600671,16.568528 L11.8773862,12.1507348 C12.0065498,11.8890483 12.2561869,11.7076439 12.5449896,11.6656623 L17.1742602,10.8676883 C17.5372902,10.8150654 17.8399727,10.560178 17.9529431,10.2106659 C18.0663962,9.86117384 17.9708059,9.47740448 17.7082142,9.22106876 L14.3886837,6.37641211 Z" id="Shape" transform="translate(9.000000, 8.553393) scale(1, -1) translate(-9.000000, -8.553393) "></path>
|
|
24
|
+
</g>
|
|
25
|
+
<g id="Rate/_Resource/Star+selected" transform="translate(0.000000, 3.000000)" fill="#FADB14">
|
|
26
|
+
<path d="M14.3886837,6.37641211 C14.1796604,6.17267922 14.0842913,5.87914938 14.1336555,5.59147323 L14.9174679,1.02224826 C14.9787809,0.660183861 14.9175685,0.400689958 14.6206793,0.184424923 C14.4526922,0.0623018619 14.2528417,3.20934945e-06 14.052971,3.20934945e-06 C13.8994673,3.20934945e-06 13.7454607,0.0366944403 13.6040264,0.111042461 L9.41261655,2.37000729 C9.15428936,2.5058091 8.84567266,2.5058091 8.58734547,2.37000729 L4.57188854,0.111022345 C4.24651537,-0.0603442099 3.85260765,-0.0313774487 3.55473279,0.184404807 C3.2578436,0.400669842 3.02069836,0.659680966 3.08299701,1.02222814 L4.0431848,5.68631926 C4.09252887,5.9739954 3.99715983,6.26752525 3.7881566,6.47125814 L0.292230604,9.22104865 C0.028170413,9.47738437 -0.0659715611,9.86117384 0.0469988078,10.2106659 C0.16091462,10.560178 0.462651716,10.8145826 0.826627118,10.8676883 L5.37386551,11.6657025 C5.66260779,11.7077043 5.91220472,11.8890282 6.04138843,12.1506342 L8.13488064,16.568528 C8.2970945,16.8982261 8.63260604,17.1067867 9.00044367,17.1067867 C9.36828131,17.1067867 9.70282729,16.8982462 9.86600671,16.568528 L11.8773862,12.1507348 C12.0065498,11.8890483 12.2561869,11.7076439 12.5449896,11.6656623 L17.1742602,10.8676883 C17.5372902,10.8150654 17.8399727,10.560178 17.9529431,10.2106659 C18.0663962,9.86117384 17.9708059,9.47740448 17.7082142,9.22106876 L14.3886837,6.37641211 Z" id="Shape" transform="translate(9.000000, 8.553393) scale(1, -1) translate(-9.000000, -8.553393) "></path>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
</g>
|
|
31
|
+
</svg>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { FunFieldValueBase, FormValidators, valueFbConfig, baseFbConfig, valueFunField, baseFunField, BaseDesignSetting, ValueDesignSetting, FunField, DynamicDirective, InputTrigger, OptionsNode, SimpleMenu } from 'ngx-axis-appforge/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { computed, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import * as i5 from 'ng-zorro-antd/auto-complete';
|
|
7
|
+
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
|
|
8
|
+
import * as i2 from 'ng-zorro-antd/collapse';
|
|
9
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
10
|
+
import * as i4 from 'ng-zorro-antd/form';
|
|
11
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
12
|
+
import * as i6 from 'ng-zorro-antd/input';
|
|
13
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
14
|
+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
15
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
16
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
17
|
+
import * as i7 from 'ng-zorro-antd/switch';
|
|
18
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
19
|
+
import * as i3 from 'ng-zorro-antd/grid';
|
|
20
|
+
|
|
21
|
+
class Setting extends FunFieldValueBase {
|
|
22
|
+
fg = this.fb.group({
|
|
23
|
+
...baseFbConfig,
|
|
24
|
+
...valueFbConfig,
|
|
25
|
+
labelField: ["title", FormValidators.required],
|
|
26
|
+
valueField: ["key", FormValidators.required],
|
|
27
|
+
disabledField: ["disabled", FormValidators.required],
|
|
28
|
+
fullValue: [false, FormValidators.required],
|
|
29
|
+
data: [],
|
|
30
|
+
});
|
|
31
|
+
funFields = {
|
|
32
|
+
...baseFunField,
|
|
33
|
+
...valueFunField,
|
|
34
|
+
data: {
|
|
35
|
+
defaultValue: undefined
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
dataFunField;
|
|
39
|
+
fields = computed(() => {
|
|
40
|
+
if (this.dataFunField.computeResult()?.length) {
|
|
41
|
+
return Object.keys(this.dataFunField.computeResult()[0]);
|
|
42
|
+
}
|
|
43
|
+
return [];
|
|
44
|
+
}, ...(ngDevMode ? [{ debugName: "fields" }] : []));
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Setting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: Setting, isStandalone: true, selector: "axis-design-single-selector-setting", viewQueries: [{ propertyName: "dataFunField", first: true, predicate: ["data"], descendants: true, static: true }], 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 \u503C\u5B57\u6BB5\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <input nz-input formControlName=\"valueField\" [nzAutocomplete]=\"fieldAuto\" />\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u540D\u79F0\u5B57\u6BB5\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <input nz-input formControlName=\"labelField\" [nzAutocomplete]=\"fieldAuto\" />\n </nz-form-control>\n </nz-form-item>\n <nz-autocomplete #fieldAuto nzBackfill>\n @for (f of fields(); track f) {\n <nz-auto-option [nzLabel]=\"f\" [nzValue]=\"f\">\n {{f}}\n </nz-auto-option>\n }\n </nz-autocomplete>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5B8C\u6574\u5BF9\u8C61\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"fullValue\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9009\u9879\u6570\u636E\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field #data formControlName=\"data\">\n <ng-container [axisDynamic]=\"{component:'axis-components/input-json',inuse:true}\"\n [standalone]=\"true\" ngModel [ngModelOptions]=\"{standalone:true}\"></ng-container>\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: "ngmodule", type: NzAutocompleteModule }, { kind: "component", type: i5.NzAutocompleteComponent, selector: "nz-autocomplete", inputs: ["nzWidth", "nzOverlayClassName", "nzOverlayStyle", "nzDefaultActiveFirstOption", "nzBackfill", "compareWith", "nzDataSource"], outputs: ["selectionChange"], exportAs: ["nzAutocomplete"] }, { kind: "component", type: i5.NzAutocompleteOptionComponent, selector: "nz-auto-option", inputs: ["nzValue", "nzLabel", "nzDisabled"], outputs: ["selectionChange", "mouseEntered"], exportAs: ["nzAutoOption"] }, { kind: "directive", type: i5.NzAutocompleteTriggerDirective, selector: "input[nzAutocomplete], textarea[nzAutocomplete]", inputs: ["nzAutocomplete"], exportAs: ["nzAutocompleteTrigger"] }, { 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: NzSelectModule }, { 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: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i7.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: InputTrigger, selector: "axis-input-trigger", inputs: ["internalTriggers", "optionsNodeId", "value", "eventDesc", "isVisibleHandlerModal", "editEventHandler"], outputs: ["valueChange", "isVisibleHandlerModalChange", "editEventHandlerChange"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "ngmodule", type: NzRadioModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Setting, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'axis-design-single-selector-setting', imports: [FormsModule, NzCollapseModule, ReactiveFormsModule, NzFormModule, BaseDesignSetting, ValueDesignSetting, NzAutocompleteModule, NzInputModule, NzSelectModule, FunField, DynamicDirective, NzSwitchModule, InputTrigger, NzInputNumberModule, NzRadioModule], 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 \u503C\u5B57\u6BB5\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <input nz-input formControlName=\"valueField\" [nzAutocomplete]=\"fieldAuto\" />\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u540D\u79F0\u5B57\u6BB5\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <input nz-input formControlName=\"labelField\" [nzAutocomplete]=\"fieldAuto\" />\n </nz-form-control>\n </nz-form-item>\n <nz-autocomplete #fieldAuto nzBackfill>\n @for (f of fields(); track f) {\n <nz-auto-option [nzLabel]=\"f\" [nzValue]=\"f\">\n {{f}}\n </nz-auto-option>\n }\n </nz-autocomplete>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u5B8C\u6574\u5BF9\u8C61\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <nz-switch formControlName=\"fullValue\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u9009\u9879\u6570\u636E\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field #data formControlName=\"data\">\n <ng-container [axisDynamic]=\"{component:'axis-components/input-json',inuse:true}\"\n [standalone]=\"true\" ngModel [ngModelOptions]=\"{standalone:true}\"></ng-container>\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>" }]
|
|
51
|
+
}], propDecorators: { dataFunField: [{
|
|
52
|
+
type: ViewChild,
|
|
53
|
+
args: ["data", { static: true }]
|
|
54
|
+
}] } });
|
|
55
|
+
|
|
56
|
+
const Config = {
|
|
57
|
+
componentName: "多选框",
|
|
58
|
+
buildOptionsNodes(nextInfo) {
|
|
59
|
+
return {
|
|
60
|
+
treeNode: new OptionsNode({
|
|
61
|
+
parentId: nextInfo.parentId,
|
|
62
|
+
scopeId: nextInfo.scopeId,
|
|
63
|
+
name: "多选框",
|
|
64
|
+
canSetting: true,
|
|
65
|
+
canDrag: true,
|
|
66
|
+
dragType: "component",
|
|
67
|
+
parentObj: nextInfo.parentObject,
|
|
68
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
69
|
+
rootOptions: nextInfo.currentObject,
|
|
70
|
+
settingType: Setting,
|
|
71
|
+
contextMenu: SimpleMenu,
|
|
72
|
+
icon: "check-square",
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
bindElementsOptionsNode(element, options) {
|
|
77
|
+
return {
|
|
78
|
+
[options.id]: { element },
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Generated bundle index. Do not edit.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
export { Config };
|
|
88
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-checkbox-design.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-checkbox-design.mjs","sources":["../../../axis-components/checkbox/design/setting/setting.ts","../../../axis-components/checkbox/design/setting/setting.html","../../../axis-components/checkbox/design/config.ts","../../../axis-components/checkbox/design/ngx-axis-appforge-axis-components-checkbox-design.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, ViewChild } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';\nimport { NzCollapseModule } from 'ng-zorro-antd/collapse';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzInputNumberModule } from 'ng-zorro-antd/input-number';\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, DynamicDirective, 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, NzAutocompleteModule, NzInputModule, NzSelectModule, FunField, DynamicDirective, NzSwitchModule, InputTrigger, NzInputNumberModule, NzRadioModule],\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 labelField: [\"title\", FormValidators.required],\n valueField: [\"key\", FormValidators.required],\n disabledField: [\"disabled\", FormValidators.required],\n fullValue: [false, FormValidators.required],\n data: [],\n });\n\n protected override funFields: FunFieldOptions = {\n ...baseFunField,\n ...valueFunField,\n data: {\n defaultValue: undefined\n },\n };\n\n @ViewChild(\"data\", { static: true })\n dataFunField!: FunField;\n\n fields = computed(() => {\n if (this.dataFunField.computeResult()?.length) {\n return Object.keys(this.dataFunField.computeResult()[0]);\n }\n return [];\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 <input nz-input formControlName=\"valueField\" [nzAutocomplete]=\"fieldAuto\" />\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 <input nz-input formControlName=\"labelField\" [nzAutocomplete]=\"fieldAuto\" />\n </nz-form-control>\n </nz-form-item>\n <nz-autocomplete #fieldAuto nzBackfill>\n @for (f of fields(); track f) {\n <nz-auto-option [nzLabel]=\"f\" [nzValue]=\"f\">\n {{f}}\n </nz-auto-option>\n }\n </nz-autocomplete>\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=\"fullValue\"></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 #data formControlName=\"data\">\n <ng-container [axisDynamic]=\"{component:'axis-components/input-json',inuse:true}\"\n [standalone]=\"true\" ngModel [ngModelOptions]=\"{standalone:true}\"></ng-container>\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: \"check-square\",\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":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EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,CAAC,EAAA,eAAA,EAGpP,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,87EAAA,EAAA;8BAuB/C,YAAY,EAAA,CAAA;sBADX,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;AEpC9B,MAAM,MAAM,GAAiB;AAEhC,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,iBAAiB,CAAC,QAAkB,EAAA;QAChC,OAAO;YACH,QAAQ,EAAE,IAAI,WAAW,CAAC;gBACtB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO;AACzB,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,QAAQ,EAAE,WAAW;gBACrB,SAAS,EAAE,QAAQ,CAAC,YAAY;gBAChC,gBAAgB,EAAE,QAAQ,CAAC,aAAa;gBACxC,WAAW,EAAE,QAAQ,CAAC,aAAa;AACnC,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,WAAW,EAAE,UAAU;AACvB,gBAAA,IAAI,EAAE,cAAc;aACvB,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,107 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, effect, untracked, computed, model, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { ValueAccessOptions, ValueAccess } from 'ngx-axis-appforge/core';
|
|
4
|
+
import * as i2 from '@angular/forms';
|
|
5
|
+
import { FormsModule } from '@angular/forms';
|
|
6
|
+
import * as i1 from 'ng-zorro-antd/checkbox';
|
|
7
|
+
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
8
|
+
|
|
9
|
+
class CheckboxOptions extends ValueAccessOptions {
|
|
10
|
+
labelField = signal("title", ...(ngDevMode ? [{ debugName: "labelField" }] : []));
|
|
11
|
+
valueField = signal("key", ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
12
|
+
disabledField = signal("disabled", ...(ngDevMode ? [{ debugName: "disabledField" }] : []));
|
|
13
|
+
fullValue = signal(false, ...(ngDevMode ? [{ debugName: "fullValue" }] : []));
|
|
14
|
+
data = signal(undefined, ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class Checkbox extends ValueAccess {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
effect(() => {
|
|
21
|
+
const data = this.options.data();
|
|
22
|
+
if (Array.isArray(data) && data.length) {
|
|
23
|
+
untracked(() => {
|
|
24
|
+
if (this.checkboxValue()?.length) {
|
|
25
|
+
const next = data.filter(d => this.checkboxValue().includes(d[this.options.valueField()]));
|
|
26
|
+
if (next.length != this.checkboxValue().length) {
|
|
27
|
+
if (this.options.fullValue()) {
|
|
28
|
+
this.setInitValue(next);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this.setInitValue(next.map(r => r[this.options.valueField()]));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.setInitValue(null);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
options = new CheckboxOptions();
|
|
43
|
+
checkboxData = computed(() => this.buildCheckboxData(), ...(ngDevMode ? [{ debugName: "checkboxData" }] : []));
|
|
44
|
+
displayValue = computed(() => this.buildDisplay(), ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
|
|
45
|
+
checkboxValue = model(...(ngDevMode ? [undefined, { debugName: "checkboxValue" }] : []));
|
|
46
|
+
writeValue(value) {
|
|
47
|
+
super.writeValue(value);
|
|
48
|
+
this.valueToSelectorValue();
|
|
49
|
+
}
|
|
50
|
+
setInitValue(value) {
|
|
51
|
+
super.setInitValue(value);
|
|
52
|
+
this.valueToSelectorValue();
|
|
53
|
+
}
|
|
54
|
+
valueToSelectorValue() {
|
|
55
|
+
if (this.value() != undefined) {
|
|
56
|
+
if (this.options.fullValue()) {
|
|
57
|
+
this.checkboxValue.set(this.value().map((r) => r[this.options.valueField()]));
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.checkboxValue.set(this.value());
|
|
61
|
+
}
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this.checkboxValue.set(this.value());
|
|
65
|
+
}
|
|
66
|
+
onCheckboxChange(value) {
|
|
67
|
+
if (this.options.fullValue()) {
|
|
68
|
+
this.value.set(this.options.data().filter((item) => value.includes(item[this.options.valueField()])));
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.value.set(value);
|
|
72
|
+
}
|
|
73
|
+
this.onChange?.(this.value());
|
|
74
|
+
}
|
|
75
|
+
buildCheckboxData() {
|
|
76
|
+
if (Array.isArray(this.options.data())) {
|
|
77
|
+
return this.options.data().map((r) => ({ label: r[this.options.labelField()], value: r[this.options.valueField()], disabled: r[this.options.disabledField()] }));
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return [];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
buildDisplay() {
|
|
84
|
+
if (Array.isArray(this.value())) {
|
|
85
|
+
if (this.options.fullValue()) {
|
|
86
|
+
return this.value().map((r) => r[this.options.labelField()]).join(";");
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return this.options.data().filter((r) => this.value().includes(r[this.options.valueField()])).map((r) => r[this.options.labelField()]).join(";");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return "";
|
|
93
|
+
}
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Checkbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: Checkbox, isStandalone: true, selector: "axis-checkbox", inputs: { checkboxValue: { classPropertyName: "checkboxValue", publicName: "checkboxValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkboxValue: "checkboxValueChange" }, usesInheritance: true, ngImport: i0, template: "@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}", styles: [":host{display:block;width:100%}nz-select{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i1.NzCheckboxGroupComponent, selector: "nz-checkbox-group", inputs: ["nzName", "nzDisabled", "nzOptions"], exportAs: ["nzCheckboxGroup"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
96
|
+
}
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Checkbox, decorators: [{
|
|
98
|
+
type: Component,
|
|
99
|
+
args: [{ selector: 'axis-checkbox', imports: [NzCheckboxModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}", styles: [":host{display:block;width:100%}nz-select{width:100%}\n"] }]
|
|
100
|
+
}], ctorParameters: () => [] });
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Generated bundle index. Do not edit.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
export { Checkbox };
|
|
107
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-checkbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-checkbox.mjs","sources":["../../../axis-components/checkbox/checkbox.options.ts","../../../axis-components/checkbox/checkbox.ts","../../../axis-components/checkbox/checkbox.html","../../../axis-components/checkbox/ngx-axis-appforge-axis-components-checkbox.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class CheckboxOptions extends ValueAccessOptions {\n\n readonly labelField = signal(\"title\");\n readonly valueField = signal(\"key\");\n readonly disabledField = signal(\"disabled\");\n readonly fullValue = signal(false);\n readonly data = signal<any>(undefined);\n}","import { ChangeDetectionStrategy, Component, computed, effect, model, untracked } from '@angular/core';\nimport { ValueAccess } from 'ngx-axis-appforge/core';\nimport { FormsModule } from '@angular/forms';\nimport { CheckboxOptions } from './checkbox.options';\nimport { NzCheckboxModule, NzCheckboxOption } from 'ng-zorro-antd/checkbox';\n\n@Component({\n selector: 'axis-checkbox',\n imports: [NzCheckboxModule, FormsModule],\n templateUrl: './checkbox.html',\n styleUrl: './checkbox.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Checkbox extends ValueAccess<CheckboxOptions> {\n\n constructor() {\n super();\n effect(() => {\n const data = this.options.data();\n if (Array.isArray(data) && data.length) {\n untracked(() => {\n if (this.checkboxValue()?.length) {\n const next = data.filter(d => this.checkboxValue()!.includes(d[this.options.valueField()]))\n if (next.length != this.checkboxValue()!.length) {\n if (this.options.fullValue()) {\n this.setInitValue(next);\n } else {\n this.setInitValue(next.map(r => r[this.options.valueField()]));\n }\n }\n }\n })\n } else {\n this.setInitValue(null);\n }\n });\n }\n\n override options: CheckboxOptions = new CheckboxOptions();\n readonly checkboxData = computed(() => this.buildCheckboxData());\n readonly displayValue = computed(() => this.buildDisplay());\n readonly checkboxValue = model<any[]>();\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.valueToSelectorValue();\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.valueToSelectorValue();\n }\n\n private valueToSelectorValue() {\n if (this.value() != undefined) {\n if (this.options.fullValue()) {\n this.checkboxValue.set(this.value().map((r: any) => r[this.options.valueField()]));\n } else {\n this.checkboxValue.set(this.value());\n }\n return;\n }\n this.checkboxValue.set(this.value());\n }\n\n onCheckboxChange(value: any) {\n if (this.options.fullValue()) {\n this.value.set(this.options.data().filter((item: any) => value.includes(item[this.options.valueField()])));\n } else {\n this.value.set(value);\n }\n this.onChange?.(this.value());\n }\n\n private buildCheckboxData(): NzCheckboxOption[] {\n if (Array.isArray(this.options.data())) {\n return this.options.data().map((r: any) => ({ label: r[this.options.labelField()], value: r[this.options.valueField()], disabled: r[this.options.disabledField()] }))\n } else {\n return [];\n }\n }\n\n private buildDisplay(): string {\n if (Array.isArray(this.value())) {\n if (this.options.fullValue()) {\n return this.value().map((r: any) => r[this.options.labelField()]).join(\";\");\n } else {\n return this.options.data().filter((r: any) => this.value().includes(r[this.options.valueField()])).map((r: any) => r[this.options.labelField()]).join(\";\");\n }\n }\n return \"\";\n }\n\n}\n","@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './checkbox';\n"],"names":[],"mappings":";;;;;;;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