diff --git a/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/StoredVariableHelper.java b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/StoredVariableHelper.java new file mode 100644 index 00000000..756bf801 --- /dev/null +++ b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/StoredVariableHelper.java @@ -0,0 +1,47 @@ +package hu.blackbelt.judo.ui.generator.react; + +/*- + * #%L + * JUDO UI React Frontend Generator + * %% + * Copyright (C) 2018 - 2023 BlackBelt Technology + * %% + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + * #L% + */ + +import hu.blackbelt.judo.generator.commons.StaticMethodValueResolver; +import hu.blackbelt.judo.generator.commons.ThreadLocalContextHolder; +import hu.blackbelt.judo.generator.commons.annotations.ContextAccessor; +import hu.blackbelt.judo.generator.commons.annotations.TemplateHelper; + +import java.util.Map; + +/** + * The handlebars context inaccessible in helpers / value resolvers + * because there is no state for them. The ThreadLocal is used + * to init variable values from template execution. + */ +@TemplateHelper +@ContextAccessor +public class StoredVariableHelper extends StaticMethodValueResolver { + + public static void bindContext(Map context) { + ThreadLocalContextHolder.bindContext(context); + } + + public static synchronized Boolean isDebugPrint() { + return Boolean.parseBoolean((String) ThreadLocalContextHolder.getVariable("debugPrint")); + } + +} diff --git a/judo-ui-react/src/main/resources/actor/src/fragments/link/hook-variables.fragment.hbs b/judo-ui-react/src/main/resources/actor/src/fragments/link/hook-variables.fragment.hbs index 4c246c2d..8290068d 100644 --- a/judo-ui-react/src/main/resources/actor/src/fragments/link/hook-variables.fragment.hbs +++ b/judo-ui-react/src/main/resources/actor/src/fragments/link/hook-variables.fragment.hbs @@ -1,6 +1,6 @@ const {{ link.dataElement.name }}SortModel: GridSortModel = {{{ getDefaultSortParamsForLink link }}}; {{# unless link.dataElement.isReadOnly }} - {{# if debugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/hook-variables.fragment.hbs rel=link }} {{/ unless }} diff --git a/judo-ui-react/src/main/resources/actor/src/fragments/relation/hook-variables.fragment.hbs b/judo-ui-react/src/main/resources/actor/src/fragments/relation/hook-variables.fragment.hbs index de7322c1..60cd8ba5 100644 --- a/judo-ui-react/src/main/resources/actor/src/fragments/relation/hook-variables.fragment.hbs +++ b/judo-ui-react/src/main/resources/actor/src/fragments/relation/hook-variables.fragment.hbs @@ -5,7 +5,7 @@ const {{ rel.dataElement.name }}Columns: GridColDef<{{ classDataName rel.dataEle field: '{{ column.attributeType.name }}', headerName: t('{{ idToTranslationKey column.fQName application }}', { defaultValue: '{{ column.label }}' }) as string, headerClassName: 'data-grid-column-header', - {{# if debugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/column.fragment.hbs column=column dataElement=rel.dataElement name=rel.name }} }, {{/ each }} @@ -13,7 +13,7 @@ const {{ rel.dataElement.name }}Columns: GridColDef<{{ classDataName rel.dataEle const {{ rel.dataElement.name }}RangeFilterOptions: FilterOption[] = [ {{# each rel.filters as |filter| }} - {{# if debugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} {{> actor/src/fragments/table/filter-option.fragment.hbs filter=filter application=application }} {{/ each }} ]; diff --git a/judo-ui-react/src/main/resources/actor/src/fragments/relation/relation-variables.fragment.hbs b/judo-ui-react/src/main/resources/actor/src/fragments/relation/relation-variables.fragment.hbs index f095efe4..a4fede47 100644 --- a/judo-ui-react/src/main/resources/actor/src/fragments/relation/relation-variables.fragment.hbs +++ b/judo-ui-react/src/main/resources/actor/src/fragments/relation/relation-variables.fragment.hbs @@ -7,7 +7,7 @@ const {{ rel.dataElement.name }}Columns: GridColDef<{{ classDataName rel.dataEle field: '{{ column.attributeType.name }}', headerName: t('{{ idToTranslationKey column.fQName application }}', { defaultValue: '{{ column.label }}' }) as string, headerClassName: 'data-grid-column-header', - {{# if debugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/column.fragment.hbs column=column dataElement=rel.dataElement name=rel.name }} }, {{/ each }} @@ -15,7 +15,7 @@ const {{ rel.dataElement.name }}Columns: GridColDef<{{ classDataName rel.dataEle const {{ rel.dataElement.name }}RangeFilterOptions: FilterOption[] = [ {{# each rel.filters as |filter| }} - {{# if debugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} {{> actor/src/fragments/table/filter-option.fragment.hbs filter=filter application=application }} {{/ each }} ]; diff --git a/judo-ui-react/src/main/resources/actor/src/fragments/table/hook-variables.fragment.hbs b/judo-ui-react/src/main/resources/actor/src/fragments/table/hook-variables.fragment.hbs index eb756947..2d9a0633 100644 --- a/judo-ui-react/src/main/resources/actor/src/fragments/table/hook-variables.fragment.hbs +++ b/judo-ui-react/src/main/resources/actor/src/fragments/table/hook-variables.fragment.hbs @@ -1,4 +1,4 @@ const {{ table.dataElement.name }}SortModel: GridSortModel = {{{ getDefaultSortParamsForTable table }}}; -{{# if debugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/hook-variables.fragment.hbs rel=table }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/access/create.hbs b/judo-ui-react/src/main/resources/actor/src/pages/access/create.hbs index fbc893b9..36541543 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/access/create.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/access/create.hbs @@ -73,13 +73,13 @@ export default function {{ pageName page }}() { const [payloadDiff, setPayloadDiff] = useState>({} as unknown as Record); const [editMode, setEditMode] = useState(true); const storeDiff: (attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => void = useCallback((attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => { - {{# if debugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} {{> actor/src/fragments/page/store-diff-body.hbs classType=page.dataElement.target }} }, [data]); const [validation, setValidation] = useState>(new Map()); const title: string = t('{{ idToTranslationKey page.fQName application }}', { defaultValue: '{{ page.label }}' }); - {{# if debugPrint }}// include: actor/src/fragments/page/input-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/input-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/input-form-flags.hbs }} {{# if page.dataElement.target.isTemplateable }} @@ -135,7 +135,7 @@ export default function {{ pageName page }}() { {{# each rootChild.children as |child| }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/access/table.hbs b/judo-ui-react/src/main/resources/actor/src/pages/access/table.hbs index d304e731..eb43e35c 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/access/table.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/access/table.hbs @@ -4,7 +4,7 @@ // Page DataElement name: {{ page.dataElement.name }} // Page DataElement owner name: {{ page.dataElement.owner.name }} -{{# if debugPrint }}// include: actor/src/fragments/page/common-table-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/page/common-table-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/page/common-table-imports.fragment.hbs }} import { PageActions } from './components/PageActions'; diff --git a/judo-ui-react/src/main/resources/actor/src/pages/access/view.hbs b/judo-ui-react/src/main/resources/actor/src/pages/access/view.hbs index b98e98b8..6937c876 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/access/view.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/access/view.hbs @@ -4,7 +4,7 @@ // Page DataElement name: {{ page.dataElement.name }} // Page DataElement owner name: {{ page.dataElement.owner.name }} -{{# if debugPrint }}// include: actor/src/fragments/page/common-view-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/page/common-view-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/page/common-view-imports.fragment.hbs }} import { @@ -71,7 +71,7 @@ export default function {{ pageName page }}() { const [payloadDiff, setPayloadDiff] = useState>({} as unknown as Record); const [editMode, setEditMode] = useState(false); const storeDiff: (attributeName: keyof {{ classDataName page.dataElement.target 'Stored' }}, value: any) => void = useCallback((attributeName: keyof {{ classDataName page.dataElement.target 'Stored' }}, value: any) => { - {{# if debugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} {{> actor/src/fragments/page/store-diff-body.hbs classType=page.dataElement.target }} }, [data]); const [validation, setValidation] = useState>(new Map()); @@ -94,7 +94,7 @@ export default function {{ pageName page }}() { const title: string = t('{{ idToTranslationKey page.fQName application }}', { defaultValue: '{{ page.label }}' }); {{/ if }} - {{# if debugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/mapped-form-flags.hbs }} useConfirmationBeforeChange(editMode, t('judo.form.navigation.confirmation', { defaultValue: 'You have potential unsaved changes in your form, are you sure you would like to navigate away?' })); @@ -231,7 +231,7 @@ export default function {{ pageName page }}() { {{# each rootChild.children as |child| }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/access/view/page-actions.hbs b/judo-ui-react/src/main/resources/actor/src/pages/access/view/page-actions.hbs index d0123a79..6c1acb50 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/access/view/page-actions.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/access/view/page-actions.hbs @@ -35,12 +35,12 @@ export function PageActions (props: PageActionsProps) { const {{ actionFunctionName action }} = {{ actionFunctionHookName action }}(); {{/ each }} - {{# if debugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/mapped-form-flags.hbs }} return ( <> - {{# if debugPrint }}{/* include: actor/src/fragments/page/page-crud-actions.hbs */}{{/ if }} + {{# if isDebugPrint }}{/* include: actor/src/fragments/page/page-crud-actions.hbs */}{{/ if }} {{> actor/src/fragments/page/page-crud-actions.hbs }} ); diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/action.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/action.tsx.hbs index 8fdb2cc9..b981e707 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/action.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/action.tsx.hbs @@ -1,38 +1,38 @@ {{# if action.isFilterAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/filter-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/filter-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/filter-action.tsx.hbs }} {{ else if action.isFilterRelationAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/filter-relation-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/filter-relation-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/filter-relation-action.tsx.hbs }} {{ else if action.isRefreshAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/refresh-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/refresh-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/refresh-action.tsx.hbs }} {{ else if action.isRefreshRelationAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/refresh-relation-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/refresh-relation-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/refresh-relation-action.tsx.hbs }} {{ else if action.isCreateAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/create-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/create-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/create-action.tsx.hbs }} {{ else if action.isClearAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/clear-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/clear-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/clear-action.tsx.hbs }} {{ else if action.isAddAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/add-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/add-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/add-action.tsx.hbs }} {{ else if action.isViewAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/row/row-view-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/row/row-view-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/row/row-view-action.tsx.hbs }} {{ else if action.isRemoveAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/row/row-remove-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/row/row-remove-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/row/row-remove-action.tsx.hbs }} {{ else if action.isDeleteAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/row/row-delete-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/row/row-delete-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/row/row-delete-action.tsx.hbs }} {{ else if action.isNavigationToPageAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/navigate-to-page-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/navigate-to-page-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/navigate-to-page-action.tsx.hbs }} {{ else if action.isCallOperationAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/call-operation-action.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/call-operation-action.tsx.hbs{{/ if }} {{> actor/src/pages/actions/action/call-operation-action.tsx.hbs }} {{ else }} {{> fragment.header.hbs }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/add-action.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/add-action.tsx.hbs index 8eb51df5..59e8a304 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/add-action.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/add-action.tsx.hbs @@ -48,7 +48,7 @@ export const {{ actionFunctionHookName action }}: {{ actionFunctionTypeName acti ...baseColumnConfig, field: '{{ column.attributeType.name }}', headerName: t('{{ idToTranslationKey column.fQName application }}', { defaultValue: '{{ column.label }}' }) as string, - {{# if debugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/column.fragment.hbs column=column dataElement=table.dataElement name=table.name }} }, {{/ each }} @@ -56,7 +56,7 @@ export const {{ actionFunctionHookName action }}: {{ actionFunctionTypeName acti const filterOptions: FilterOption[] = [ {{# each table.filters as |filter| }} - {{# if debugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} {{> actor/src/fragments/table/filter-option.fragment.hbs filter=filter application=application }} {{/ each }} ]; diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action.tsx.hbs index 3b2f7512..5f4b03aa 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action.tsx.hbs @@ -64,10 +64,10 @@ export const {{ actionFunctionHookName action }}: {{ actionFunctionTypeName acti const postHandler: {{ actionFunctionHandlerTypeName action 'PostHandler' }} | undefined = customPostHandler && customPostHandler(); {{# if (actionHasInputForm action) }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/call-operation-action/with-input-form.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/call-operation-action/with-input-form.fragment.hbs{{/ if }} {{> actor/src/pages/actions/action/call-operation-action/with-input-form.fragment.hbs action=action page=page }} {{ else }} - {{# if debugPrint }}// include: actor/src/pages/actions/action/call-operation-action/without-input-form.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/action/call-operation-action/without-input-form.fragment.hbs{{/ if }} {{> actor/src/pages/actions/action/call-operation-action/without-input-form.fragment.hbs action=action page=page }} {{/ if }} } diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/link.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/link.tsx.hbs index d4d0a437..1d403003 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/link.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/link.tsx.hbs @@ -1,6 +1,6 @@ {{> fragment.header.hbs }} -{{# if debugPrint }}// include: actor/src/fragments/link/common-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/link/common-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/link/common-imports.fragment.hbs }} import { @@ -39,7 +39,7 @@ export function {{ linkComponentName link }}(props: {{ linkComponentName link }} const { downloadFile, extractFileNameFromToken, uploadFile } = fileHandling(); const { locale: l10nLocale } = useL10N(); - {{# if debugPrint }}// include: actor/src/fragments/link/hook-variables.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/link/hook-variables.fragment.hbs{{/ if }} {{> actor/src/fragments/link/hook-variables.fragment.hbs link=link }} {{# each (getFilteredLinkActions link) as |action| }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/table.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/table.tsx.hbs index 6c0f2dcc..872e31c4 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/table.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/components/table.tsx.hbs @@ -1,6 +1,6 @@ {{> fragment.header.hbs }} -{{# if debugPrint }}// include: actor/src/fragments/table/common-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/table/common-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/table/common-imports.fragment.hbs }} import { diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/output-view.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/output-view.tsx.hbs index 56a8c93d..96dd6a7d 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/output-view.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/output-view/output-view.tsx.hbs @@ -80,7 +80,7 @@ export function {{ pageName page }}({ close, result } : {{ pageName page }}Props const [payloadDiff] = useState>({} as unknown as Record); const storeDiff: (attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => void = useCallback((attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => { - {{# if debugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} {{> actor/src/fragments/page/store-diff-body.hbs classType=page.dataElement.target }} }, [data]); {{# each (getUniquePageActions page) as |action| }} @@ -94,7 +94,7 @@ export function {{ pageName page }}({ close, result } : {{ pageName page }}Props const title: string = t('{{ idToTranslationKey page.fQName application }}', { defaultValue: '{{ page.label }}' }); {{/ if }} - {{# if debugPrint }}// include: actor/src/fragments/page/unmapped-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/unmapped-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/unmapped-form-flags.hbs }} return ( @@ -120,7 +120,7 @@ export function {{ pageName page }}({ close, result } : {{ pageName page }}Props {{# each rootChild.children as |child| }} {{# unless (excludeWidgetFromTree child) }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ unless }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/without-input-form.fragment.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/without-input-form.fragment.hbs index 9a0f48ab..73ef6519 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/without-input-form.fragment.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/action/call-operation-action/without-input-form.fragment.hbs @@ -7,7 +7,7 @@ return async function {{ actionFunctionName action }} ({{# if action.operation.i ...baseColumnConfig, field: '{{ column.attributeType.name }}', headerName: t('{{ idToTranslationKey column.fQName application }}', { defaultValue: '{{ column.label }}' }) as string, - {{# if debugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/relation/column.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/column.fragment.hbs column=column dataElement=table.dataElement name=table.name }} }, {{/ each }} @@ -15,7 +15,7 @@ return async function {{ actionFunctionName action }} ({{# if action.operation.i const filterOptions: FilterOption[] = [ {{# each table.filters as |filter| }} - {{# if debugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/table/filter-option.fragment.hbs{{/ if }} {{> actor/src/fragments/table/filter-option.fragment.hbs filter=filter application=application }} {{/ each }} ]; diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm.tsx.hbs index 77bf2997..076e0a73 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm.tsx.hbs @@ -1,9 +1,9 @@ {{> fragment.header.hbs }} {{# if action.isCreateAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/actionForm/createActionForm.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/actionForm/createActionForm.tsx.hbs{{/ if }} {{> actor/src/pages/actions/actionForm/createActionForm.tsx.hbs }} {{/ if }} {{# if action.isCallOperationAction }} - {{# if debugPrint }}// include: actor/src/pages/actions/actionForm/operationInputActionForm.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/actions/actionForm/operationInputActionForm.tsx.hbs{{/ if }} {{> actor/src/pages/actions/actionForm/operationInputActionForm.tsx.hbs }} {{/ if }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/link.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/link.tsx.hbs index 9141da18..52bf2b48 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/link.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/link.tsx.hbs @@ -1,6 +1,6 @@ {{> fragment.header.hbs }} -{{# if debugPrint }}// include: actor/src/fragments/link/common-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/link/common-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/link/common-imports.fragment.hbs }} import { @@ -39,7 +39,7 @@ export function {{ linkComponentName link }}(props: {{ linkComponentName link }} const { downloadFile, extractFileNameFromToken, uploadFile } = fileHandling(); const { locale: l10nLocale } = useL10N(); - {{# if debugPrint }}// include: actor/src/fragments/link/hook-variables.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/link/hook-variables.fragment.hbs{{/ if }} {{> actor/src/fragments/link/hook-variables.fragment.hbs link=link }} {{# each (getFilteredLinkActions link) as |action| }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/table.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/table.tsx.hbs index 81e195e0..80fdada9 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/table.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/components/table.tsx.hbs @@ -1,6 +1,6 @@ {{> fragment.header.hbs }} -{{# if debugPrint }}// include: actor/src/fragments/table/common-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/table/common-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/table/common-imports.fragment.hbs }} import { @@ -30,21 +30,21 @@ export const {{ tableComponentName table }} = forwardRef actor/src/fragments/page/sort-models.fragment.hbs dataElement=table.dataElement defaultSortColumn=table.defaultSortColumn columns=table.columns }} - {{# if debugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/hook-variables.fragment.hbs rel=table }} - {{# if debugPrint }}// include: actor/src/fragments/table/row-actions.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/table/row-actions.fragment.hbs{{/ if }} {{> actor/src/fragments/table/row-actions.fragment.hbs table=table page=page }} {{# each table.actions as |action| }} {{# unless table.dataElement.isMemberTypeTransient }} {{# if action.isAddAction }} - {{# if debugPrint }}// include: actor/src/fragments/action/range-call.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/action/range-call.fragment.hbs{{/ if }} {{> actor/src/fragments/action/range-call.fragment.hbs dataElement=table.dataElement }} - {{# if debugPrint }}// include: actor/src/fragments/action/selection-model.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/action/selection-model.fragment.hbs{{/ if }} {{> actor/src/fragments/action/selection-model.fragment.hbs dataElement=table.dataElement }} {{/ if }} {{/ unless }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/createActionForm.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/createActionForm.tsx.hbs index db76d680..254d5fc3 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/createActionForm.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/createActionForm.tsx.hbs @@ -1,7 +1,7 @@ {{> fragment.header.hbs }} // Action: CreateAction -{{# if debugPrint }}// include: actor/src/fragments/page/common-form-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/page/common-form-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/page/common-form-imports.fragment.hbs }} import { @@ -60,12 +60,12 @@ export function {{ pageActionFormComponentName action }}({ const [editMode, setEditMode] = useState(true); const [payloadDiff, setPayloadDiff] = useState>({} as unknown as Record); const storeDiff: (attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => void = useCallback((attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => { - {{# if debugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} {{> actor/src/fragments/page/store-diff-body.hbs classType=page.dataElement.target }} }, [data]); const title: string = t('{{ idToTranslationKey page.fQName application }}', { defaultValue: '{{ page.label }}' }); - {{# if debugPrint }}// include: actor/src/fragments/page/input-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/input-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/input-form-flags.hbs }} {{# if page.dataElement.target.isTemplateable }} @@ -138,7 +138,7 @@ export function {{ pageActionFormComponentName action }}({ {{# each rootChild.children as |child| }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/operationInputActionForm.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/operationInputActionForm.tsx.hbs index 916e2878..67bea43c 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/operationInputActionForm.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/actions/actionForm/operationInputActionForm.tsx.hbs @@ -1,7 +1,7 @@ {{> fragment.header.hbs }} // Action: CallOperationAction -{{# if debugPrint }}// include: actor/src/fragments/page/common-form-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/page/common-form-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/page/common-form-imports.fragment.hbs }} import { @@ -55,12 +55,12 @@ export function {{ pageActionFormComponentName action }}({ const [editMode, setEditMode] = useState(true); const [payloadDiff, setPayloadDiff] = useState>({} as unknown as Record); const storeDiff: (attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => void = useCallback((attributeName: keyof {{ classDataName page.dataElement.target '' }}, value: any) => { - {{# if debugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} {{> actor/src/fragments/page/store-diff-body.hbs classType=page.dataElement.target }} }, [data]); const title: string = t('{{ idToTranslationKey page.fQName application }}', { defaultValue: '{{ page.label }}' }); - {{# if debugPrint }}// include: actor/src/fragments/page/input-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/input-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/input-form-flags.hbs }} {{# if action.operation.input.target.isTemplateable }} @@ -131,7 +131,7 @@ export function {{ pageActionFormComponentName action }}({ {{# each rootChild.children as |child| }} {{# unless (excludeWidgetFromTree child) }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ unless }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/components/link.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/components/link.tsx.hbs index aa9f89e3..401005f3 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/components/link.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/components/link.tsx.hbs @@ -1,6 +1,6 @@ {{> fragment.header.hbs }} -{{# if debugPrint }}// include: actor/src/fragments/link/common-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/link/common-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/link/common-imports.fragment.hbs }} import { @@ -46,7 +46,7 @@ export function {{ linkComponentName link }}(props: {{ linkComponentName link }} const { downloadFile, extractFileNameFromToken, uploadFile } = fileHandling(); const { locale: l10nLocale } = useL10N(); - {{# if debugPrint }}// include: actor/src/fragments/link/hook-variables.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/link/hook-variables.fragment.hbs{{/ if }} {{> actor/src/fragments/link/hook-variables.fragment.hbs link=link }} {{# each (getFilteredLinkActions link) as |action| }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/components/table.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/components/table.tsx.hbs index 6a366816..c40c43be 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/components/table.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/components/table.tsx.hbs @@ -1,21 +1,21 @@ {{> fragment.header.hbs }} -{{# if debugPrint }}// include: actor/src/fragments/table/common-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/table/common-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/table/common-imports.fragment.hbs }} {{# if page.isPageTypeDashboard }} - {{# if debugPrint }}// include: actor/src/pages/components/table/for-table-page.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/components/table/for-table-page.hbs{{/ if }} {{> actor/src/pages/components/table/for-table-page.hbs }} {{ else }} {{# if page.isPageTypeTable }} - {{# if debugPrint }}// include: actor/src/pages/components/table/for-table-page.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/components/table/for-table-page.hbs{{/ if }} {{> actor/src/pages/components/table/for-table-page.hbs }} {{ else }} {{# if table.dataElement.isRelationKindAssociation }} - {{# if debugPrint }}// include: actor/src/pages/components/table/for-association.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/components/table/for-association.hbs{{/ if }} {{> actor/src/pages/components/table/for-association.hbs }} {{ else }} - {{# if debugPrint }}// include: actor/src/pages/components/table/for-aggregation.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/components/table/for-aggregation.hbs{{/ if }} {{> actor/src/pages/components/table/for-aggregation.hbs }} {{/ if }} {{/ if }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-aggregation.hbs b/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-aggregation.hbs index ffdf7016..c7db4437 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-aggregation.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-aggregation.hbs @@ -33,10 +33,10 @@ export const {{ tableComponentName table }} = (props: {{ tableComponentName tabl const { downloadFile, extractFileNameFromToken, uploadFile } = fileHandling(); const { locale: l10nLocale } = useL10N(); - {{# if debugPrint }}// include: actor/src/fragments/page/sort-models.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/sort-models.fragment.hbs{{/ if }} {{> actor/src/fragments/page/sort-models.fragment.hbs dataElement=table.dataElement defaultSortColumn=table.defaultSortColumn columns=table.columns }} - {{# if debugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} {{> actor/src/fragments/relation/hook-variables.fragment.hbs rel=table }} {{# each (getFilteredTableActions table) as |action| }} @@ -45,15 +45,15 @@ export const {{ tableComponentName table }} = (props: {{ tableComponentName tabl {{/ unless }} {{/ each }} - {{# if debugPrint }}// include: actor/src/fragments/table/row-actions.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/table/row-actions.fragment.hbs{{/ if }} {{> actor/src/fragments/table/row-actions.fragment.hbs table=table page=page }} {{# each table.actions as |action| }} {{# unless table.dataElement.isMemberTypeTransient }} {{# if action.isAddAction }} - {{# if debugPrint }}// include: actor/src/fragments/action/range-call.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/action/range-call.fragment.hbs{{/ if }} {{> actor/src/fragments/action/range-call.fragment.hbs dataElement=table.dataElement }} - {{# if debugPrint }}// include: actor/src/fragments/action/selection-model.fragment.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/action/selection-model.fragment.hbs{{/ if }} {{> actor/src/fragments/action/selection-model.fragment.hbs dataElement=table.dataElement }} {{/ if }} {{/ unless }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-association.hbs b/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-association.hbs index eefc5925..66397092 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-association.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-association.hbs @@ -63,7 +63,7 @@ export const {{ tableComponentName table }} = forwardRef actor/src/fragments/table/hook-variables.fragment.hbs table=table }} {{# each (getFilteredTableActions table) as |action| }} @@ -76,7 +76,7 @@ export const {{ tableComponentName table }} = forwardRef actor/src/fragments/table/filter-option.fragment.hbs filter=filter application=application }} {{/ each }} ]; diff --git a/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-table-page.hbs b/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-table-page.hbs index bd6b66c7..37b322f3 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-table-page.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/components/table/for-table-page.hbs @@ -65,7 +65,7 @@ export const {{ tableComponentName table }} = forwardRef actor/src/fragments/table/hook-variables.fragment.hbs table=table }} {{# each (getFilteredTableActions table) as |action| }} @@ -78,7 +78,7 @@ export const {{ tableComponentName table }} = forwardRef actor/src/fragments/table/filter-option.fragment.hbs filter=filter application=application }} {{/ each }} ]; diff --git a/judo-ui-react/src/main/resources/actor/src/pages/index.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/index.tsx.hbs index b744e6d1..2261f035 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/index.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/index.tsx.hbs @@ -1,41 +1,41 @@ {{# if page.dataElement }} {{# if page.dataElement.isAccess }} {{# if page.isPageTypeCreate }} - {{# if debugPrint }}// include: actor/src/pages/access/create.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/create.hbs{{/ if }} {{> actor/src/pages/access/create.hbs }} {{/ if }} {{# if page.isPageTypeTable }} - {{# if debugPrint }}// include: actor/src/pages/access/table.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/table.hbs{{/ if }} {{> actor/src/pages/access/table.hbs }} {{/ if }} {{# if page.isPageTypeView }} - {{# if debugPrint }}// include: actor/src/pages/access/view.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/view.hbs{{/ if }} {{> actor/src/pages/access/view.hbs }} {{/ if }} {{# if page.isPageTypeDashboard }} {{# if page.dataElement.isCollection }} - {{# if debugPrint }}// include: actor/src/pages/access/table.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/table.hbs{{/ if }} {{> actor/src/pages/access/table.hbs }} {{ else }} - {{# if debugPrint }}// include: actor/src/pages/access/view.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/view.hbs{{/ if }} {{> actor/src/pages/access/view.hbs }} {{/ if }} {{/ if }} {{ else }} {{# if page.isPageTypeTable }} - {{# if debugPrint }}// include: actor/src/pages/relation/table.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/relation/table.hbs{{/ if }} {{> actor/src/pages/relation/table.hbs }} {{/ if }} {{# if page.isPageTypeView }} - {{# if debugPrint }}// include: actor/src/pages/relation/view.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/relation/view.hbs{{/ if }} {{> actor/src/pages/relation/view.hbs }} {{/ if }} {{# if page.isPageTypeOperationOutput }} - {{# if debugPrint }}// include: actor/src/pages/operation-output/view.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/operation-output/view.hbs{{/ if }} {{> actor/src/pages/operation-output/view.hbs }} {{/ if }} {{/ if }} {{ else }} - {{# if debugPrint }}// include: actor/src/pages/page-fallback.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/page-fallback.hbs{{/ if }} {{> actor/src/pages/page-fallback.hbs }} {{/ if }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view.hbs b/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view.hbs index 1ff1b118..531f08e1 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view.hbs @@ -4,7 +4,7 @@ // Page DataElement name: {{ page.dataElement.name }} // Page DataElement owner name: {{ page.dataElement.owner.name }} -{{# if debugPrint }}// include: actor/src/fragments/page/common-view-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/page/common-view-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/page/common-view-imports.fragment.hbs }} import { @@ -64,7 +64,7 @@ export default function {{ pageName page }}() { const [payloadDiff, setPayloadDiff] = useState>({} as unknown as Record); const [editMode, setEditMode] = useState(false); const storeDiff: (attributeName: keyof {{ classDataName page.dataElement.target 'Stored' }}, value: any) => void = useCallback((attributeName: keyof {{ classDataName page.dataElement.target 'Stored' }}, value: any) => { - {{# if debugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} {{> actor/src/fragments/page/store-diff-body.hbs classType=page.dataElement.target }} }, [data]); const [validation, setValidation] = useState>(new Map()); @@ -87,7 +87,7 @@ export default function {{ pageName page }}() { const title: string = t('{{ idToTranslationKey page.fQName application }}', { defaultValue: '{{ page.label }}' }); {{/ if }} - {{# if debugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/mapped-form-flags.hbs }} useConfirmationBeforeChange(editMode, t('judo.form.navigation.confirmation', { defaultValue: 'You have potential unsaved changes in your form, are you sure you would like to navigate away?' })); @@ -180,7 +180,7 @@ export default function {{ pageName page }}() { {{# each rootChild.children as |child| }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view/page-actions.hbs b/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view/page-actions.hbs index 5fbb1311..dd84b9ef 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view/page-actions.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/operation-output/view/page-actions.hbs @@ -37,12 +37,12 @@ export function PageActions (props: PageActionsProps) { const {{ actionFunctionName action }} = {{ actionFunctionHookName action }}(); {{/ each }} - {{# if debugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/mapped-form-flags.hbs }} return ( <> - {{# if debugPrint }}{/* include: actor/src/fragments/page/page-crud-actions.hbs */}{{/ if }} + {{# if isDebugPrint }}{/* include: actor/src/fragments/page/page-crud-actions.hbs */}{{/ if }} {{> actor/src/fragments/page/page-crud-actions.hbs }} ); diff --git a/judo-ui-react/src/main/resources/actor/src/pages/page-actions.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/pages/page-actions.tsx.hbs index 3c35d789..39f40e2c 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/page-actions.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/page-actions.tsx.hbs @@ -1,45 +1,45 @@ {{# if page.dataElement }} {{# if page.dataElement.isAccess }} {{# if page.isPageTypeCreate }} - {{# if debugPrint }}// include: actor/src/pages/access/create/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/create/page-actions.hbs{{/ if }} {{> actor/src/pages/access/create/page-actions.hbs }} {{/ if }} {{# if page.isPageTypeTable }} - {{# if debugPrint }}// include: actor/src/pages/access/table/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/table/page-actions.hbs{{/ if }} {{> actor/src/pages/access/table/page-actions.hbs }} {{/ if }} {{# if page.isPageTypeView }} - {{# if debugPrint }}// include: actor/src/pages/access/view/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/view/page-actions.hbs{{/ if }} {{> actor/src/pages/access/view/page-actions.hbs }} {{/ if }} {{# if page.isPageTypeDashboard }} {{# if page.dataElement.isCollection }} - {{# if debugPrint }}// include: actor/src/pages/access/table/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/table/page-actions.hbs{{/ if }} {{> actor/src/pages/access/table/page-actions.hbs }} {{ else }} - {{# if debugPrint }}// include: actor/src/pages/access/view/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/access/view/page-actions.hbs{{/ if }} {{> actor/src/pages/access/view/page-actions.hbs }} {{/ if }} {{/ if }} {{ else }} {{# if page.isPageTypeCreate }} - {{# if debugPrint }}// include: actor/src/pages/relation/create/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/relation/create/page-actions.hbs{{/ if }} {{> actor/src/pages/relation/create/page-actions.hbs }} {{/ if }} {{# if page.isPageTypeTable }} - {{# if debugPrint }}// include: actor/src/pages/relation/table/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/relation/table/page-actions.hbs{{/ if }} {{> actor/src/pages/relation/table/page-actions.hbs }} {{/ if }} {{# if page.isPageTypeView }} - {{# if debugPrint }}// include: actor/src/pages/relation/view/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/relation/view/page-actions.hbs{{/ if }} {{> actor/src/pages/relation/view/page-actions.hbs }} {{/ if }} {{# if page.isPageTypeOperationOutput }} - {{# if debugPrint }}// include: actor/src/pages/operation-output/view/page-actions.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/operation-output/view/page-actions.hbs{{/ if }} {{> actor/src/pages/operation-output/view/page-actions.hbs }} {{/ if }} {{/ if }} {{ else }} - {{# if debugPrint }}// include: actor/src/pages/page-fallback.page-actions.tsx.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/pages/page-fallback.page-actions.tsx.hbs{{/ if }} {{> actor/src/pages/page-fallback.page-actions.tsx.hbs }} {{/ if }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/relation/table.hbs b/judo-ui-react/src/main/resources/actor/src/pages/relation/table.hbs index 0226fc9b..92cf6a8e 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/relation/table.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/relation/table.hbs @@ -4,7 +4,7 @@ // Page DataElement name: {{ page.dataElement.name }} // Page DataElement owner name: {{ page.dataElement.owner.name }} -{{# if debugPrint }}// include: actor/src/fragments/page/common-table-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/page/common-table-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/page/common-table-imports.fragment.hbs }} import { PageActions } from './components/PageActions'; diff --git a/judo-ui-react/src/main/resources/actor/src/pages/relation/view.hbs b/judo-ui-react/src/main/resources/actor/src/pages/relation/view.hbs index 6a18c402..49a1b79b 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/relation/view.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/relation/view.hbs @@ -4,7 +4,7 @@ // Page DataElement name: {{ page.dataElement.name }} // Page DataElement owner name: {{ page.dataElement.owner.name }} -{{# if debugPrint }}// include: actor/src/fragments/page/common-view-imports.fragment.hbs{{/ if }} +{{# if isDebugPrint }}// include: actor/src/fragments/page/common-view-imports.fragment.hbs{{/ if }} {{> actor/src/fragments/page/common-view-imports.fragment.hbs }} import { @@ -68,7 +68,7 @@ export default function {{ pageName page }}() { const [payloadDiff, setPayloadDiff] = useState>({} as unknown as Record); const [editMode, setEditMode] = useState(false); const storeDiff: (attributeName: keyof {{ classDataName page.dataElement.target 'Stored' }}, value: any) => void = useCallback((attributeName: keyof {{ classDataName page.dataElement.target 'Stored' }}, value: any) => { - {{# if debugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/store-diff-body.hbs{{/ if }} {{> actor/src/fragments/page/store-diff-body.hbs classType=page.dataElement.target }} }, [data]); const [validation, setValidation] = useState>(new Map()); @@ -91,7 +91,7 @@ export default function {{ pageName page }}() { const title: string = t('{{ idToTranslationKey page.fQName application }}', { defaultValue: '{{ page.label }}' }); {{/ if }} - {{# if debugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/mapped-form-flags.hbs }} useConfirmationBeforeChange(editMode, t('judo.form.navigation.confirmation', { defaultValue: 'You have potential unsaved changes in your form, are you sure you would like to navigate away?' })); @@ -184,7 +184,7 @@ export default function {{ pageName page }}() { {{# each rootChild.children as |child| }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/relation/view/page-actions.hbs b/judo-ui-react/src/main/resources/actor/src/pages/relation/view/page-actions.hbs index 5fbb1311..dd84b9ef 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/relation/view/page-actions.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/relation/view/page-actions.hbs @@ -37,12 +37,12 @@ export function PageActions (props: PageActionsProps) { const {{ actionFunctionName action }} = {{ actionFunctionHookName action }}(); {{/ each }} - {{# if debugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} + {{# if isDebugPrint }}// include: actor/src/fragments/page/mapped-form-flags.hbs{{/ if }} {{> actor/src/fragments/page/mapped-form-flags.hbs }} return ( <> - {{# if debugPrint }}{/* include: actor/src/fragments/page/page-crud-actions.hbs */}{{/ if }} + {{# if isDebugPrint }}{/* include: actor/src/fragments/page/page-crud-actions.hbs */}{{/ if }} {{> actor/src/fragments/page/page-crud-actions.hbs }} ); diff --git a/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex.hbs b/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex.hbs index bf4fb256..344e9113 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex.hbs @@ -1,7 +1,7 @@ {{# if child.isDirectionHorizontal }} - {{# if debugPrint }}{/* include: actor/src/pages/widgets/flex/row.hbs */}{{/ if }} + {{# if isDebugPrint }}{/* include: actor/src/pages/widgets/flex/row.hbs */}{{/ if }} {{> actor/src/pages/widgets/flex/row.hbs }} {{ else }} - {{# if debugPrint }}{/* include: actor/src/pages/widgets/flex/column.hbs */}{{/ if }} + {{# if isDebugPrint }}{/* include: actor/src/pages/widgets/flex/column.hbs */}{{/ if }} {{> actor/src/pages/widgets/flex/column.hbs }} {{/ if }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/column.hbs b/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/column.hbs index 1b2745f7..796e3fdf 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/column.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/column.hbs @@ -16,7 +16,7 @@ {{# each this.children as |child| }} {{# if child }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ if }} {{/ each }} @@ -27,7 +27,7 @@ {{# each this.children as |child| }} {{# if child }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ if }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/row.hbs b/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/row.hbs index a2c97e95..56697991 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/row.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/widgets/flex/row.hbs @@ -16,7 +16,7 @@ {{# each this.children as |child| }} {{# if child }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ if }} {{/ each }} @@ -27,7 +27,7 @@ {{# each this.children as |child| }} {{# if child }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ if }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/actor/src/pages/widgets/tabcontroller.hbs b/judo-ui-react/src/main/resources/actor/src/pages/widgets/tabcontroller.hbs index 0e276d4b..f07998e2 100644 --- a/judo-ui-react/src/main/resources/actor/src/pages/widgets/tabcontroller.hbs +++ b/judo-ui-react/src/main/resources/actor/src/pages/widgets/tabcontroller.hbs @@ -28,7 +28,7 @@ > {{# each child.tabs as |tab| }} {{# with tab.element as |child| }} - {{# if debugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} + {{# if isDebugPrint }}{/* include: getWidgetTemplate() */}{{/ if }} {{> (getWidgetTemplate child) }} {{/ with }} {{/ each }} diff --git a/judo-ui-react/src/main/resources/fragment.header.hbs b/judo-ui-react/src/main/resources/fragment.header.hbs index 6ab422fc..07f53dc0 100644 --- a/judo-ui-react/src/main/resources/fragment.header.hbs +++ b/judo-ui-react/src/main/resources/fragment.header.hbs @@ -8,7 +8,7 @@ {{/ if}} // Path expression: {{{ cleanup template.pathExpression }}} // Template name: {{ template.name }} -{{# if debugPrint }} +{{# if isDebugPrint }} // Base URL: {{ template.templateBaseUri }} {{/ if }} // Template file: {{ template.templateName }}