-
Notifications
You must be signed in to change notification settings - Fork 837
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/vue3
- Loading branch information
Showing
169 changed files
with
5,487 additions
and
2,448 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
build-scripts/survey-core/tsconfig.plugins.bootstrap.theme.typing.json
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,31 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "es2015", | ||
"lib": [ | ||
"DOM", | ||
"ES5", | ||
"ES2015.Promise", | ||
"es6" | ||
], | ||
"baseUrl": ".", | ||
"paths": { | ||
"survey-core": [ | ||
"../../build/survey-core" | ||
] | ||
}, | ||
"sourceMap": false, | ||
"noImplicitAny": false, | ||
"importHelpers": false, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"skipLibCheck": true, | ||
"outFile": "../../build/survey-core/plugins/bootstrap-integration.d.ts" | ||
}, | ||
"include": [ | ||
"../../src/plugins/themes/bootstrap/index.ts" | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
build-scripts/survey-core/tsconfig.plugins.bootstrapmaterial.theme.typing.json
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,31 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "es2015", | ||
"lib": [ | ||
"DOM", | ||
"ES5", | ||
"ES2015.Promise", | ||
"es6" | ||
], | ||
"baseUrl": ".", | ||
"paths": { | ||
"survey-core": [ | ||
"../../build/survey-core" | ||
] | ||
}, | ||
"sourceMap": false, | ||
"noImplicitAny": false, | ||
"importHelpers": false, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"skipLibCheck": true, | ||
"outFile": "../../build/survey-core/plugins/bootstrap-material-integration.d.ts" | ||
}, | ||
"include": [ | ||
"../../src/plugins/themes/bootstrapmaterial/index.ts" | ||
] | ||
} |
38 changes: 38 additions & 0 deletions
38
build-scripts/survey-core/webpack.plugins.bootstrap.config.js
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,38 @@ | ||
"use strict"; | ||
|
||
const webpackCommonConfigCreator = require("../webpack.common"); | ||
const { merge } = require("webpack-merge"); | ||
var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); | ||
const DtsGeneratorPlugin = require("../webpack-dts-generator"); | ||
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | ||
var path = require("path"); | ||
|
||
const config = { | ||
entry: { | ||
["bootstrap-integration"]: path.resolve(__dirname, "../../src/plugins/themes/bootstrap/index.ts"), | ||
}, | ||
plugins: [new FixStyleOnlyEntriesPlugin()], | ||
externals: { | ||
"survey-core": { | ||
root: "Survey", | ||
commonjs2: "survey-core", | ||
commonjs: "survey-core", | ||
amd: "survey-core" | ||
} | ||
} | ||
}; | ||
|
||
module.exports = function (options) { | ||
options.platform = ""; | ||
options.libraryName = "SurveyBootstrap"; | ||
if (options.buildType !== "prod") { | ||
config.plugins.push(new DtsGeneratorPlugin({ | ||
tsConfigPath: "./build-scripts/survey-core/tsconfig.plugins.bootstrap.theme.typing.json", | ||
filePath: "build/survey-core/plugins/bootstrap-integration.d.ts", | ||
moduleName: "survey-core/plugins/bootstrap-integration", | ||
importName: "bootstrap/index" | ||
})); | ||
} | ||
|
||
return merge(webpackCommonConfigCreator(options, { "name": "survey-plugins" }, "survey.plugins", "survey-core/plugins"), config); | ||
}; |
38 changes: 38 additions & 0 deletions
38
build-scripts/survey-core/webpack.plugins.bootstrap.material.config.js
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,38 @@ | ||
"use strict"; | ||
|
||
const webpackCommonConfigCreator = require("../webpack.common"); | ||
const { merge } = require("webpack-merge"); | ||
var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); | ||
const DtsGeneratorPlugin = require("../webpack-dts-generator"); | ||
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | ||
var path = require("path"); | ||
|
||
const config = { | ||
entry: { | ||
["bootstrap-material-integration"]: path.resolve(__dirname, "../../src/plugins/themes/bootstrapmaterial/index.ts"), | ||
}, | ||
plugins: [new FixStyleOnlyEntriesPlugin()], | ||
externals: { | ||
"survey-core": { | ||
root: "Survey", | ||
commonjs2: "survey-core", | ||
commonjs: "survey-core", | ||
amd: "survey-core" | ||
} | ||
} | ||
}; | ||
|
||
module.exports = function (options) { | ||
options.platform = ""; | ||
options.libraryName = "SurveyBootstrapMaterial"; | ||
if (options.buildType !== "prod") { | ||
config.plugins.push(new DtsGeneratorPlugin({ | ||
tsConfigPath: "./build-scripts/survey-core/tsconfig.plugins.bootstrapmaterial.theme.typing.json", | ||
filePath: "build/survey-core/plugins/bootstrap-material-integration.d.ts", | ||
moduleName: "survey-core/plugins/bootstrap-material-integration", | ||
importName: "bootstrapmaterial/index" | ||
})); | ||
} | ||
|
||
return merge(webpackCommonConfigCreator(options, { "name": "survey-plugins" }, "survey.plugins", "survey-core/plugins"), config); | ||
}; |
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,32 @@ | ||
function CamelCaseNamePlugin(options) {} | ||
|
||
function capitalizeFirstLetter(string) { | ||
return string.charAt(0).toUpperCase() + string.slice(1); | ||
} | ||
|
||
CamelCaseNamePlugin.prototype.apply = function (compiler) { | ||
const REGEXP_NAME = /\[camelname\]/gi; | ||
|
||
compiler.hooks.compilation.tap("RemoveCoreFromNamePlugin", (compilation) => { | ||
const mainTemplate = compilation.mainTemplate; | ||
|
||
mainTemplate.hooks.assetPath.tap( | ||
"CamelCaseNamePlugin", | ||
(path, data) => { | ||
const chunk = data.chunk; | ||
const chunkName = chunk && (chunk.name || chunk.id); | ||
|
||
if (typeof path === "function") { | ||
path = path(data); | ||
} | ||
|
||
return path.replace(REGEXP_NAME, (match, ...args) => { | ||
const parts = chunkName.split("-"); | ||
return parts.map(function(part) { return capitalizeFirstLetter(part) }).join(""); | ||
}); | ||
} | ||
); | ||
}); | ||
}; | ||
|
||
module.exports = CamelCaseNamePlugin; |
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
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
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
4 changes: 2 additions & 2 deletions
4
examples/angular-ui/src/app/components/test/test.component.html
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div id="surveyElement"> | ||
<popup-survey *ngIf="!!model && isPopup" [model]="model"></popup-survey> | ||
<survey *ngIf="!!model && !isPopup" [model]="model"></survey></div> | ||
<popup-survey *ngIf="!!model && isPopup" [model]="$any(model)"></popup-survey> | ||
<survey *ngIf="!!model && !isPopup" [model]="$any(model)"></survey></div> | ||
<div id="surveyResultElement"></div> |
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
This file was deleted.
Oops, something went wrong.
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
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
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,4 @@ | ||
function init() { | ||
Survey.StylesManager.applyTheme("default"); | ||
} | ||
document.addEventListener("DOMContentLoaded", init); |
Oops, something went wrong.