@kontur.candy/generator 6.35.0 → 6.36.0-vite-bundler.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -132875,8 +132875,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132875
132875
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ "path");
|
|
132876
132876
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
132877
132877
|
/* harmony import */ var _GetWebEntry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GetWebEntry */ "./Generator/src/generators/FormSourcesBuilder/GetWebEntry.ts");
|
|
132878
|
-
/* harmony import */ var _GetWebJsContent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GetWebJsContent */ "./Generator/src/generators/FormSourcesBuilder/GetWebJsContent.ts");
|
|
132879
|
-
|
|
132880
132878
|
|
|
132881
132879
|
|
|
132882
132880
|
class FormSourcesBuilder {
|
|
@@ -132905,8 +132903,7 @@ class FormSourcesBuilder {
|
|
|
132905
132903
|
}
|
|
132906
132904
|
buildSources(gfv, resourcesHash) {
|
|
132907
132905
|
const formContent = {};
|
|
132908
|
-
formContent["web.js"] = (0,
|
|
132909
|
-
formContent["webEntry.js"] = (0,_GetWebEntry__WEBPACK_IMPORTED_MODULE_1__.getWebEntry)(gfv, resourcesHash);
|
|
132906
|
+
formContent["web.js"] = (0,_GetWebEntry__WEBPACK_IMPORTED_MODULE_1__.getWebEntry)(gfv, resourcesHash);
|
|
132910
132907
|
for (const [filename, content] of this.serverSideResources.entries()) {
|
|
132911
132908
|
formContent[filename] = content;
|
|
132912
132909
|
}
|
|
@@ -132921,7 +132918,7 @@ class FormSourcesBuilder {
|
|
|
132921
132918
|
}
|
|
132922
132919
|
const resourcesExports = this.buildResourcesExports();
|
|
132923
132920
|
formContent["resources/index.js"] = resourcesExports;
|
|
132924
|
-
formContent["components/index.js"] = 'export Form from "./Form"\n';
|
|
132921
|
+
formContent["components/index.js"] = 'export { default as Form } from "./Form"\n';
|
|
132925
132922
|
return formContent;
|
|
132926
132923
|
}
|
|
132927
132924
|
buildResourcesExports() {
|
|
@@ -132930,7 +132927,7 @@ class FormSourcesBuilder {
|
|
|
132930
132927
|
for (const [filename] of this.resources.entries()) {
|
|
132931
132928
|
if (filename.endsWith(".js")) {
|
|
132932
132929
|
const fileNameWithoutExtension = filename.replace(".js", "");
|
|
132933
|
-
resourcesExports.push(`export ${fileNameWithoutExtension} from './${fileNameWithoutExtension}'`);
|
|
132930
|
+
resourcesExports.push(`export { default as ${fileNameWithoutExtension} } from './${fileNameWithoutExtension}'`);
|
|
132934
132931
|
} else if (filename.endsWith(".less")) {
|
|
132935
132932
|
resourcesImports.push(`import './${filename}'`);
|
|
132936
132933
|
}
|
|
@@ -132958,8 +132955,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132958
132955
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
132959
132956
|
/* harmony export */ getWebEntry: () => (/* binding */ getWebEntry)
|
|
132960
132957
|
/* harmony export */ });
|
|
132961
|
-
|
|
132962
|
-
return `import {
|
|
132958
|
+
const getWebEntry = (gfv, resourcesHash) => `import {
|
|
132963
132959
|
dataDeclaration,
|
|
132964
132960
|
calculationFunctions,
|
|
132965
132961
|
validationFunctions,
|
|
@@ -132975,7 +132971,7 @@ function getWebEntry(gfv, resourcesHash) {
|
|
|
132975
132971
|
import { Form } from './components'
|
|
132976
132972
|
|
|
132977
132973
|
const gfv = '${gfv}'
|
|
132978
|
-
const resourcesHash = ${
|
|
132974
|
+
const resourcesHash = '${resourcesHash}'
|
|
132979
132975
|
const autocalculationConfigurators = [kcXmlValidationConfigurator, rngSchemaValidationConfigurator, kcXmlAutoCalculationConfigurator]
|
|
132980
132976
|
|
|
132981
132977
|
window.CF.entryPoint = window.CF.entryPoint || {};
|
|
@@ -133018,38 +133014,9 @@ if (window.CF.entryPoint[gfv]) {
|
|
|
133018
133014
|
}
|
|
133019
133015
|
}
|
|
133020
133016
|
|
|
133021
|
-
if (
|
|
133022
|
-
|
|
133023
|
-
}
|
|
133024
|
-
`;
|
|
133025
|
-
}
|
|
133026
|
-
|
|
133027
|
-
/***/ }),
|
|
133028
|
-
|
|
133029
|
-
/***/ "./Generator/src/generators/FormSourcesBuilder/GetWebJsContent.ts":
|
|
133030
|
-
/*!************************************************************************!*\
|
|
133031
|
-
!*** ./Generator/src/generators/FormSourcesBuilder/GetWebJsContent.ts ***!
|
|
133032
|
-
\************************************************************************/
|
|
133033
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
133034
|
-
|
|
133035
|
-
"use strict";
|
|
133036
|
-
__webpack_require__.r(__webpack_exports__);
|
|
133037
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
133038
|
-
/* harmony export */ getWebJsContent: () => (/* binding */ getWebJsContent)
|
|
133039
|
-
/* harmony export */ });
|
|
133040
|
-
function getWebJsContent() {
|
|
133041
|
-
return `if (window.CF && window.CF.keformsUrl) {
|
|
133042
|
-
let { keformsUrl } = window.CF
|
|
133043
|
-
let publicPath = __webpack_public_path__
|
|
133044
|
-
|
|
133045
|
-
publicPath = publicPath.slice(0, 1) == '/' ? publicPath.slice(1) : publicPath
|
|
133046
|
-
keformsUrl = keformsUrl.slice(-1) == '/' ? keformsUrl.slice(0, -1) : keformsUrl
|
|
133047
|
-
__webpack_public_path__ = \`\${keformsUrl\}/\$\{publicPath\}\`
|
|
133048
|
-
}
|
|
133049
|
-
|
|
133050
|
-
require('./webEntry')
|
|
133051
|
-
`;
|
|
133052
|
-
}
|
|
133017
|
+
if (import.meta.hot) {
|
|
133018
|
+
import.meta.hot.accept();
|
|
133019
|
+
}`;
|
|
133053
133020
|
|
|
133054
133021
|
/***/ }),
|
|
133055
133022
|
|
|
@@ -134944,7 +134911,6 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
134944
134911
|
skipNotSupportedFunction: useServerCalculations
|
|
134945
134912
|
});
|
|
134946
134913
|
builder.addResource("kcXmlValidationConfigurator.js", content);
|
|
134947
|
-
builder.addResource("FakeStyles.less", `// empty styles to enforce style files`);
|
|
134948
134914
|
const localizationResources = (0,_localization_localization__WEBPACK_IMPORTED_MODULE_24__.generateLocalizationResources)(additionalContent.localization);
|
|
134949
134915
|
if (localizationResources) {
|
|
134950
134916
|
builder.addResource("localizationDictionary.js", localizationResources);
|
|
@@ -136439,7 +136405,7 @@ class ConverterResult {
|
|
|
136439
136405
|
const contextPath = context.dirName;
|
|
136440
136406
|
const dependencyFilesWithContent = this.getDependencies(ctxName).map(dependency => dependency.toFile()).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined);
|
|
136441
136407
|
if (context.isBase) {
|
|
136442
|
-
builder.addComponent(`${contextPath}/index.js`, `export default from './${ctxName}'\n`);
|
|
136408
|
+
builder.addComponent(`${contextPath}/index.js`, `export { default } from './${ctxName}'\n`);
|
|
136443
136409
|
}
|
|
136444
136410
|
for (const dependencyFile of dependencyFilesWithContent) {
|
|
136445
136411
|
const dependencyFilePath = `${contextPath}/${dependencyFile.getName()}`;
|
|
@@ -167111,7 +167077,7 @@ function getSettings(sugarRoot, gfv, additionalSettings, formJsonSettings) {
|
|
|
167111
167077
|
showErrorsCountInPanel: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.showErrorsCountInPanel,
|
|
167112
167078
|
inventoryAttachment: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.inventoryAttachment
|
|
167113
167079
|
};
|
|
167114
|
-
return `
|
|
167080
|
+
return `export default ${JSON.stringify(settings, undefined, 2)}`;
|
|
167115
167081
|
}
|
|
167116
167082
|
|
|
167117
167083
|
/***/ }),
|