@rsuci/shared-form-components 1.0.38 → 1.0.40
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.
|
@@ -170,7 +170,7 @@ const FormRendererInner = () => {
|
|
|
170
170
|
if (!formulaire || !formulaire.groupes || formulaire.groupes.length === 0) {
|
|
171
171
|
return (_jsx("div", { className: "min-h-screen bg-gray-50 flex items-center justify-center", children: _jsxs("div", { className: "bg-white rounded-lg shadow-sm border border-gray-200 p-8 text-center max-w-md", children: [_jsx("div", { className: "text-red-500 mb-4", children: _jsx("svg", { className: "w-12 h-12 mx-auto", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.732-.833-2.5 0L4.268 18.5c-.77.833.192 2.5 1.732 2.5z" }) }) }), _jsx("h3", { className: "text-lg font-medium text-gray-900 mb-2", children: "Formulaire non configur\u00E9" }), _jsx("p", { className: "text-gray-600 mb-4", children: "Ce formulaire ne contient aucun groupe de variables." }), _jsx("button", { onClick: callbacks.onCancel, className: "inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700", children: "Retour" })] }) }));
|
|
172
172
|
}
|
|
173
|
-
return (_jsxs("div", { className: "min-h-screen bg-gray-50", children: [_jsxs("div", { className: "max-w-4xl mx-auto px-4 py-6", children: [_jsxs("div", { className: "bg-white rounded-lg shadow-sm border border-gray-200 p-4 mb-6", children: [_jsx("h1", { className: "text-xl font-semibold text-gray-900 mb-4", children: formulaire.designation }), _jsx(FormProgress, { showPercentage: true })] }), _jsxs("div", { className: "bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden mb-6", children: [_jsx("div", { className: "bg-green-600 px-6 py-4", children:
|
|
173
|
+
return (_jsxs("div", { className: "min-h-screen bg-gray-50", children: [_jsxs("div", { className: "max-w-4xl mx-auto px-4 py-6", children: [_jsxs("div", { className: "bg-white rounded-lg shadow-sm border border-gray-200 p-4 mb-6", children: [_jsx("h1", { className: "text-xl font-semibold text-gray-900 mb-4", children: formulaire.designation }), _jsx(FormProgress, { showPercentage: true })] }), _jsxs("div", { className: "bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden mb-6", children: [_jsx("div", { className: "bg-green-600 px-6 py-4", children: _jsx("h2", { className: "text-xl font-bold text-white uppercase tracking-wide", children: currentGroup?.designation }) }), _jsxs("div", { className: "p-6", children: [currentGroup?.estMultiple && currentGroup.instances && (_jsx("div", { className: "mb-6", children: _jsx(GroupeInstanceTabs, { groupe: currentGroup, currentInstanceIndex: navigation.navigationState.instanceIndex, responses: responses, onInstanceChange: handleInstanceChange, onInstanceAdded: handleInstanceAdded, onInstanceRemoved: handleInstanceRemoved, disabled: effectiveDisabled }) })), _jsx("div", { className: "space-y-6", children: visibleVariables.map(variable => {
|
|
174
174
|
const responseKey = currentGroup?.estMultiple && currentInstance?.numeroInstance
|
|
175
175
|
? `${variable.code}_${currentInstance.numeroInstance}`
|
|
176
176
|
: variable.code;
|
|
@@ -161,7 +161,7 @@ const GroupeInstanceTabs = ({ groupe, currentInstanceIndex, responses, onInstanc
|
|
|
161
161
|
const handleCancelRemoveInstance = () => {
|
|
162
162
|
setShowDeleteConfirmation(false);
|
|
163
163
|
};
|
|
164
|
-
return (_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex items-center space-x-2 overflow-x-auto pb-2 relative", children: [_jsx("div", { className: "flex space-x-2 flex-shrink-0", children: displayedInstances.map((instance, index) => {
|
|
164
|
+
return (_jsxs("div", { className: "w-full bg-green-50 rounded-lg p-4 border border-green-200", children: [_jsxs("div", { className: "flex items-center space-x-2 overflow-x-auto pb-2 relative", children: [_jsx("div", { className: "flex space-x-2 flex-shrink-0", children: displayedInstances.map((instance, index) => {
|
|
165
165
|
const isActive = index === currentInstanceIndex;
|
|
166
166
|
const display = getInstanceDisplay(instance, isActive);
|
|
167
167
|
return (_jsxs("button", { onClick: () => handleInstanceClick(index), disabled: isProcessing, className: display.className, title: `Instance ${instance.numeroInstance} - ${getInstanceState(instance) === 'complete' ? 'Complète' : getInstanceState(instance) === 'incomplete' ? 'Incomplète' : 'Vide'}`, children: [_jsx("span", { className: "font-semibold", children: instance.numeroInstance }), display.icon] }, instance.numeroInstance));
|
package/package.json
CHANGED