From b5126eae2fa1aeede651a50328f624f4ff278732 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Fri, 8 Jun 2018 23:15:10 +0200 Subject: [PATCH] Enhancements for #64 #66 #67 #72 --- CHANGELOG.md | 24 ++++-- .../documentation/docs/about/release-notes.md | 28 +++++-- .../controls/PropertyFieldCollectionData.md | 15 ++-- docs/documentation/docs/index.md | 3 + package.json | 5 +- postinstall/install.js | 57 ++++++++++++++ src/loc/en-us.js | 1 + src/loc/mystrings.d.ts | 1 + .../collectionData/FieldValidator.ts | 3 + .../collectionData/ICustomCollectionField.ts | 4 +- .../IPropertyFieldCollectionData.ts | 4 + ...ropertyFieldCollectionDataHost.module.scss | 12 +++ .../PropertyFieldCollectionDataHost.tsx | 9 ++- .../collectionDataItem/CollectionDataItem.tsx | 77 ++++++++++++++++--- .../ICollectionDataItemProps.ts | 3 +- .../CollectionDataViewer.tsx | 39 +++++++++- .../ICollectionDataViewerState.ts | 3 + .../CollectionIconField.tsx | 27 +++++++ .../ICollectionIconFieldProps.tsx | 8 ++ .../collectionIconField/index.ts | 2 + src/propertyFields/collectionData/index.ts | 1 + .../PropertyControlsTestWebPart.ts | 12 +++ 22 files changed, 295 insertions(+), 43 deletions(-) create mode 100755 postinstall/install.js create mode 100644 src/propertyFields/collectionData/FieldValidator.ts create mode 100644 src/propertyFields/collectionData/collectionIconField/CollectionIconField.tsx create mode 100644 src/propertyFields/collectionData/collectionIconField/ICollectionIconFieldProps.tsx create mode 100644 src/propertyFields/collectionData/collectionIconField/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 99099d2b..43adb24b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,22 @@ # Releases +## 1.7.0 + +**Enhancements** + +- Add `npm postinstall` script to automatically add the localization config [#64](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/64) +- Added a font field type for the `PropertyFieldCollectionData` control [#66](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/66) +- Added a URL field type for the `PropertyFieldCollectionData` control [#72](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/72) +- Add a description to the `PropertyFieldCollectionData` panel [#67](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/67) +- Field validation implemented to enable/disable save buttons in `PropertyFieldCollectionData` control + ## 1.6.0 **New controls** -- `PropertyFieldCollectionData` was added [58](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/58) -- `PropertyFieldOrder` was added [19](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/19) -- `PropertyFieldSwatchColorPicker` was added [55](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/55) +- `PropertyFieldCollectionData` was added [#58](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/58) +- `PropertyFieldOrder` was added [#19](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/19) +- `PropertyFieldSwatchColorPicker` was added [#55](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/55) **Enhancements** @@ -14,7 +24,7 @@ **Fixes** -- Fix for `PropertyFieldColorPicker` Palette Icon alignment issue in IE11 [56](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/56) +- Fix for `PropertyFieldColorPicker` Palette Icon alignment issue in IE11 [#56](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/56) ## 1.5.1 @@ -40,7 +50,7 @@ **Enhancements** -- Introduced the `onGetErrorMessage` property for the `PropertyFieldNumber` field control ([#36 - PropertyFieldNumber control suggestion](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/36)) +- Introduced the `onGetErrorMessage` property for the `PropertyFieldNumber` field control ([#36](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/36)) ## 1.4.1 @@ -50,8 +60,8 @@ **Fixes** -- Fixes for issue [#30 - Check if Label is null and if so don't render it.](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/30) -- Fix for issue [#33 - `PropertyFieldPeoplePicker` Validation does not work as expected.](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/33) +- Fixes for issue [#30](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/30) +- `PropertyFieldPeoplePicker` Validation does not work as expected [#33](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/33) ## 1.4.0 diff --git a/docs/documentation/docs/about/release-notes.md b/docs/documentation/docs/about/release-notes.md index d6049567..43adb24b 100644 --- a/docs/documentation/docs/about/release-notes.md +++ b/docs/documentation/docs/about/release-notes.md @@ -1,16 +1,30 @@ # Releases +## 1.7.0 + +**Enhancements** + +- Add `npm postinstall` script to automatically add the localization config [#64](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/64) +- Added a font field type for the `PropertyFieldCollectionData` control [#66](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/66) +- Added a URL field type for the `PropertyFieldCollectionData` control [#72](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/72) +- Add a description to the `PropertyFieldCollectionData` panel [#67](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/67) +- Field validation implemented to enable/disable save buttons in `PropertyFieldCollectionData` control + ## 1.6.0 **New controls** -- `PropertyFieldCollectionData` was added [58](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/58) -- `PropertyFieldOrder` was added [19](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/19) -- `PropertyFieldSwatchColorPicker` was added [55](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/55) +- `PropertyFieldCollectionData` was added [#58](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/58) +- `PropertyFieldOrder` was added [#19](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/19) +- `PropertyFieldSwatchColorPicker` was added [#55](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/55) + +**Enhancements** + +- Allow the term set to be selectable in the `PropertyFieldTermPicker` [#60](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/60) **Fixes** -- Fix for `PropertyFieldColorPicker` Palette Icon alignment issue in IE11 [56](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/56) +- Fix for `PropertyFieldColorPicker` Palette Icon alignment issue in IE11 [#56](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/56) ## 1.5.1 @@ -36,7 +50,7 @@ **Enhancements** -- Introduced the `onGetErrorMessage` property for the `PropertyFieldNumber` field control ([#36 - PropertyFieldNumber control suggestion](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/36)) +- Introduced the `onGetErrorMessage` property for the `PropertyFieldNumber` field control ([#36](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/36)) ## 1.4.1 @@ -46,8 +60,8 @@ **Fixes** -- Fixes for issue [#30 - Check if Label is null and if so don't render it.](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/30) -- Fix for issue [#33 - `PropertyFieldPeoplePicker` Validation does not work as expected.](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/33) +- Fixes for issue [#30](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/30) +- `PropertyFieldPeoplePicker` Validation does not work as expected [#33](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/33) ## 1.4.0 diff --git a/docs/documentation/docs/controls/PropertyFieldCollectionData.md b/docs/documentation/docs/controls/PropertyFieldCollectionData.md index 694a5a0b..bf121f38 100644 --- a/docs/documentation/docs/controls/PropertyFieldCollectionData.md +++ b/docs/documentation/docs/controls/PropertyFieldCollectionData.md @@ -100,6 +100,7 @@ The `PropertyFieldCollectionData` control can be configured with the following p | key | string | yes | An unique key that indicates the identity of this control. | | label | string | yes | Property field label displayed on top. | | panelHeader | string | yes | Label to be used as the header in the panel. | +| panelDescription | string | no | Property that allows you to specify a description in the collection panel. | | manageBtnLabel | string | yes | Label of the button to open the panel. | | fields | ICustomCollectionField[] | yes | The fields to be used for the list of collection data. | | value | string | yes | The collection data value. | @@ -117,11 +118,13 @@ Interface `ICustomCollectionField` Enum `CustomCollectionFieldType` -| Type | -| ---- | -| string | -| number | -| boolean | -| dropdown | +| Type | Description | +| ---- | ---- | +| string | Text field | +| number | Number field | +| boolean | Checkbox | +| dropdown | Dropdown field. You will have to specify the `options` property when using this field type | +| fabricIcon | Name of the [Office UI Fabric icon](https://developer.microsoft.com/en-us/fabric#/styles/icons) | +| url | URL field | ![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldCollectionData) diff --git a/docs/documentation/docs/index.md b/docs/documentation/docs/index.md index 05fc3f5a..ccd0693e 100644 --- a/docs/documentation/docs/index.md +++ b/docs/documentation/docs/index.md @@ -19,6 +19,9 @@ npm install @pnp/spfx-property-controls --save --save-exact ### Configuration +!!! note + Since `v1.7.0` the localized resource path will automatically be configured during the dependency installing. + Once the package is installed, you will have to configure the resource file of the property controls to be used in your project. You can do this by opening the `config/config.json` and adding the following line to the `localizedResources` property: ```json diff --git a/package.json b/package.json index 15a91aa0..982376e4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@pnp/spfx-property-controls", "description": "Reusable property pane controls for SharePoint Framework solutions", - "version": "1.6.0", + "version": "1.7.0", "engines": { "node": ">=0.10.0" }, @@ -11,7 +11,8 @@ "test": "gulp test", "versionUpdater": "gulp versionUpdater", "prepublishOnly": "gulp", - "changelog": "node scripts/sync-changelogs.js" + "changelog": "node scripts/sync-changelogs.js", + "postinstall": "node postinstall/install.js" }, "dependencies": { "@types/applicationinsights-js": "1.0.5", diff --git a/postinstall/install.js b/postinstall/install.js new file mode 100755 index 00000000..9319e789 --- /dev/null +++ b/postinstall/install.js @@ -0,0 +1,57 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const path = require('path'); + +console.log("INFO: Adding the required localized resource configuration to the config.json file."); + +// Get the current directory +const crntDir = path.resolve(__dirname); +// Split the whole directory path +let nesting = crntDir.split("/"); +// Windows split +if (nesting.length <= 1) { + nesting = crntDir.split("\\"); +} +// Check if correctly splitted +if (nesting.length > 0) { + // Find the first node_modules folder index + let idx = nesting.indexOf("node_modules"); + // Check if index of the folder was found + if (idx !== -1) { + // Slice unnecessary nodes + const nest = nesting.slice(idx); + if (nest && nest.length > 0) { + const paths = nest.map(m => ".."); + // Get the path of the projects root location + const rootDir = path.resolve(path.join(__dirname, paths.join('/'))); + const fileLoc = `${rootDir}/config/config.json`; + // Check if config.json file exists + if (fs.existsSync(fileLoc)) { + // Get the config file + const config = fs.readFileSync(fileLoc, "utf8"); + if (config && typeof config === "string") { + const contents = JSON.parse(config); + if (contents && contents.localizedResources && !contents.localizedResources.PropertyControlStrings) { + contents.localizedResources["PropertyControlStrings"] = "node_modules/@pnp/spfx-property-controls/lib/loc/{locale}.js"; + // Update the file + fs.writeFileSync(fileLoc, JSON.stringify(contents, null, 2)); + console.log("INFO: Localized resource added."); + } else { + console.warn(`WARNING: it seems something is wrong with the config.json file or the "PropertyControlStrings" reference was already set.`); + } + } else { + console.warn("WARNING: the config.json file was not correctly retrieved."); + } + } else { + console.warn("WARNING: the config.json file does not exist."); + } + } else { + console.warn("WARNING: something is wrong with the installation path."); + } + } else { + console.warn("WARNING: something when wrong during with retrieving the project its root location."); + } +} else { + console.warn("WARNING: something is wrong with the installation path."); +} diff --git a/src/loc/en-us.js b/src/loc/en-us.js index daf5faaf..b3c11548 100644 --- a/src/loc/en-us.js +++ b/src/loc/en-us.js @@ -1,5 +1,6 @@ define([], function () { return { + InvalidUrlError: "The provided URL is not valid", // Common field labels 'SaveButtonLabel': 'Save', 'CancelButtonLabel': 'Cancel', diff --git a/src/loc/mystrings.d.ts b/src/loc/mystrings.d.ts index f3ee4f10..c797196d 100644 --- a/src/loc/mystrings.d.ts +++ b/src/loc/mystrings.d.ts @@ -1,4 +1,5 @@ declare interface IPropertyControlStrings { + InvalidUrlError: string; // PeoplePicker labels PeoplePickerSuggestedContacts: string; PeoplePickerSuggestedGroups: string; diff --git a/src/propertyFields/collectionData/FieldValidator.ts b/src/propertyFields/collectionData/FieldValidator.ts new file mode 100644 index 00000000..e5db3448 --- /dev/null +++ b/src/propertyFields/collectionData/FieldValidator.ts @@ -0,0 +1,3 @@ +export interface FieldValidator { + [property: string]: boolean; +} diff --git a/src/propertyFields/collectionData/ICustomCollectionField.ts b/src/propertyFields/collectionData/ICustomCollectionField.ts index 28ae3590..c6bfb1f7 100644 --- a/src/propertyFields/collectionData/ICustomCollectionField.ts +++ b/src/propertyFields/collectionData/ICustomCollectionField.ts @@ -27,5 +27,7 @@ export enum CustomCollectionFieldType { string = 1, number, boolean, - dropdown + dropdown, + fabricIcon, + url } diff --git a/src/propertyFields/collectionData/IPropertyFieldCollectionData.ts b/src/propertyFields/collectionData/IPropertyFieldCollectionData.ts index fd8e6158..b3cabc0c 100644 --- a/src/propertyFields/collectionData/IPropertyFieldCollectionData.ts +++ b/src/propertyFields/collectionData/IPropertyFieldCollectionData.ts @@ -14,6 +14,10 @@ export interface IPropertyFieldCollectionDataProps { * Label to be used as the header in the panel. */ panelHeader: string; + /** + * Property that allows you to specify a description in the collection panel. + */ + panelDescription?: string; /** * Label of the button to open the panel. */ diff --git a/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.module.scss b/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.module.scss index 4bd0d96c..73f9c5e8 100644 --- a/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.module.scss +++ b/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.module.scss @@ -72,6 +72,18 @@ } } +.iconField { + position: relative; + + i { + font-size: 20px; + position: absolute; + top: 0; + right: 10px; + vertical-align: top; + } +} + /* Table layout */ .table { diff --git a/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.tsx b/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.tsx index 92b739a3..3339ba21 100644 --- a/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.tsx +++ b/src/propertyFields/collectionData/PropertyFieldCollectionDataHost.tsx @@ -1,8 +1,6 @@ import * as React from 'react'; import * as appInsights from '../../common/appInsights'; -import { ICustomCollectionField, IPropertyFieldCollectionDataHostProps, IPropertyFieldCollectionDataHostState } from '.'; -import { TextField } from 'office-ui-fabric-react/lib/TextField'; -import styles from './PropertyFieldCollectionDataHost.module.scss'; +import { IPropertyFieldCollectionDataHostProps, IPropertyFieldCollectionDataHostState } from '.'; import { DefaultButton } from 'office-ui-fabric-react/lib/components/Button'; import { Panel, PanelType } from 'office-ui-fabric-react/lib/components/Panel'; import { Label } from 'office-ui-fabric-react/lib/components/Label'; @@ -66,6 +64,11 @@ export class PropertyFieldCollectionDataHost extends React.Component + { + this.props.panelDescription && ( +

