@inseefr/lunatic 2.4.7 → 2.4.8-dynamicArray
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/lib/components/duration/duration.js +117 -0
- package/lib/components/duration/duration.scss +16 -0
- package/lib/components/duration/duration.spec.js +49 -0
- package/lib/components/duration/index.js +13 -0
- package/lib/components/duration/useDurationValues.js +124 -0
- package/lib/components/index.js +7 -0
- package/lib/components/loop/loop.js +2 -2
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +35 -32
- package/lib/components/loop/roster-for-loop/roster-table.js +17 -16
- package/lib/components/loop/roster-for-loop/roster.scss +32 -34
- package/lib/components/loop/roster-for-loop/row.js +48 -19
- package/lib/hooks/use-did-change.js +19 -0
- package/lib/hooks/use-why-render.js +20 -0
- package/lib/src/components/duration/duration.d.ts +4 -0
- package/lib/src/components/duration/duration.spec.d.ts +1 -0
- package/lib/src/components/duration/index.d.ts +1 -0
- package/lib/src/components/duration/useDurationValues.d.ts +43 -0
- package/lib/src/components/index.d.ts +1 -0
- package/lib/src/components/loop/block-for-loop/block-for-loop-ochestrator.d.ts +1 -1
- package/lib/src/components/loop/block-for-loop/block-for-loop.d.ts +1 -1
- package/lib/src/components/loop/roster-for-loop/roster-for-loop-orchestrator.d.ts +1 -1
- package/lib/src/components/loop/roster-for-loop/roster-for-loop.d.ts +4 -4
- package/lib/src/components/loop/roster-for-loop/roster-table.d.ts +2 -2
- package/lib/src/components/type.d.ts +9 -2
- package/lib/src/hooks/use-did-change.d.ts +4 -0
- package/lib/src/hooks/use-why-render.d.ts +4 -0
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -2
- package/lib/src/use-lunatic/use-lunatic.d.ts +1 -1
- package/lib/stories/duration/duration.stories.js +41 -0
- package/lib/stories/duration/source.json +32 -0
- package/lib/stories/duration/source1.json +32 -0
- package/lib/stories/loop/block-for-loop.stories.js +1 -8
- package/lib/stories/loop/roster-for-loop.stories.js +8 -1
- package/lib/stories/loop/source-with-header.json +16 -4
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +1 -1
- package/lib/use-lunatic/commons/use-components-from-state.js +2 -14
- package/package.json +2 -2
- package/lib/components/loop/roster-for-loop/body.js +0 -52
- package/lib/components/loop/roster-for-loop/header.js +0 -34
- package/lib/src/components/loop/roster-for-loop/body.d.ts +0 -12
- package/lib/src/components/loop/roster-for-loop/header.d.ts +0 -9
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _htmlTable = require("../../commons/components/html-table");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
function Header(_ref) {
|
|
12
|
-
var header = _ref.header,
|
|
13
|
-
id = _ref.id;
|
|
14
|
-
if (!Array.isArray(header)) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_htmlTable.Thead, {
|
|
18
|
-
id: id,
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_htmlTable.Tr, {
|
|
20
|
-
id: id,
|
|
21
|
-
row: 0,
|
|
22
|
-
children: header.map(function (_ref2, index) {
|
|
23
|
-
var label = _ref2.label;
|
|
24
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_htmlTable.Th, {
|
|
25
|
-
id: id,
|
|
26
|
-
index: index,
|
|
27
|
-
children: label
|
|
28
|
-
}, "".concat(label, "-").concat(index));
|
|
29
|
-
})
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
var _default = Header;
|
|
34
|
-
exports["default"] = _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { LunaticComponentProps } from '../../type';
|
|
2
|
-
type Props = {
|
|
3
|
-
nbRows: number;
|
|
4
|
-
handleChange: (response: {
|
|
5
|
-
name: string;
|
|
6
|
-
}, value: unknown, args: {
|
|
7
|
-
index: number;
|
|
8
|
-
[k: string]: unknown;
|
|
9
|
-
}) => void;
|
|
10
|
-
} & Pick<LunaticComponentProps<'RosterForLoop'>, 'id' | 'components' | 'executeExpression' | 'headers' | 'value' | 'management' | 'missing' | 'shortcut' | 'errors'>;
|
|
11
|
-
declare function Body({ id, components, nbRows, executeExpression, handleChange, value: valueMap, missing, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
-
export default Body;
|