@byteluck-fe/model-driven-controls 7.0.0-props.40 → 7.0.0-props.42

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.
@@ -20,6 +20,7 @@ export { default as BatchPrintListButton } from './baseControls/BatchPrintListBu
20
20
  export { default as BatchPrintRecordListButton } from './baseControls/BatchPrintRecordListButton/property';
21
21
  export { default as OperationButton } from './baseControls/OperationButton/property';
22
22
  export { default as BatchDeleteButton } from './baseControls/BatchDeleteButton/property';
23
+ export { default as Switch } from './formControls/Switch/property';
23
24
  export { default as Tag } from './formControls/Tag/property';
24
25
  export { default as VarcharColumn } from './columnControls/VarcharColumn/property';
25
26
  export { default as TextColumn } from './columnControls/TextColumn/property';
@@ -0,0 +1,15 @@
1
+ import { DesignerFormControl, Schema, SettingOption } from '@byteluck-fe/model-driven-core';
2
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
3
+ import SwitchProperty from './property';
4
+ declare class SwitchControl extends DesignerFormControl {
5
+ static controlEventKeys: string[];
6
+ static get controlName(): string;
7
+ static get controlIcon(): string;
8
+ static get controlType(): string;
9
+ static controlFieldType: FieldTypes;
10
+ static readonly setting: SettingOption[];
11
+ readonly props: SwitchProperty;
12
+ constructor(props?: Partial<Schema<'switch'>>);
13
+ }
14
+ export default SwitchControl;
15
+ export { SwitchControl as DesignerSwitchControl };
@@ -0,0 +1,12 @@
1
+ import Designer from './designer';
2
+ import Runtime from './runtime';
3
+ import Property from './property';
4
+ declare const _default: {
5
+ Designer: typeof Designer;
6
+ Runtime: typeof Runtime;
7
+ Property: typeof Property;
8
+ };
9
+ export default _default;
10
+ export * from './designer';
11
+ export * from './runtime';
12
+ export * from './property';
@@ -0,0 +1,72 @@
1
+ import { BaseControlProperty, BaseControlPropertyInterface, BaseControlPropertyRules, BaseControlPropertyRuntimeRules } from '@byteluck-fe/model-driven-core';
2
+ declare class SwitchPropertyRules extends BaseControlPropertyRules {
3
+ constructor(props: SwitchProperty);
4
+ }
5
+ declare class SwitchPropertyRuntimeRules extends BaseControlPropertyRuntimeRules {
6
+ constructor(props: SwitchProperty);
7
+ }
8
+ interface SwitchPropertyInterface extends BaseControlPropertyInterface {
9
+ /**
10
+ * 默认值
11
+ * @defaultValue false
12
+ * @public
13
+ */
14
+ defaultValue: boolean;
15
+ /**
16
+ * 文字展示样式;取值:inside:开关内;outside:开关外;
17
+ * @defaultValue 'inside'
18
+ * @public
19
+ */
20
+ textDisplayStyle: 'inside' | 'outside';
21
+ /**
22
+ * 开启文字
23
+ * @defaultValue ''
24
+ * @public
25
+ */
26
+ checkedText: string;
27
+ /**
28
+ * 开启文字颜色
29
+ * @defaultValue ''
30
+ * @public
31
+ */
32
+ checkedTextColor: string;
33
+ /**
34
+ * 开启背景颜色
35
+ * @defaultValue ''
36
+ * @public
37
+ */
38
+ checkedBackgroundColor: string;
39
+ /**
40
+ * 关闭文字
41
+ * @defaultValue ''
42
+ * @public
43
+ */
44
+ uncheckedText: string;
45
+ /**
46
+ * 关闭文字颜色
47
+ * @defaultValue ''
48
+ * @public
49
+ */
50
+ uncheckedTextColor: string;
51
+ /**
52
+ * 关闭背景颜色
53
+ * @defaultValue ''
54
+ * @public
55
+ */
56
+ uncheckedBackgroundColor: string;
57
+ }
58
+ declare class SwitchProperty extends BaseControlProperty implements SwitchPropertyInterface {
59
+ static readonly Rules: typeof SwitchPropertyRules;
60
+ static readonly RuntimeRules: typeof SwitchPropertyRuntimeRules;
61
+ defaultValue: boolean;
62
+ textDisplayStyle: 'inside' | 'outside';
63
+ checkedText: string;
64
+ checkedTextColor: string;
65
+ checkedBackgroundColor: string;
66
+ uncheckedText: string;
67
+ uncheckedTextColor: string;
68
+ uncheckedBackgroundColor: string;
69
+ constructor(props?: Partial<SwitchProperty>);
70
+ }
71
+ export default SwitchProperty;
72
+ export { SwitchProperty, SwitchPropertyInterface, SwitchPropertyRules, SwitchPropertyRuntimeRules, };
@@ -0,0 +1,12 @@
1
+ import { RuntimeFormControl } from '@byteluck-fe/model-driven-core';
2
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
3
+ import SwitchProperty from './property';
4
+ import { Schema } from '@byteluck-fe/model-driven-core';
5
+ declare class SwitchControl extends RuntimeFormControl {
6
+ static get controlType(): string;
7
+ static controlFieldType: FieldTypes;
8
+ readonly props: SwitchProperty;
9
+ constructor(props?: Partial<Schema<'switch'>>);
10
+ }
11
+ export default SwitchControl;
12
+ export { SwitchControl as RuntimeSwitchControl };
@@ -12,6 +12,8 @@ export { default as Number } from './Number';
12
12
  export type { NumberPropertyInterface } from './Number';