{this.props.panelDescription}

+ ) + } diff --git a/src/propertyFields/collectionData/collectionDataItem/CollectionDataItem.tsx b/src/propertyFields/collectionData/collectionDataItem/CollectionDataItem.tsx index bd9d8bd0..010e5fd6 100644 --- a/src/propertyFields/collectionData/collectionDataItem/CollectionDataItem.tsx +++ b/src/propertyFields/collectionData/collectionDataItem/CollectionDataItem.tsx @@ -6,11 +6,14 @@ import { Icon } from 'office-ui-fabric-react/lib/components/Icon'; import { Link } from 'office-ui-fabric-react/lib/components/Link'; import { Checkbox } from 'office-ui-fabric-react/lib/components/Checkbox'; import * as strings from 'PropertyControlStrings'; -import { ICustomCollectionField, CustomCollectionFieldType } from '..'; +import { ICustomCollectionField, CustomCollectionFieldType, FieldValidator } from '..'; import { Dropdown } from 'office-ui-fabric-react'; +import { CollectionIconField } from '../collectionIconField'; +import { clone } from '@microsoft/sp-lodash-subset'; export class CollectionDataItem extends React.Component { private emptyItem: any = null; + private validation: FieldValidator = {}; constructor(props: ICollectionDataItemProps) { super(props); @@ -22,7 +25,7 @@ export class CollectionDataItem extends React.Component { + const { crntItem } = this.state; + const isValid = this.checkAllRequiredFieldsValid(crntItem) && this.checkAnyFieldContainsValue(crntItem) && this.checkAllFieldsAreValid(); + if (this.props.fUpdateItem) { - const { crntItem } = this.state; // Check if all the fields are correctly provided - if (this.checkAllRequiredFieldsValid(crntItem) && this.checkAnyFieldContainsValue(crntItem)) { + if (isValid) { this.props.fUpdateItem(this.props.index, crntItem); } } + + // Set the validation for the item + if (this.props.fValidation) { + this.props.fValidation(this.props.index, isValid); + } } /** * Delete the item from the collection */ private deleteRow = () => { - if (this.props.fdeleteItem) { - this.props.fdeleteItem(this.props.index); + if (this.props.fDeleteItem) { + this.props.fDeleteItem(this.props.index); } } @@ -166,6 +200,25 @@ export class CollectionDataItem extends React.Component this.onValueChanged(field.id, ev.target.value)} /> ); + case CustomCollectionFieldType.fabricIcon: + return ( + + ); + case CustomCollectionFieldType.url: + return { + // Check if entered value is a valid URL + const regEx: RegExp = /^((http|https)?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/; + const isValid = (value === null || value.length === 0 || regEx.test(value)); + // Store the field validation + this.validation[field.id] = isValid; + // Trigger field change + this.onValueChanged(field.id, value); + // Return the error message if needed + return isValid ? "" : strings.InvalidUrlError; + }} />; case CustomCollectionFieldType.string: default: return + ) : ( diff --git a/src/propertyFields/collectionData/collectionDataItem/ICollectionDataItemProps.ts b/src/propertyFields/collectionData/collectionDataItem/ICollectionDataItemProps.ts index c2f533be..ad2678fb 100644 --- a/src/propertyFields/collectionData/collectionDataItem/ICollectionDataItemProps.ts +++ b/src/propertyFields/collectionData/collectionDataItem/ICollectionDataItemProps.ts @@ -8,5 +8,6 @@ export interface ICollectionDataItemProps { fAddItem?: (item: any) => void; fAddInCreation?: (item: any) => void; fUpdateItem?: (idx: number, item: any) => void; - fdeleteItem?: (idx: number) => void; + fDeleteItem?: (idx: number) => void; + fValidation?: (idx: number, isValid: boolean) => void; } diff --git a/src/propertyFields/collectionData/collectionDataViewer/CollectionDataViewer.tsx b/src/propertyFields/collectionData/collectionDataViewer/CollectionDataViewer.tsx index a8080f5b..28db2878 100644 --- a/src/propertyFields/collectionData/collectionDataViewer/CollectionDataViewer.tsx +++ b/src/propertyFields/collectionData/collectionDataViewer/CollectionDataViewer.tsx @@ -14,7 +14,8 @@ export class CollectionDataViewer extends React.Component { + this.setState((prevState: ICollectionDataViewerState) => { + const { validation } = prevState; + validation[idx] = isValid; + return { + validation: prevState.validation + }; + }); + } + + /** + * Check if all items are valid + */ + private allItemsValid() { + const { validation } = this.state; + if (validation) { + const keys = Object.keys(validation); + for (const key of keys) { + if (!validation[key]) { + return false; + } + } + } + return true; + } + /** * Currently in creation */ @@ -118,7 +148,8 @@ export class CollectionDataViewer extends React.Component + fDeleteItem={this.deleteItem} + fValidation={this.validateItem} /> )) ) } @@ -136,8 +167,8 @@ export class CollectionDataViewer extends React.Component - { this.state.inCreationItem && } - + { this.state.inCreationItem && } + diff --git a/src/propertyFields/collectionData/collectionDataViewer/ICollectionDataViewerState.ts b/src/propertyFields/collectionData/collectionDataViewer/ICollectionDataViewerState.ts index 024746f4..8f193dfb 100644 --- a/src/propertyFields/collectionData/collectionDataViewer/ICollectionDataViewerState.ts +++ b/src/propertyFields/collectionData/collectionDataViewer/ICollectionDataViewerState.ts @@ -1,4 +1,7 @@ +import { FieldValidator } from ".."; + export interface ICollectionDataViewerState { crntItems: any[]; inCreationItem?: any; + validation?: FieldValidator; } diff --git a/src/propertyFields/collectionData/collectionIconField/CollectionIconField.tsx b/src/propertyFields/collectionData/collectionIconField/CollectionIconField.tsx new file mode 100644 index 00000000..ae77a95f --- /dev/null +++ b/src/propertyFields/collectionData/collectionIconField/CollectionIconField.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import styles from '../PropertyFieldCollectionDataHost.module.scss'; +import { ICollectionIconFieldProps } from '.'; +import { TextField } from 'office-ui-fabric-react/lib/components/TextField'; +import { Icon } from 'office-ui-fabric-react/lib/components/Icon'; + +export class CollectionIconField extends React.Component { + constructor(props: ICollectionIconFieldProps) { + super(props); + + this.state = { + iconName: null + }; + } + + public render(): React.ReactElement { + return ( +
+ this.props.fOnValueChange(this.props.field.id, value)} /> + +
+ ); + } +} diff --git a/src/propertyFields/collectionData/collectionIconField/ICollectionIconFieldProps.tsx b/src/propertyFields/collectionData/collectionIconField/ICollectionIconFieldProps.tsx new file mode 100644 index 00000000..a021e049 --- /dev/null +++ b/src/propertyFields/collectionData/collectionIconField/ICollectionIconFieldProps.tsx @@ -0,0 +1,8 @@ +import { ICustomCollectionField } from ".."; + +export interface ICollectionIconFieldProps { + field: ICustomCollectionField; + item: any; + + fOnValueChange: (fieldId: string, value: any) => void; +} diff --git a/src/propertyFields/collectionData/collectionIconField/index.ts b/src/propertyFields/collectionData/collectionIconField/index.ts new file mode 100644 index 00000000..968ce03a --- /dev/null +++ b/src/propertyFields/collectionData/collectionIconField/index.ts @@ -0,0 +1,2 @@ +export * from "./ICollectionIconFieldProps"; +export * from "./CollectionIconField"; diff --git a/src/propertyFields/collectionData/index.ts b/src/propertyFields/collectionData/index.ts index 247ffe08..56831320 100644 --- a/src/propertyFields/collectionData/index.ts +++ b/src/propertyFields/collectionData/index.ts @@ -3,3 +3,4 @@ export * from './IPropertyFieldCollectionData'; export * from './PropertyFieldCollectionData'; export * from './IPropertyFieldCollectionDataHost'; export * from './PropertyFieldCollectionDataHost'; +export * from './FieldValidator'; diff --git a/src/webparts/propertyControlsTest/PropertyControlsTestWebPart.ts b/src/webparts/propertyControlsTest/PropertyControlsTestWebPart.ts index 3efd376e..69d766df 100644 --- a/src/webparts/propertyControlsTest/PropertyControlsTestWebPart.ts +++ b/src/webparts/propertyControlsTest/PropertyControlsTestWebPart.ts @@ -100,6 +100,7 @@ export default class PropertyControlsTestWebPart extends BaseClientSideWebPart