@focuson/forms
Advanced tools
Comparing version 1.43.48 to 1.43.49
@@ -13,2 +13,3 @@ import { MakeButton } from "../codegen/makeButtons"; | ||
pageName: string; | ||
validate?: boolean; | ||
} |
@@ -11,3 +11,3 @@ "use strict"; | ||
makeButton: ({ params, mainPage, parent, name, button }) => { | ||
const { id, pageMode, pageName, text } = button; | ||
const { id, pageMode, pageName, text, validate } = button; | ||
return [`<SelectPage state={state} id=${(0, makeButtons_1.makeIdForButton)(name)} ${(0, enabledBy_1.enabledByString)(button)} `, | ||
@@ -17,2 +17,3 @@ ...(0, codegen_1.indentList)([ | ||
...(0, codegen_1.opt)('pageName', pageName), | ||
...(0, codegen_1.optT)('validate', validate), | ||
...(0, codegen_1.opt)('pageMode', pageMode) | ||
@@ -19,0 +20,0 @@ ]), |
@@ -84,3 +84,3 @@ "use strict"; | ||
` method: '${details.method}',`, | ||
` path: '$${(0, restD_1.postFixForEndpoint)(action)}',`, | ||
` path: '${(0, utils_1.beforeSeparator)("?", url)}${(0, restD_1.postFixForEndpoint)(action)}',`, | ||
` query:${JSON.stringify(paramsValueForTest)},`, | ||
@@ -87,0 +87,0 @@ ` ${requestBodyString},`, |
@@ -298,2 +298,10 @@ "use strict"; | ||
} | ||
function getNeedsTopRightCross(pageD) { | ||
if (!(0, pageD_1.isModalPage)(pageD)) | ||
return false; | ||
if (pageD.pageType === 'ModalPopup') | ||
if (pageD.haveTopRightCrossToCancel === undefined) | ||
return true; | ||
return pageD.haveTopRightCrossToCancel === true; | ||
} | ||
function createReactModalPageComponent(params, makeGuard, makeButtons, mainP, pageD) { | ||
@@ -305,5 +313,6 @@ const { dataDD } = pageD.display; | ||
const guards = makeGuardVariables(pageD, makeGuard, params, mainP, pageD); | ||
const haveTopRightCrossToCancel = getNeedsTopRightCross(pageD); | ||
return [ | ||
`export function ${(0, names_1.modalPageComponentName)(mainP)(pageD)}(){`, | ||
` return focusedPage<${params.stateName}, ${domName}, Context> ( s => ${(makeStringifiedTitle(pageD))} ) (//If there is a compilation here have you added this to the 'domain' of the main page`, | ||
` return focusedPage<${params.stateName}, ${domName}, Context> ( s => ${(makeStringifiedTitle(pageD))}, ${haveTopRightCrossToCancel}) (//If there is a compilation here have you added this to the 'domain' of the main page`, | ||
` ( state, d, mode, index ) => {`, | ||
@@ -334,3 +343,3 @@ ...((0, codegen_1.indentList)((0, codegen_1.indentList)((0, codegen_1.indentList)((0, codegen_1.indentList)((0, codegen_1.indentList)([ | ||
` //A compilation error here is often because you have specified the wrong path in display. The path you gave is ${pageD.display.target}`, | ||
` return focusedPageWithExtraState<${params.stateName}, ${(0, names_1.pageDomainName)(pageD)}, ${(0, names_1.domainName)(pageD.display.dataDD)}, Context> ( s => ${makeStringifiedTitle(pageD)}) ( state => state${(0, lens_1.stateFocusQueryWithTildaFromPage)(`createReactMainPageComponent for page ${pageD.name}`, params, pageD, pageD, pageD.display.target)}) (`, | ||
` return focusedPageWithExtraState<${params.stateName}, ${(0, names_1.pageDomainName)(pageD)}, ${(0, names_1.domainName)(pageD.display.dataDD)}, Context> ( s => ${makeStringifiedTitle(pageD)}, false) ( state => state${(0, lens_1.stateFocusQueryWithTildaFromPage)(`createReactMainPageComponent for page ${pageD.name}`, params, pageD, pageD, pageD.display.target)}) (`, | ||
`( fullPageState, state , full, d, mode, index) => {`, | ||
@@ -337,0 +346,0 @@ ...(0, codegen_1.indentList)((0, makeButtons_1.makeGuardButtonVariables)(params, makeGuard, pageD, pageD)), |
@@ -100,4 +100,4 @@ "use strict"; | ||
}; | ||
return (0, dataD_1.foldDataDD)(d, [], [], [], folder); | ||
return (0, dataD_1.foldDataDD)(d, [], [], {}, folder); | ||
} | ||
exports.makeEmptyData = makeEmptyData; |
@@ -107,2 +107,3 @@ import { AllDataDD, CompDataD, HasGuards, HasLayout, NamesAndDataDs } from "./dataD"; | ||
shouldModalPageCloseOnClickAway?: boolean; | ||
haveTopRightCrossToCancel?: boolean; | ||
} | ||
@@ -109,0 +110,0 @@ export declare function dataDsIn<G>(pds: (RefD<G> | PageD<any, G>)[], stopAtDisplay?: boolean): NamesAndDataDs<G>; |
@@ -15,5 +15,5 @@ { | ||
"dependencies": { | ||
"@focuson/utils": "1.43.48", | ||
"@focuson/files": "1.43.48", | ||
"@focuson/focuson": "1.43.48" | ||
"@focuson/utils": "1.43.49", | ||
"@focuson/files": "1.43.49", | ||
"@focuson/focuson": "1.43.49" | ||
}, | ||
@@ -59,3 +59,3 @@ "devDependencies": { | ||
}, | ||
"version": "1.43.48", | ||
"version": "1.43.49", | ||
"template": "forms", | ||
@@ -62,0 +62,0 @@ "description": "Allows us to define data that is stored in a database, or perhaps an api", |
Sorry, the diff of this file is not supported yet
725392
12463
+ Added@focuson/fetcher@1.43.49(transitive)
+ Added@focuson/files@1.43.49(transitive)
+ Added@focuson/focuson@1.43.49(transitive)
+ Added@focuson/lens@1.43.49(transitive)
+ Added@focuson/pages@1.43.49(transitive)
+ Added@focuson/poster@1.43.49(transitive)
+ Added@focuson/rest@1.43.49(transitive)
+ Added@focuson/state@1.43.49(transitive)
+ Added@focuson/template@1.43.49(transitive)
+ Added@focuson/utils@1.43.49(transitive)
- Removed@focuson/fetcher@1.43.48(transitive)
- Removed@focuson/files@1.43.48(transitive)
- Removed@focuson/focuson@1.43.48(transitive)
- Removed@focuson/lens@1.43.48(transitive)
- Removed@focuson/pages@1.43.48(transitive)
- Removed@focuson/poster@1.43.48(transitive)
- Removed@focuson/rest@1.43.48(transitive)
- Removed@focuson/state@1.43.48(transitive)
- Removed@focuson/template@1.43.48(transitive)
- Removed@focuson/utils@1.43.48(transitive)
Updated@focuson/files@1.43.49
Updated@focuson/focuson@1.43.49
Updated@focuson/utils@1.43.49