13
13
  export { default as Slider } from './Slider';
14
14
  export type { SliderPropertyInterface } from './Slider';
15
+ export { default as Switch } from './Switch';
16
+ export type { SwitchPropertyInterface } from './Switch';
15
17
  export { default as Tag } from './Tag';
16
18
  export type { TagPropertyInterface } from './Tag';
17
19
  export { default as DatePicker } from './DatePicker';
@@ -1,5 +1,5 @@
1
1
  import { Divider, Text, Link, Button, Title, CreateFormListButton, BatchSubmissionListButton, SubmissionRecordListButton, ImportRecordListButton, ExportRecordListButton, ExportListButton, FormSelectButton, ListSelectButton, Pagination, Dashboard, ListViewSelect, TextOcrButton, InvoiceCheckButton, BatchPrintListButton, BatchPrintRecordListButton, OperationButton, ReferenceList, CommentControl } from './baseControls';
2
- import { Address, Amount, Attachment, AutoNumber, Checkbox, Cascader, Counter, DatePicker, DateRange, Department, Employee, Image, Input, Number, Slider, Radio, Score, Select, SelectMultiple, Textarea, RichText, Calc, SearchNumberRange, SearchDateRange, SearchInput, VueFormItem, SelectRelation, TimeRange, TimePicker, Tree, Employee2, ElectronicSignature, WPS, Department2, OrganizationSelection, VuePage, Tag } from './formControls';
2
+ import { Address, Amount, Attachment, AutoNumber, Checkbox, Cascader, Counter, DatePicker, DateRange, Department, Employee, Image, Input, Number, Slider, Switch, Radio, Score, Select, SelectMultiple, Textarea, RichText, Calc, SearchNumberRange, SearchDateRange, SearchInput, VueFormItem, SelectRelation, TimeRange, TimePicker, Tree, Employee2, ElectronicSignature, WPS, Department2, OrganizationSelection, VuePage, Tag } from './formControls';
3
3
  import { CardGroup, Col, Grid, GridRow, Row, SubTableColumn, SubTableRow, GridTableColumn, GridLayoutContainer, Tab, TabPane, Toolbox, ListView, DataView, Page, AdvancedContainer, PositioningContainer, Position, ActionBar, Step, StepPane, TableLayout, TableLayoutRow, TableLayoutCol, TableLayoutWrapper, Collapse, CollapsePane } from './layoutControls';
4
4
  import { SubTable, GridTable } from './listControls';
5
5
  import { VarcharColumn, TextColumn, DecimalColumn, TimescopeColumn, TimestampColumn, ArrayColumn, DepartmentColumn, AutoNumberColumn, FileColumn, ImageColumn, PeopleColumn, LocationColumn, CustomColumn, OrderColumn, OperationColumn, EmployeeColumn, ApprovalStatusColumn, GroupColumn } from './columnControls';
@@ -50,6 +50,7 @@ declare module '@byteluck-fe/model-driven-core' {
50
50
  image: typeof Image;
51
51
  number: typeof Number;
52
52
  slider: typeof Slider;
53
+ switch: typeof Switch;
53
54
  radio: typeof Radio;
54
55
  score: typeof Score;
55
56
  textarea: typeof Textarea;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-controls",
3
- "version": "7.0.0-props.40",
3
+ "version": "7.0.0-props.42",
4
4
  "description": "> TODO: description",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -26,10 +26,10 @@
26
26
  "postpublish": "node ../../scripts/postpublish.js"
27
27
  },
28
28
  "dependencies": {
29
- "@byteluck-fe/model-driven-core": "7.0.0-props.38",
30
- "@byteluck-fe/model-driven-settings": "7.0.0-props.38",
31
- "@byteluck-fe/model-driven-shared": "7.0.0-props.38",
29
+ "@byteluck-fe/model-driven-core": "7.0.0-props.41",
30
+ "@byteluck-fe/model-driven-settings": "7.0.0-props.41",
31
+ "@byteluck-fe/model-driven-shared": "7.0.0-props.41",
32
32
  "async-validator": "3.5.1"
33
33
  },
34
- "gitHead": "e0a0481c4aebe05b3afece098a0d6efce6e3aa55"
34
+ "gitHead": "91fb5bbcfeb78c70cb08cc3d520c3c2a38e70253"
35
35
  }