-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6821de6
commit 1cb33dc
Showing
3 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
...s/pluggable-widgets-tools/src/typings-generator/__tests__/inputs/list-attribute-refset.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
export const listAttributeWebInput = `<?xml version="1.0" encoding="utf-8"?> | ||
<widget id="mendix.mywidget.MyWidget" needsEntityContext="true" offlineCapable="true" pluginWidget="true" | ||
xmlns="http://www.mendix.com/widget/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.mendix.com/widget/1.0/ ../xsd/widget.xsd"> | ||
<properties> | ||
<propertyGroup caption="General"> | ||
<property key="dataSource" type="datasource" isList="true" required="false"> | ||
<caption>Data source</caption> | ||
<description /> | ||
</property> | ||
<property key="referenceDefault" type="attribute" dataSource="dataSource"> | ||
<caption>Reference</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
</property> | ||
<property key="reference" type="attribute" dataSource="dataSource"> | ||
<caption>Reference</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
<associationTypes> | ||
<associationType name="Reference"/> | ||
</associationTypes> | ||
</property> | ||
<property key="referenceSet" type="attribute" dataSource="dataSource"> | ||
<caption>Reference Set</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
<associationTypes> | ||
<associationType name="ReferenceSet"/> | ||
</associationTypes> | ||
</property> | ||
<property key="referenceOrSet" type="attribute" dataSource="dataSource"> | ||
<caption>Reference or Set</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
<associationTypes> | ||
<associationType name="Reference"/> | ||
<associationType name="ReferenceSet"/> | ||
</associationTypes> | ||
</property> | ||
</propertyGroup> | ||
</properties> | ||
</widget>`; | ||
|
||
export const listAttributeNativeInput = `<?xml version="1.0" encoding="utf-8"?> | ||
<widget id="mendix.mywidget.MyWidget" needsEntityContext="true" offlineCapable="true" pluginWidget="true" supportedPlatform="Native" | ||
xmlns="http://www.mendix.com/widget/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.mendix.com/widget/1.0/ ../xsd/widget.xsd"> | ||
<properties> | ||
<propertyGroup caption="General"> | ||
<property key="dataSource" type="datasource" isList="true" required="false"> | ||
<caption>Data source</caption> | ||
<description /> | ||
</property> | ||
<property key="referenceDefault" type="attribute" dataSource="dataSource"> | ||
<caption>Reference</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
</property> | ||
<property key="reference" type="attribute" dataSource="dataSource"> | ||
<caption>Reference</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
<associationTypes> | ||
<associationType name="Reference"/> | ||
</associationTypes> | ||
</property> | ||
<property key="referenceSet" type="attribute" dataSource="dataSource"> | ||
<caption>Reference Set</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
<associationTypes> | ||
<associationType name="ReferenceSet"/> | ||
</associationTypes> | ||
</property> | ||
<property key="referenceOrSet" type="attribute" dataSource="dataSource"> | ||
<caption>Reference or Set</caption> | ||
<description/> | ||
<attributeTypes> | ||
<attributeType name="String" /> | ||
</attributeTypes> | ||
<associationTypes> | ||
<associationType name="Reference"/> | ||
<associationType name="ReferenceSet"/> | ||
</associationTypes> | ||
</property> | ||
</propertyGroup> | ||
</properties> | ||
</widget>`; |
46 changes: 46 additions & 0 deletions
46
.../pluggable-widgets-tools/src/typings-generator/__tests__/outputs/list-attribute-refset.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
export const listAttributeWebOutput = `/** | ||
* This file was generated from MyWidget.xml | ||
* WARNING: All changes made to this file will be overwritten | ||
* @author Mendix Widgets Framework Team | ||
*/ | ||
import { CSSProperties } from "react"; | ||
import { ListValue, ListAttributeValue, ListAttributeListValue } from "mendix"; | ||
export interface MyWidgetContainerProps { | ||
name: string; | ||
class: string; | ||
style?: CSSProperties; | ||
tabIndex?: number; | ||
dataSource?: ListValue; | ||
referenceDefault?: ListAttributeValue<string>; | ||
reference?: ListAttributeValue<string>; | ||
referenceSet?: ListAttributeListValue<string>; | ||
referenceOrSet?: ListAttributeValue<string> | ListAttributeListValue<string>; | ||
} | ||
export interface MyWidgetPreviewProps { | ||
/** | ||
* @deprecated Deprecated since version 9.18.0. Please use class property instead. | ||
*/ | ||
className: string; | ||
class: string; | ||
style: string; | ||
styleObject?: CSSProperties; | ||
readOnly: boolean; | ||
dataSource: {} | { caption: string } | { type: string } | null; | ||
referenceDefault: string; | ||
reference: string; | ||
referenceSet: string; | ||
referenceOrSet: string; | ||
} | ||
`; | ||
|
||
export const listAttributeNativeOutput = `export interface MyWidgetProps<Style> { | ||
name: string; | ||
style: Style[]; | ||
dataSource?: ListValue; | ||
referenceDefault?: ListAttributeValue<string>; | ||
reference?: ListAttributeValue<string>; | ||
referenceSet?: ListAttributeListValue<string>; | ||
referenceOrSet?: ListAttributeValue<string> | ListAttributeListValue<string>; | ||
}`; |