Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
c87831c
extract visual editor from design page
a-b-r-o-w-n Feb 4, 2020
a857d75
bump shared packages
a-b-r-o-w-n Feb 4, 2020
794926e
add botframework-ui dependencies
a-b-r-o-w-n Feb 4, 2020
9fa9be0
extract property editor from design page
a-b-r-o-w-n Feb 4, 2020
4e07265
don't pass rootPath as a prop
a-b-r-o-w-n Feb 4, 2020
6841ec1
[wip] use adaptive form package
a-b-r-o-w-n Feb 4, 2020
ed65c06
don't hoist botframework-ui packages
a-b-r-o-w-n Feb 4, 2020
081db1e
start stubbing out sync based new shell api
a-b-r-o-w-n Feb 4, 2020
f1f8653
bump prompts plugin
a-b-r-o-w-n Feb 6, 2020
ebd8fcf
revert to using shell extension container to render new form
a-b-r-o-w-n Feb 10, 2020
c21aef7
add extension and adaptive form packages
a-b-r-o-w-n Feb 18, 2020
ae89a4d
update jest config to include display name
a-b-r-o-w-n Feb 18, 2020
e7e9592
import json and prompts plugins
a-b-r-o-w-n Feb 19, 2020
94afa9d
convert code editor to @monaco-editor package
a-b-r-o-w-n Feb 19, 2020
181536d
feat: Added select dialog ui plugin (#1)
tdurnford Feb 20, 2020
9e95ea7
render string field for expressions
a-b-r-o-w-n Feb 20, 2020
1c1fbd3
remove height transition when there is an error
a-b-r-o-w-n Feb 20, 2020
6c4e254
enable json ui plugin
a-b-r-o-w-n Feb 20, 2020
6fd633c
allow customization of $role and $kind fields
a-b-r-o-w-n Feb 20, 2020
821fbb6
[wip] begin lg editor field
a-b-r-o-w-n Feb 20, 2020
ab3eddd
fix height calculation
a-b-r-o-w-n Feb 20, 2020
453578a
fix: Set default value in StringField to an empty string (#2)
tdurnford Feb 21, 2020
361804e
use field name for lg fields
a-b-r-o-w-n Feb 21, 2020
738ec85
ignore lg lib
a-b-r-o-w-n Feb 21, 2020
2d3e203
refactor plugin config
a-b-r-o-w-n Feb 21, 2020
108c22e
clean up lg plugin dependencies
a-b-r-o-w-n Feb 21, 2020
c10a329
drop ui prefix for ui options
a-b-r-o-w-n Feb 21, 2020
28c876a
bump @types/react and @types/react-dom
a-b-r-o-w-n Feb 21, 2020
b952dd1
initial support of recognizers in plugin config
a-b-r-o-w-n Feb 21, 2020
a057cfc
initial lu ui plugin
a-b-r-o-w-n Feb 21, 2020
a6e7902
fix: Fixed object array border conflict (#3)
tdurnford Feb 24, 2020
f30eda3
[wip] start work on rendering better descriptions and help links
a-b-r-o-w-n Feb 25, 2020
bc56c5d
finish rendering description and help links
a-b-r-o-w-n Feb 25, 2020
0f4f44f
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Feb 25, 2020
f45e794
re-renable custom keybinding
a-b-r-o-w-n Feb 25, 2020
1e85d9e
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Feb 26, 2020
7ecc97a
clean up old bfcomposer monaco editor bits
a-b-r-o-w-n Feb 26, 2020
1c8bdc9
fix build errors
a-b-r-o-w-n Feb 26, 2020
f9916a9
do not enable minimap by default
a-b-r-o-w-n Feb 27, 2020
248a437
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Feb 27, 2020
bb97551
feat: Add Select Dialog Plugin
tdurnford Feb 27, 2020
374ccda
move shared types from indexers to shared
a-b-r-o-w-n Feb 27, 2020
edaf6ab
fix merge issue
a-b-r-o-w-n Feb 27, 2020
382124f
fix lint error
a-b-r-o-w-n Feb 27, 2020
1de7c32
do not compile with test files
a-b-r-o-w-n Feb 27, 2020
9cd4f9a
move prompt settings to 'Other' tab
tdurnford Feb 28, 2020
292161f
move globally hidden fields to getOrderedProperties
a-b-r-o-w-n Feb 28, 2020
2b70ca2
[wip] add ability to have multi field rows
a-b-r-o-w-n Mar 2, 2020
8549ea7
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 2, 2020
13f38e3
make sure to pass value to form rows
a-b-r-o-w-n Mar 2, 2020
bd1c50f
use json schema version 7 for base typings
a-b-r-o-w-n Mar 3, 2020
3490c62
add one of field
a-b-r-o-w-n Mar 3, 2020
3606d1e
begin work on expression editor
a-b-r-o-w-n Mar 5, 2020
34cc5ee
update prompt plugin to use json schema v 7
a-b-r-o-w-n Mar 5, 2020
32ff73c
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 5, 2020
0150c25
feat: Updated FormRow to support multiple fields in a row
a-b-r-o-w-n Mar 5, 2020
2bafb1a
fix problem with yarn install
a-b-r-o-w-n Mar 5, 2020
23bb96b
bump react versions
a-b-r-o-w-n Mar 5, 2020
11e164e
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 6, 2020
6ca4e2e
fix merge conflicts
a-b-r-o-w-n Mar 6, 2020
0e001b2
correctly hide placeholder in code editor
a-b-r-o-w-n Mar 9, 2020
85d433a
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 9, 2020
6adfe6d
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 10, 2020
5d7d971
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 10, 2020
7df26ab
remove inline recognizer editor
a-b-r-o-w-n Mar 10, 2020
49d08db
remove select intent plugin
a-b-r-o-w-n Mar 10, 2020
2fbcde9
add key to editor to force remounting
a-b-r-o-w-n Mar 10, 2020
58a417e
handle type and oneOf expression schemas
a-b-r-o-w-n Mar 10, 2020
aba843f
port inline luis intent editor
a-b-r-o-w-n Mar 10, 2020
303b8b6
memoize initial value
a-b-r-o-w-n Mar 10, 2020
42db4cf
rename lu plugin to luis
a-b-r-o-w-n Mar 10, 2020
414fa7a
port regex intent editor
a-b-r-o-w-n Mar 10, 2020
81f8762
fix: Moved type selector to be inline with label (#7)
tdurnford Mar 11, 2020
e2b7d7f
fix: Fixed warning related to link navigation styling (#8)
tdurnford Mar 12, 2020
594d80e
rename handleChange to handleRecognizerChange
a-b-r-o-w-n Mar 11, 2020
6511700
add method to recognizer config to determine if selected
a-b-r-o-w-n Mar 12, 2020
b6f1b8e
refactor code editors to not have dependency on monaco-editor package…
a-b-r-o-w-n Mar 12, 2020
3b655f2
downgrade monaco-languageclient
a-b-r-o-w-n Mar 12, 2020
a54ff54
export OnInit type
a-b-r-o-w-n Mar 12, 2020
32479b8
clean up monaco dependencies
a-b-r-o-w-n Mar 12, 2020
469aa24
update sample schema
a-b-r-o-w-n Mar 12, 2020
0b68787
render all other fields on single row
a-b-r-o-w-n Mar 12, 2020
bdde39f
render json editor with selected schema for complex types
a-b-r-o-w-n Mar 12, 2020
25e3679
feat: Added custom array field for set properties
tdurnford Mar 13, 2020
656b09c
feat: Added stackArrayItems to UiOptions
tdurnford Mar 13, 2020
3486baf
fix: Fixed array item borders
tdurnford Mar 13, 2020
784d1fb
add designerId to ShellData
a-b-r-o-w-n Mar 13, 2020
21d7fbf
feat: Updated ObjectArrayField to display complex arrays in a stacked…
tdurnford Mar 13, 2020
8e93384
fix: Filtered object array properties to reflect ui order
tdurnford Mar 13, 2020
8fb3acb
removed console.log
tdurnford Mar 13, 2020
2cdd62c
fix: Fixed ExpressionField flicker
tdurnford Mar 14, 2020
be76d59
feat: Added add button for stacked array items
tdurnford Mar 14, 2020
fe56297
add schema prop to json editor
a-b-r-o-w-n Mar 16, 2020
c06a2d5
updated defautUiSchema.ts
tdurnford Mar 16, 2020
ed52c00
register schemas on a per-model basis
a-b-r-o-w-n Mar 17, 2020
173206b
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 17, 2020
9ec33d8
fix merge build issue
a-b-r-o-w-n Mar 17, 2020
a538ef5
trigger intent field change when editor changes
a-b-r-o-w-n Mar 17, 2020
ee2b350
fix: Added 'expression' to expression type dropdown.
tdurnford Mar 17, 2020
88c00c0
add disabled item actions for new array item
a-b-r-o-w-n Mar 17, 2020
092b20b
reduce height of lg field
a-b-r-o-w-n Mar 17, 2020
e1674d7
pass raw errors to schema field child
a-b-r-o-w-n Mar 17, 2020
91dbe93
plumb errors through the prompt form
a-b-r-o-w-n Mar 18, 2020
49227bd
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 18, 2020
55b169d
fix array item styles when an error is present
a-b-r-o-w-n Mar 18, 2020
dd65674
use label overrides from ConceptLabels in form title
a-b-r-o-w-n Mar 19, 2020
a81b5e7
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 19, 2020
f231106
pass project id to lg editor
a-b-r-o-w-n Mar 19, 2020
a534746
fix: Added 'expression' to type selector
tdurnford Mar 18, 2020
9e13f4f
implement arrayitem wrapper for array fields
a-b-r-o-w-n Mar 19, 2020
23156c4
fix: Added helpLinks to defaultUiSchema
tdurnford Mar 19, 2020
01147f7
add useArrayItems hook for array fields
a-b-r-o-w-n Mar 19, 2020
0a043bc
fix: Added 'expression' to type selector
tdurnford Mar 18, 2020
a2f726b
fix: added 'expression' to type dropdown
tdurnford Mar 19, 2020
1fc672c
fix: combined 'selectedSchema' and 'selectedKey' into 'selectedOption'
tdurnford Mar 19, 2020
ab3e029
feat: Added inline lu to prompts
tdurnford Mar 20, 2020
b6ffff6
do not override descriptions for prompt fields
a-b-r-o-w-n Mar 19, 2020
5385350
fix array item usage
a-b-r-o-w-n Mar 19, 2020
6ba5d5d
support expression fields with object properties
a-b-r-o-w-n Mar 20, 2020
d8025ba
add subtitle to uiSchema
a-b-r-o-w-n Mar 20, 2020
4e5826a
add titles to choices and confirmChoices
a-b-r-o-w-n Mar 20, 2020
5c70ef3
do not use label overrides in form title
a-b-r-o-w-n Mar 20, 2020
715611a
[wip] use schema field to render all input fields
a-b-r-o-w-n Mar 20, 2020
bc0d8c9
update ui schema
a-b-r-o-w-n Mar 20, 2020
7a5cd5b
correctly set selected option
a-b-r-o-w-n Mar 20, 2020
b5693dd
fix: fixed array item styles
tdurnford Mar 22, 2020
99eb67b
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 23, 2020
345a093
feat: added formatData to uiOptions
tdurnford Mar 23, 2020
5953215
fix: Added formatData to ObjectArrayField
tdurnford Mar 23, 2020
2c92843
default to correct type in expression editor
a-b-r-o-w-n Mar 23, 2020
36fd54d
start case the fallback labels
a-b-r-o-w-n Mar 23, 2020
21abbf0
allow labels for objects with properties
a-b-r-o-w-n Mar 23, 2020
4a450f5
combine choice input and confirm input components
a-b-r-o-w-n Mar 23, 2020
a32ffc5
handle enum expressions
a-b-r-o-w-n Mar 23, 2020
8a1ff9e
feat: Removed formatData in favor of serializer
tdurnford Mar 23, 2020
8c2da95
fix: Fixed serializer labeling
tdurnford Mar 23, 2020
9b19f40
Merge branch 'master' into feature/adaptive-form
tdurnford Mar 23, 2020
65966fb
Updated jest.config.js
tdurnford Mar 24, 2020
b495a6d
fix: fixed recognizer in prompts
tdurnford Mar 24, 2020
90cf861
fix: fixed getSelectedOption returning expression option for strings
tdurnford Mar 24, 2020
7be5b8d
fix unit tests
a-b-r-o-w-n Mar 24, 2020
9b8bb8c
Removed select intent
tdurnford Mar 24, 2020
42a6b00
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 24, 2020
318367f
Fixed luis handleRecognizerChange method
tdurnford Mar 24, 2020
aa1b193
Merge remote-tracking branch 'origin/feature/adaptive-form' into feat…
a-b-r-o-w-n Mar 24, 2020
4a4ced9
fix merge issue
a-b-r-o-w-n Mar 24, 2020
39b45d2
fixed error message displaying next to field in an array
tdurnford Mar 24, 2020
b2e4ca5
removed kindSchema comments
tdurnford Mar 24, 2020
ff35efa
update error message when recognizer can't be determined
a-b-r-o-w-n Mar 24, 2020
c4e1511
add testid to expression dropdown
a-b-r-o-w-n Mar 24, 2020
1eb8236
fix todo spec
a-b-r-o-w-n Mar 24, 2020
eaa6d54
fix notifications page spec
a-b-r-o-w-n Mar 24, 2020
cf76ccd
remove obiformeditor package
a-b-r-o-w-n Mar 24, 2020
f88b0c8
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 24, 2020
404ea09
fix new LGTM alerts
a-b-r-o-w-n Mar 24, 2020
468e06f
incorporate locale when setting lg file name
a-b-r-o-w-n Mar 25, 2020
4f0cf9a
fix selecting correct lu file with locale
a-b-r-o-w-n Mar 25, 2020
f65210f
sync data with shell to support undo/redo
a-b-r-o-w-n Mar 25, 2020
65cf8de
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 25, 2020
ef183f6
update oneOf field to handle array of types
a-b-r-o-w-n Mar 25, 2020
15247cd
do not use transparent border for one of fields
a-b-r-o-w-n Mar 25, 2020
ed09caf
do not have transparent border for expression editor
a-b-r-o-w-n Mar 25, 2020
fa78ee4
fix: Fixed dropdownWidth in expressions
tdurnford Mar 25, 2020
c54cf79
fix: Fixed inline array styling
tdurnford Mar 25, 2020
a8630c9
fix: removed unused variable
tdurnford Mar 25, 2020
34363c9
fix: Fixed lint issue
tdurnford Mar 25, 2020
27532bc
get localize lu file for inline intent editor
a-b-r-o-w-n Mar 25, 2020
b61c12e
fix: Fixed error rendering issue
tdurnford Mar 25, 2020
e9ba4c9
fix: Fixed schema field styles
tdurnford Mar 26, 2020
06f852f
Merge branch 'master' into feature/adaptive-form
a-b-r-o-w-n Mar 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Composer/.eslintrc.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
plugins: ['react-hooks', 'format-message', 'emotion'],
settings: {
react: {
version: '16.9.0',
version: '16.9.16',
},
},
parserOptions: {
Expand Down
2 changes: 1 addition & 1 deletion Composer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Composer is managed via yarn workspaces, producing such a folder layout.
|- server // composer api server
|- extensions
|- package.json // put all extension as one package
|- obiformeditor // dialog property editor
|- adaptive-form // dialog property editor
|- lib
|- shared // shared code
```
Expand Down
8 changes: 7 additions & 1 deletion Composer/cypress/integration/NotificationPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ context('Notification Page', () => {

cy.withinEditor('FormEditor', () => {
cy.findByText('Condition').should('exist');
cy.get('.ObjectItem input').type('()');
cy.findByTestId('expression-type-dropdown-Condition')
.focus()
.type('{downarrow}')
.should('contain.text', 'expression');
cy.get('#root\\.condition')
.click()
.type('()');
});

cy.get('[data-testid="notifications-info-button"]').click();
Expand Down
1 change: 1 addition & 0 deletions Composer/cypress/integration/ToDoBot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ context('ToDo Bot', () => {
before(() => {
cy.visit(Cypress.env('COMPOSER_URL'));
cy.createBot('TodoSample');
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000);
});

Expand Down
1 change: 1 addition & 0 deletions Composer/cypress/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ beforeEach(() => {
});

after(() => {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.exec('yarn test:integration:clean');
});
11 changes: 9 additions & 2 deletions Composer/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,18 @@ module.exports = {
testPathIgnorePatterns: ['/node_modules/', '/scripts/', '/jestMocks/', '__tests__/setup.(j|t)s', '/cypress/'],
projects: [
'<rootDir>/packages/client',
'<rootDir>/packages/server',
'<rootDir>/packages/extensions/obiformeditor',
'<rootDir>/packages/extensions/adaptive-form',
'<rootDir>/packages/extensions/extension',
'<rootDir>/packages/extensions/visual-designer',
'<rootDir>/packages/lib/code-editor',
'<rootDir>/packages/lib/shared',
'<rootDir>/packages/server',
'<rootDir>/packages/tools/language-servers/language-generation',
'<rootDir>/packages/ui-plugins/expressions',
'<rootDir>/packages/ui-plugins/json',
'<rootDir>/packages/ui-plugins/lg',
'<rootDir>/packages/ui-plugins/luis',
'<rootDir>/packages/ui-plugins/prompts',
'<rootDir>/packages/ui-plugins/select-dialog',
],
};
8 changes: 5 additions & 3 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "MIT",
"private": true,
"resolutions": {
"@types/react": "16.9.0"
"@types/react": "16.9.23"
},
"engines": {
"node": ">=12"
Expand All @@ -17,14 +17,15 @@
"packages/lib/*",
"packages/tools",
"packages/tools/language-servers",
"packages/tools/language-servers/*"
"packages/tools/language-servers/*",
"packages/ui-plugins/*"
],
"scripts": {
"build": "node scripts/update.js && node scripts/begin.js && yarn build:prod && yarn build:plugins",
"build:prod": "yarn build:dev && yarn build:server && yarn build:client",
"build:dev": "yarn build:lib && yarn build:tools && yarn build:extensions && yarn build:plugins",
"build:lib": "yarn workspace @bfc/libs build:all",
"build:extensions": "yarn workspace @bfc/extensions build:all",
"build:extensions": "wsrun -lt -p @bfc/extension @bfc/adaptive-form @bfc/visual-designer @bfc/ui-plugin-* -c build",
"build:server": "yarn workspace @bfc/server build",
"build:client": "yarn workspace @bfc/client build",
"build:tools": "yarn workspace @bfc/tools build:all",
Expand Down Expand Up @@ -71,6 +72,7 @@
"@cypress/webpack-preprocessor": "^4.1.1",
"@emotion/babel-preset-css-prop": "^10.0.17",
"@testing-library/cypress": "^5.2.1",
"@types/jest": "^25.1.3",
"@typescript-eslint/eslint-plugin": "2.10.0",
"@typescript-eslint/parser": "2.10.0",
"babel-jest": "24.0.0",
Expand Down
5 changes: 0 additions & 5 deletions Composer/packages/client/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeM
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const MonacoWebpackPlugin = require('@bfcomposer/monaco-editor-webpack-plugin');

const getClientEnvironment = require('./env');
const paths = require('./paths');
Expand Down Expand Up @@ -404,10 +403,6 @@ module.exports = function(webpackEnv) {
],
},
plugins: [
new MonacoWebpackPlugin({
// available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
languages: ['markdown', 'json'],
}),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin(
Object.assign(
Expand Down
10 changes: 9 additions & 1 deletion Composer/packages/client/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// eslint-disable-next-line
const path = require('path');
module.exports = {
displayName: 'client',
preset: 'ts-jest/presets/js-with-ts',
// transform: {
// '^.+\\.tsx?$': 'ts-jest',
Expand All @@ -19,7 +20,14 @@ module.exports = {

'^@src/(.*)$': '<rootDir>/src/$1',
},
testPathIgnorePatterns: ['/node_modules/', '/jestMocks/', '/testUtils/', '__tests__/setupTests.ts', '.*\\.d\\.ts'],
testPathIgnorePatterns: [
'/node_modules/',
'/jestMocks/',
'__mocks__',
'/testUtils/',
'__tests__/setupTests.ts',
'.*\\.d\\.ts',
],
// Some node modules are packaged and distributed in a non-transpiled form
// (ex. contain import & export statements); and Jest won't be able to
// understand them because node_modules aren't transformed by default. So
Expand Down
24 changes: 17 additions & 7 deletions Composer/packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@
},
"proxy": "http://localhost:5000",
"dependencies": {
"@bfc/adaptive-form": "*",
"@bfc/code-editor": "*",
"@bfc/extensions": "*",
"@bfc/extension": "*",
"@bfc/indexers": "*",
"@bfc/shared": "*",
"@bfc/ui-plugin-expressions": "*",
"@bfc/ui-plugin-json": "*",
"@bfc/ui-plugin-lg": "*",
"@bfc/ui-plugin-luis": "*",
"@bfc/ui-plugin-prompts": "*",
"@bfc/ui-plugin-select-dialog": "*",
"@bfc/visual-designer": "*",
"@emotion/core": "^10.0.7",
"@microsoft/bf-lu": "^4.9.0-preview.115707",
"@reach/router": "^1.2.1",
"@uifabric/fluent-theme": "^7.1.13",
"@uifabric/icons": "^7.3.4",
"@uifabric/styling": "^7.10.4",
"adaptive-expressions": "^4.8.0-preview-110700",
"axios": "^0.18.0",
"botbuilder-lg": "^4.8.0-preview-109324",
Expand All @@ -31,13 +42,13 @@
"jwt-decode": "^2.2.0",
"lodash": "^4.17.15",
"nanoid": "^2.1.6",
"office-ui-fabric-react": "7.37.1",
"office-ui-fabric-react": "^7.88.1",
"prop-types": "^15.7.2",
"query-string": "^6.8.2",
"react": "16.9.0",
"react": "16.13.0",
"react-app-polyfill": "^0.2.1",
"react-dev-utils": "^7.0.3",
"react-dom": "16.9.0",
"react-dom": "16.13.0",
"react-frame-component": "^4.0.2",
"react-timeago": "^4.4.0",
"styled-components": "^4.1.3"
Expand All @@ -56,15 +67,14 @@
"@babel/preset-env": "7.3.0",
"@babel/preset-react": "7.0.0",
"@babel/runtime": "7.3.4",
"@bfcomposer/monaco-editor-webpack-plugin": "^1.7.2",
"@emotion/babel-preset-css-prop": "^10.0.14",
"@svgr/webpack": "4.1.0",
"@types/jest": "^24.0.16",
"@types/jwt-decode": "^2.2.1",
"@types/lodash": "^4.14.146",
"@types/reach__router": "^1.2.4",
"@types/react": "16.9.0",
"@types/react-dom": "16.9.0",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "24.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const dropdown: Partial<IDropdownStyles> = {
subComponentStyles: {
label: textFieldlabel,
panel: {},
multiSelectItem: {},
},
// root: [
// {
Expand Down
4 changes: 3 additions & 1 deletion Composer/packages/client/src/ShellApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export const ShellApi: React.FC = () => {
return {} as ShellData;
}

const data = getData(sourceWindow);
return {
data: getData(sourceWindow),
data,
locale,
botName,
projectId,
Expand All @@ -108,6 +109,7 @@ export const ShellApi: React.FC = () => {
luFiles,
currentDialog,
dialogId,
designerId: get(data, '$designer.id'),
focusedEvent: selected,
focusedActions: focused ? [focused] : [],
focusedSteps: focused ? [focused] : selected ? [selected] : [],
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/src/TestController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Spinner, SpinnerSize } from 'office-ui-fabric-react/lib/Spinner';
import { Callout } from 'office-ui-fabric-react/lib/Callout';
import { Stack } from 'office-ui-fabric-react/lib/Stack';
import formatMessage from 'format-message';
import { DiagnosticSeverity, Diagnostic } from '@bfc/indexers';
import { DiagnosticSeverity, Diagnostic } from '@bfc/shared';

import settingsStorage from './utils/dialogSettingStorage';
import { StoreContext } from './store';
Expand Down
17 changes: 8 additions & 9 deletions Composer/packages/client/src/components/NavItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { useCallback, useContext, useState } from 'react';
import { Link, LinkGetProps } from '@reach/router';
import { useCallback, useContext } from 'react';
import { Link } from '@reach/router';
import { CommandBarButton } from 'office-ui-fabric-react/lib/Button';

import { StoreContext } from '../../store';
import { useLocation } from '../../utils/hooks';

import { link, outer, commandBarButton } from './styles';

Expand All @@ -31,20 +32,18 @@ export const NavItem: React.FC<INavItemProps> = props => {
actions: { onboardingAddCoachMarkRef },
} = useContext(StoreContext);

const { to, exact, iconName, labelName, disabled } = props;
const [active, setActive] = useState(false);
const { to, iconName, labelName, disabled } = props;
const {
location: { pathname },
} = useLocation();
const active = pathname.startsWith(to);

const addRef = useCallback(ref => onboardingAddCoachMarkRef({ [`nav${labelName.replace(' ', '')}`]: ref }), []);

return (
<Link
to={to}
css={link(active, disabled)}
getProps={(props: LinkGetProps) => {
const isActive = exact ? props.isCurrent : props.isPartiallyCurrent;
setActive(isActive);
return {};
}}
data-testid={'LeftNav-CommandBarButton' + labelName}
aria-disabled={disabled}
aria-label={labelName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import { Stack } from 'office-ui-fabric-react/lib/Stack';
import { IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';
import { Dropdown } from 'office-ui-fabric-react/lib/Dropdown';
import { TextField } from 'office-ui-fabric-react/lib/TextField';
import { DialogInfo, luIndexer, combineMessage } from '@bfc/indexers';
import { luIndexer, combineMessage } from '@bfc/indexers';
import get from 'lodash/get';
import { DialogInfo } from '@bfc/shared';
import { LuEditor } from '@bfc/code-editor';

import {
Expand Down Expand Up @@ -265,7 +266,7 @@ export const TriggerCreationModal: React.FC<TriggerCreationModalProps> = props =
<LuEditor
onChange={onTriggerPhrasesChange}
value={formData.triggerPhrases}
errorMsg={formData.errors.triggerPhrases}
errorMessage={formData.errors.triggerPhrases}
hidePlaceholder={true}
luOption={{
projectId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { SearchBox } from 'office-ui-fabric-react/lib/SearchBox';
import { IIconProps } from 'office-ui-fabric-react/lib/Icon';
import cloneDeep from 'lodash/cloneDeep';
import formatMessage from 'format-message';
import { DialogInfo, ITrigger } from '@bfc/indexers';
import { DialogInfo, ITrigger } from '@bfc/shared';

import { StoreContext } from '../../store';
import { createSelectedPath, getFriendlyName } from '../../utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Licensed under the MIT License.

// this is currently hard-coded here
import FormEditor from '@bfc/extensions/obiformeditor';
import VisualDesigner from '@bfc/extensions/visual-designer';
import VisualDesigner from '@bfc/visual-designer';
import AdaptiveForm from '@bfc/adaptive-form';

const getEditor = (): typeof VisualDesigner | typeof FormEditor | null => {
const getEditor = (): typeof VisualDesigner | typeof AdaptiveForm | null => {
// i'm now more towarding pick editor based on name, not data
// because we want shell to totally control file read/save
// which means each editor cann't be differiante by data
Expand All @@ -14,7 +14,7 @@ const getEditor = (): typeof VisualDesigner | typeof FormEditor | null => {
}

if (window.name === 'FormEditor') {
return FormEditor;
return AdaptiveForm;
}
return null;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import React, { useState, useEffect } from 'react';
import { initializeIcons } from '@uifabric/icons';
import { ShellData, ShellApi } from '@bfc/shared';
import Extension from '@bfc/extension';

import ApiClient from '../messenger/ApiClient';

import getEditor from './EditorMap';
import plugins from './plugins';

import './extensionContainer.css';

Expand Down Expand Up @@ -181,7 +183,21 @@ function ExtensionContainer() {

const RealEditor = shellData.data ? getEditor() : null;

return RealEditor && <RealEditor {...shellData} onChange={shellApi.saveData} shellApi={shellApi} />;
return (
RealEditor && (
<Extension shell={shellApi} shellData={shellData}>
<RealEditor
key={shellData.focusPath}
{...shellData}
onChange={shellApi.saveData}
shellApi={shellApi}
formData={shellData.data}
plugins={plugins}
schema={shellData.schemas?.sdk?.content}
/>
</Extension>
)
);
}

export default ExtensionContainer;
10 changes: 10 additions & 0 deletions Composer/packages/client/src/extension-container/plugins.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import json from '@bfc/ui-plugin-json';
import expressions from '@bfc/ui-plugin-expressions';
import prompts from '@bfc/ui-plugin-prompts';
import selectDialog from '@bfc/ui-plugin-select-dialog';
import lg from '@bfc/ui-plugin-lg';
import lu from '@bfc/ui-plugin-luis';

export default [json, prompts, selectDialog, lg, lu, expressions];
Loading