-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix builder bug * update PlsPlusAddress * fix duplication issue * update package version * update webpack and add binary assets
- Loading branch information
Showing
8 changed files
with
11,753 additions
and
14,457 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
Large diffs are not rendered by default.
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
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,22 +1,77 @@ | ||
import "core-js/stable"; | ||
import "regenerator-runtime/runtime"; | ||
import buildOptions from "./options/build.options"; | ||
import { getComponents } from "./utils/getComponents"; | ||
import * as components from "./components"; | ||
import templates from "./templates"; | ||
import providers from "./providers"; | ||
import { getComponents } from "./utils/getComponents"; | ||
|
||
const components = typeof Formio !== "undefined" ? require("./components") : {}; | ||
Formio.use({ | ||
components: getComponents(components), | ||
templates, | ||
providers, | ||
options: buildOptions, | ||
}); | ||
|
||
// let waitCount = 0; | ||
|
||
// const wait = (props) => { | ||
// const { | ||
// condition, | ||
// callback, | ||
// interval = 100, | ||
// timeout = 10000, | ||
// timeoutCallback, | ||
// } = props; | ||
// waitCount += interval; | ||
// if (typeof condition() !== "undefined") { | ||
// callback(); | ||
// } else if (timeout && waitCount >= timeout) { | ||
// timeoutCallback(); | ||
// } else { | ||
// setTimeout(() => { | ||
// wait(props); | ||
// }, interval); | ||
// } | ||
// }; | ||
|
||
if (typeof Formio !== "undefined") { | ||
// loop through the component folder index.js and add components to Formio for renderer and builder | ||
Formio.use({ | ||
components: getComponents(components), | ||
templates, | ||
providers, | ||
options: buildOptions, | ||
}); | ||
} else { | ||
console.warn( | ||
"qg-formio.js requires Formio script included in this page. Please refer to https://qld-gov-au.github.io/formio/?path=/docs/welcome--page for usage." | ||
); | ||
} | ||
// wait({ | ||
// condition: () => { | ||
// return Formio; | ||
// }, | ||
// callback: async () => { | ||
// const [ | ||
// componentsModule, | ||
// templatesModule, | ||
// providersModule, | ||
// getComponentsModule, | ||
// ] = await Promise.all([ | ||
// import("./components"), | ||
// import("./templates"), | ||
// import("./providers"), | ||
// import("./utils/getComponents"), | ||
// ]); | ||
// const { ...components } = componentsModule; | ||
// const templates = templatesModule.default; | ||
// const providers = providersModule.default; | ||
// const { getComponents } = getComponentsModule; | ||
// console.log( | ||
// "test444", | ||
// Formio, | ||
// getComponents(components), | ||
// templates, | ||
// providers | ||
// ); | ||
// Formio.use({ | ||
// components: getComponents(components), | ||
// templates, | ||
// providers, | ||
// options: buildOptions, | ||
// }); | ||
// }, | ||
// timeoutCallback: () => { | ||
// console.warn( | ||
// "formio.full.min.js requires Formio script included in this page. Please refer to https://qld-gov-au.github.io/formio/?path=/docs/welcome--page for usage." | ||
// ); | ||
// }, | ||
// }); |
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