@bentley/ui-abstract
Advanced tools
Comparing version 2.8.1 to 2.9.0-dev.9
@@ -5,8 +5,2 @@ { | ||
{ | ||
"version": "2.8.1", | ||
"tag": "@bentley/ui-abstract_v2.8.1", | ||
"date": "Tue, 03 Nov 2020 00:33:56 GMT", | ||
"comments": {} | ||
}, | ||
{ | ||
"version": "2.8.0", | ||
@@ -27,2 +21,8 @@ "tag": "@bentley/ui-abstract_v2.8.0", | ||
{ | ||
"version": "2.7.5", | ||
"tag": "@bentley/ui-abstract_v2.7.5", | ||
"date": "Fri, 23 Oct 2020 16:23:50 GMT", | ||
"comments": {} | ||
}, | ||
{ | ||
"version": "2.7.4", | ||
@@ -481,2 +481,2 @@ "tag": "@bentley/ui-abstract_v2.7.4", | ||
] | ||
} | ||
} |
# Change Log - @bentley/ui-abstract | ||
This log was last generated on Tue, 03 Nov 2020 00:33:56 GMT and should not be manually modified. | ||
This log was last generated on Mon, 26 Oct 2020 21:21:01 GMT and should not be manually modified. | ||
## 2.8.1 | ||
Tue, 03 Nov 2020 00:33:56 GMT | ||
_Version update only_ | ||
## 2.8.0 | ||
@@ -18,2 +13,7 @@ Fri, 23 Oct 2020 17:04:02 GMT | ||
## 2.7.5 | ||
Fri, 23 Oct 2020 16:23:50 GMT | ||
_Version update only_ | ||
## 2.7.4 | ||
@@ -206,3 +206,3 @@ Mon, 19 Oct 2020 17:57:02 GMT | ||
- Started ui-components Learning doc section | ||
- Update doc tags for automatic UI creation | ||
- Update doc tags for automatic UI creation | ||
- Refactor to remove duplicate ComponentGenerator instantiation. Rename files and components to remove React reference. | ||
@@ -209,0 +209,0 @@ - Update auto-generated dialog items to work with the Tool Settings Bar. |
@@ -9,3 +9,3 @@ export * from "./ui-abstract/UiAbstract"; | ||
export * from "./ui-abstract/dialogs/DialogItem"; | ||
export * from "./ui-abstract/dialogs/DialogItemsManager"; | ||
export * from "./ui-abstract/dialogs/UiLayoutDataProvider"; | ||
export * from "./ui-abstract/dialogs/UiDataProvider"; | ||
@@ -12,0 +12,0 @@ export * from "./ui-abstract/items/AbstractItemProps"; |
@@ -17,3 +17,3 @@ "use strict"; | ||
__export(require("./ui-abstract/common/KeyboardKey")); | ||
__export(require("./ui-abstract/dialogs/DialogItemsManager")); | ||
__export(require("./ui-abstract/dialogs/UiLayoutDataProvider")); | ||
__export(require("./ui-abstract/dialogs/UiDataProvider")); | ||
@@ -20,0 +20,0 @@ __export(require("./ui-abstract/items/BadgeType")); |
@@ -20,3 +20,5 @@ /** @packageDocumentation | ||
columnIndex: number; | ||
/** Number of columns to occupy. Defaults to 1 */ | ||
/** Number of columns to occupy. Defaults to 1 | ||
* @deprecated | ||
*/ | ||
columnSpan?: number; | ||
@@ -36,6 +38,3 @@ } | ||
export interface DialogItem extends BaseDialogItem { | ||
readonly value: DialogItemValue; | ||
readonly property: PropertyDescription; | ||
readonly editorPosition: EditorPosition; | ||
readonly isDisabled?: boolean; | ||
readonly lockProperty?: BaseDialogItem; | ||
@@ -55,3 +54,4 @@ } | ||
readonly isDisabled?: boolean; | ||
readonly property?: PropertyDescription; | ||
} | ||
//# sourceMappingURL=DialogItem.d.ts.map |
@@ -5,3 +5,3 @@ /** @packageDocumentation | ||
import { BeUiEvent } from "@bentley/bentleyjs-core"; | ||
import { DialogItem, DialogPropertyItem, DialogPropertySyncItem } from "./DialogItem"; | ||
import { DialogPropertyItem, DialogPropertySyncItem } from "./DialogItem"; | ||
/** Sync UI Control Properties Event class. | ||
@@ -12,20 +12,24 @@ * @beta | ||
} | ||
/** [[UiDataProvider ]] Abstract class that allows property values to be passed between hosting API and UI | ||
/** [[UiDataProvider ]] Abstract class that allows property values to be passed between hosting API and UI. | ||
* @beta | ||
*/ | ||
export declare abstract class UiDataProvider { | ||
/** Called by UI to inform data provider of changes. If used by modal dialog then this is typically only called | ||
* when "OK" or "Apply" button is selected. | ||
*/ | ||
/** Called by UI to inform data provider of changes. */ | ||
processChangesInUi(_properties: DialogPropertyItem[]): PropertyChangeResult; | ||
/** Called to get any defined DialogItems that can be use to dynamically layout properties in UI (See ToolWithSettings for example). */ | ||
supplyDialogItems(): DialogItem[] | undefined; | ||
/** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */ | ||
supplyAvailableProperties(): DialogPropertyItem[]; | ||
/** Get Sync UI Control Properties Event */ | ||
onSyncPropertiesChangeEvent: SyncPropertiesChangeEvent; | ||
onItemsReloadedEvent: BeUiEvent<void>; | ||
/** Called by UI to validate a property value */ | ||
validateProperty(_item: DialogPropertyItem): PropertyChangeResult; | ||
/** Called to sync properties synchronously if a UiDataProvider is active for the UI */ | ||
syncProperties(_syncProperties: DialogPropertySyncItem[]): void; | ||
syncProperties(syncProperties: DialogPropertySyncItem[]): void; | ||
/** Called to inform listener that the UiDataProvider has updated values for the UI */ | ||
fireSyncPropertiesEvent(syncProperties: DialogPropertySyncItem[]): void; | ||
/** Called to inform listeners that new properties are ready for display in UI. | ||
*/ | ||
fireItemsReloadedEvent(): void; | ||
/** Used to pass properties between a tool and an explicity defined UI dialog. See method supplyDialogItems in [[UiLayoutDataProvider]] for supplying | ||
* properties that will be used to dynamically create and layout control in a Dialog or Widget. | ||
*/ | ||
supplyAvailableProperties(): DialogPropertyItem[]; | ||
} | ||
@@ -32,0 +36,0 @@ /** Sync UI Control Properties Event Args interface. |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.SyncPropertiesChangeEvent = SyncPropertiesChangeEvent; | ||
/** [[UiDataProvider ]] Abstract class that allows property values to be passed between hosting API and UI | ||
/** [[UiDataProvider ]] Abstract class that allows property values to be passed between hosting API and UI. | ||
* @beta | ||
@@ -26,17 +26,8 @@ */ | ||
this.onSyncPropertiesChangeEvent = new SyncPropertiesChangeEvent(); | ||
this.onItemsReloadedEvent = new bentleyjs_core_1.BeUiEvent(); | ||
} | ||
/** Called by UI to inform data provider of changes. If used by modal dialog then this is typically only called | ||
* when "OK" or "Apply" button is selected. | ||
*/ | ||
/** Called by UI to inform data provider of changes. */ | ||
processChangesInUi(_properties) { | ||
return { status: PropertyChangeStatus.Success }; | ||
throw (new Error("Derived UiDataProvider must implement this method to apply changes to a bulk set of properties.")); | ||
} | ||
/** Called to get any defined DialogItems that can be use to dynamically layout properties in UI (See ToolWithSettings for example). */ | ||
supplyDialogItems() { | ||
return; | ||
} | ||
/** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */ | ||
supplyAvailableProperties() { | ||
return []; | ||
} | ||
/** Called by UI to validate a property value */ | ||
@@ -47,5 +38,20 @@ validateProperty(_item) { | ||
/** Called to sync properties synchronously if a UiDataProvider is active for the UI */ | ||
syncProperties(_syncProperties) { | ||
return; | ||
syncProperties(syncProperties) { | ||
this.fireSyncPropertiesEvent(syncProperties); | ||
} | ||
/** Called to inform listener that the UiDataProvider has updated values for the UI */ | ||
fireSyncPropertiesEvent(syncProperties) { | ||
this.onSyncPropertiesChangeEvent.emit({ properties: syncProperties }); | ||
} | ||
/** Called to inform listeners that new properties are ready for display in UI. | ||
*/ | ||
fireItemsReloadedEvent() { | ||
this.onItemsReloadedEvent.emit(); | ||
} | ||
/** Used to pass properties between a tool and an explicity defined UI dialog. See method supplyDialogItems in [[UiLayoutDataProvider]] for supplying | ||
* properties that will be used to dynamically create and layout control in a Dialog or Widget. | ||
*/ | ||
supplyAvailableProperties() { | ||
throw (new Error("Derived UiDataProvider that want to use DialogPropertyItems must implement this method. Not for use with dynamic UI controls.")); | ||
} | ||
} | ||
@@ -52,0 +58,0 @@ exports.UiDataProvider = UiDataProvider; |
@@ -51,4 +51,4 @@ /** @packageDocumentation | ||
constructor(value: PropertyValue, property: PropertyDescription); | ||
/** Creates a copy of this PropertyRecord with a new value */ | ||
copyWithNewValue(newValue: PropertyValue): PropertyRecord; | ||
/** Creates a copy of this PropertyRecord with a new value and optionally a new PropertyDescription */ | ||
copyWithNewValue(newValue: PropertyValue, newDescription?: PropertyDescription): PropertyRecord; | ||
/** Gets this property record value children records */ | ||
@@ -55,0 +55,0 @@ getChildrenRecords(): PropertyRecord[]; |
@@ -23,5 +23,5 @@ "use strict"; | ||
} | ||
/** Creates a copy of this PropertyRecord with a new value */ | ||
copyWithNewValue(newValue) { | ||
const rec = new PropertyRecord(newValue, this.property); | ||
/** Creates a copy of this PropertyRecord with a new value and optionally a new PropertyDescription */ | ||
copyWithNewValue(newValue, newDescription) { | ||
const rec = new PropertyRecord(newValue, newDescription ? newDescription : this.property); | ||
assignMemberIfExists(rec, this, "description"); | ||
@@ -28,0 +28,0 @@ assignMemberIfExists(rec, this, "isReadonly"); |
"use strict"; | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) 2019 Bentley Systems, Incorporated. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE.md in the project root for license terms. | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
@@ -6,0 +6,0 @@ /** @packageDocumentation |
@@ -13,2 +13,3 @@ /** @packageDocumentation | ||
import { UiDataProvider } from "./dialogs/UiDataProvider"; | ||
import { DialogLayoutDataProvider } from "./dialogs/UiLayoutDataProvider"; | ||
import { BeUiEvent } from "@bentley/bentleyjs-core"; | ||
@@ -21,2 +22,23 @@ /** The Generic UI Event args contains information useful for any UI message | ||
} | ||
/** Optional props to pass to the Dialog control that is generated. | ||
* @beta | ||
*/ | ||
export interface DialogProps { | ||
/** Indicates whether the user can resize dialog with cursor. */ | ||
resizable?: boolean; | ||
/** Indicates whether the user can move dialog with cursor.*/ | ||
movable?: boolean; | ||
/** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ | ||
width?: string | number; | ||
/** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ | ||
height?: string | number; | ||
/** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ | ||
minWidth?: string | number; | ||
/** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ | ||
minHeight?: string | number; | ||
/** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ | ||
maxWidth?: string | number; | ||
/** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ | ||
maxHeight?: string | number; | ||
} | ||
/** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId. | ||
@@ -185,3 +207,14 @@ * @beta | ||
static readonly onGenericUiEvent: GenericUiEvent; | ||
/** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider. | ||
* @param _uiDataProvider The UiDataProvider for the tool settings | ||
* @param _title Specify title for dialog. | ||
* @param _isModal Specify if the dialog is opened as a modal or modeless. | ||
* @param _id Id of the dialog that is used to close it. | ||
* @param _optionalProps Optional props for Dialog construction. | ||
* @return true if the tool settings were displayed, false if the tool settings could not be displayed. | ||
*/ | ||
openDialog(_uiDataProvider: DialogLayoutDataProvider, _title: string, _isModal: boolean, _id: string, _optionalProps?: DialogProps): boolean; | ||
/** Closes the Tool Settings Ui popup. */ | ||
closeDialog(_dialogId: string): boolean; | ||
} | ||
//# sourceMappingURL=UiAdmin.d.ts.map |
@@ -196,2 +196,15 @@ "use strict"; | ||
} | ||
/** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider. | ||
* @param _uiDataProvider The UiDataProvider for the tool settings | ||
* @param _title Specify title for dialog. | ||
* @param _isModal Specify if the dialog is opened as a modal or modeless. | ||
* @param _id Id of the dialog that is used to close it. | ||
* @param _optionalProps Optional props for Dialog construction. | ||
* @return true if the tool settings were displayed, false if the tool settings could not be displayed. | ||
*/ | ||
openDialog(_uiDataProvider, _title, _isModal, _id, _optionalProps) { | ||
return false; | ||
} | ||
/** Closes the Tool Settings Ui popup. */ | ||
closeDialog(_dialogId) { return false; } | ||
} | ||
@@ -198,0 +211,0 @@ exports.UiAdmin = UiAdmin; |
{ | ||
"name": "@bentley/ui-abstract", | ||
"version": "2.8.1", | ||
"version": "2.9.0-dev.9", | ||
"description": "iModel.js UI abstractions", | ||
@@ -14,2 +14,3 @@ "main": "lib/ui-abstract.js", | ||
"scripts": { | ||
"compile": "npm run build", | ||
"copy:assets": "cpx \"./src/**/*.{*css,svg}\" ./lib && cpx \"./public/**/*\" ./lib/public", | ||
@@ -36,5 +37,5 @@ "pseudolocalize": "betools pseudolocalize --englishDir ./public/locales/en --out ./lib/public/locales/en-PSEUDO", | ||
"peerDependencies": { | ||
"@bentley/bentleyjs-core": "^2.8.1", | ||
"@bentley/geometry-core": "^2.8.1", | ||
"@bentley/imodeljs-i18n": "^2.8.1" | ||
"@bentley/bentleyjs-core": "^2.9.0-dev.9", | ||
"@bentley/geometry-core": "^2.9.0-dev.9", | ||
"@bentley/imodeljs-i18n": "^2.9.0-dev.9" | ||
}, | ||
@@ -46,7 +47,7 @@ "//devDependencies": [ | ||
"devDependencies": { | ||
"@bentley/build-tools": "2.8.1", | ||
"@bentley/eslint-plugin": "2.8.1", | ||
"@bentley/bentleyjs-core": "2.8.1", | ||
"@bentley/geometry-core": "2.8.1", | ||
"@bentley/imodeljs-i18n": "2.8.1", | ||
"@bentley/build-tools": "2.9.0-dev.9", | ||
"@bentley/eslint-plugin": "2.9.0-dev.9", | ||
"@bentley/bentleyjs-core": "2.9.0-dev.9", | ||
"@bentley/geometry-core": "2.9.0-dev.9", | ||
"@bentley/imodeljs-i18n": "2.9.0-dev.9", | ||
"@types/chai": "^4.1.4", | ||
@@ -53,0 +54,0 @@ "@types/chai-as-promised": "^7", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
643219
6730
2