@inseefr/lunatic 2.4.3-beta → 2.4.4-FeatAltDeclarations
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/component-set/html/component-set-components.js +4 -2
- package/lib/components/index.js +14 -0
- package/lib/components/questions/index.js +20 -0
- package/lib/components/questions/question-context.js +35 -0
- package/lib/components/questions/question-context.scss +10 -0
- package/lib/components/questions/question-information.js +35 -0
- package/lib/components/questions/question-information.scss +19 -0
- package/lib/components/sequence/html/sequence.js +22 -0
- package/lib/components/sequence/index.js +2 -2
- package/lib/components/sequence/lunatic-sequence.js +31 -0
- package/lib/components/sequence/sequence.spec.js +18 -23
- package/lib/components/suggester/idb-suggester/check-store.js +5 -3
- package/lib/components/table/lunatic-table.js +1 -2
- package/lib/components/table/table-orchestrator.js +2 -4
- package/lib/src/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.d.ts +1 -2
- package/lib/src/components/checkbox/checkbox-group/checkbox-group-content.d.ts +1 -2
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group-content.d.ts +1 -2
- package/lib/src/components/checkbox/checkbox-group/lunatic-checkbox-group.d.ts +1 -1
- package/lib/src/components/checkbox/checkbox-one/lunatic-checkbox-one.d.ts +1 -2
- package/lib/src/components/commons/components/combo-box/combo-box-container.d.ts +1 -1
- package/lib/src/components/commons/components/combo-box/combo-box-content.d.ts +1 -1
- package/lib/src/components/commons/components/combo-box/panel/option-container.d.ts +1 -1
- package/lib/src/components/commons/components/combo-box/panel/panel-container.d.ts +1 -1
- package/lib/src/components/commons/components/combo-box/panel/panel.d.ts +1 -1
- package/lib/src/components/commons/components/combo-box/selection/delete.d.ts +1 -2
- package/lib/src/components/commons/components/combo-box/selection/displayLabelOrInput.d.ts +1 -1
- package/lib/src/components/commons/components/combo-box/selection/input.d.ts +1 -2
- package/lib/src/components/commons/components/combo-box/selection/label-selection.d.ts +2 -2
- package/lib/src/components/commons/components/combo-box/selection/selection-container.d.ts +1 -1
- package/lib/src/components/commons/components/combo-box/selection/selection.d.ts +1 -2
- package/lib/src/components/commons/components/default-label-renderer.d.ts +1 -2
- package/lib/src/components/commons/components/default-option-renderer.d.ts +1 -2
- package/lib/src/components/commons/components/description.d.ts +1 -1
- package/lib/src/components/commons/components/dragger/dragger.d.ts +1 -1
- package/lib/src/components/commons/components/errors/errors.d.ts +1 -2
- package/lib/src/components/commons/components/fab/fab.d.ts +1 -1
- package/lib/src/components/commons/components/field-container/field-container.d.ts +1 -1
- package/lib/src/components/commons/components/is-network/is-network.d.ts +1 -2
- package/lib/src/components/commons/components/lunatic-component-with-label.d.ts +1 -1
- package/lib/src/components/commons/components/lunatic-component-without-label.d.ts +1 -1
- package/lib/src/components/commons/components/md-label/link.d.ts +1 -1
- package/lib/src/components/commons/components/md-label/md-label.d.ts +1 -2
- package/lib/src/components/commons/components/missing/missing.d.ts +2 -3
- package/lib/src/components/commons/components/nothing-to-display.d.ts +1 -2
- package/lib/src/components/commons/components/orchestrated-component.d.ts +2 -3
- package/lib/src/components/commons/components/variable-status/variable-status.d.ts +1 -1
- package/lib/src/components/commons/create-row-orchestrator.d.ts +1 -1
- package/lib/src/components/commons/icons/checkbox-checked-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/checkbox-unchecked-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/closed-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/cross-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/load-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/lunatic-icon.d.ts +1 -1
- package/lib/src/components/commons/icons/network-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/on-drag-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/opened-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/radio-checked-icon.d.ts +1 -2
- package/lib/src/components/commons/icons/radio-unchecked-icon.d.ts +1 -2
- package/lib/src/components/component-set/html/component-set-components.d.ts +2 -2
- package/lib/src/components/component-set/html/legend/legend.d.ts +1 -1
- package/lib/src/components/component-set/lunatic-component-set.d.ts +1 -2
- package/lib/src/components/datepicker/html/datepicker-container.d.ts +1 -1
- package/lib/src/components/datepicker/html/datepicker-input.d.ts +1 -1
- package/lib/src/components/declarations/declarations-after-text.d.ts +1 -2
- package/lib/src/components/declarations/declarations-before-text.d.ts +1 -2
- package/lib/src/components/declarations/declarations-detachable.d.ts +1 -2
- package/lib/src/components/dropdown/html/dropdown-simple/dropdown-simple.d.ts +1 -2
- package/lib/src/components/dropdown/html/dropdown-simple/simple-label-renderer.d.ts +1 -2
- package/lib/src/components/dropdown/html/dropdown-simple/simple-option-renderer.d.ts +1 -2
- package/lib/src/components/dropdown/html/dropdown-writable/dropdown-writable.d.ts +1 -1
- package/lib/src/components/dropdown/html/dropdown-writable/writable-label-renderer.d.ts +1 -2
- package/lib/src/components/dropdown/html/dropdown-writable/writable-option-renderer.d.ts +1 -2
- package/lib/src/components/dropdown/lunatic-dropdown.d.ts +1 -2
- package/lib/src/components/index.d.ts +2 -0
- package/lib/src/components/input/lunatic-input.d.ts +1 -2
- package/lib/src/components/input-number/html/input-number-default.d.ts +1 -2
- package/lib/src/components/input-number/html/input-number-thousand.d.ts +1 -2
- package/lib/src/components/input-number/lunatic-input-number.d.ts +1 -2
- package/lib/src/components/loop/block-for-loop/block-for-loop-ochestrator.d.ts +1 -1
- package/lib/src/components/loop/block-for-loop/row.d.ts +1 -2
- package/lib/src/components/loop/commons/handle-row-button.d.ts +1 -1
- package/lib/src/components/loop/commons/row-component.d.ts +1 -2
- package/lib/src/components/loop/loop.d.ts +1 -2
- package/lib/src/components/loop/roster-for-loop/body.d.ts +1 -2
- package/lib/src/components/loop/roster-for-loop/header.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-table.d.ts +1 -2
- package/lib/src/components/loop/roster-for-loop/row.d.ts +1 -2
- package/lib/src/components/modal-controls/close-or-skip.d.ts +1 -1
- package/lib/src/components/modal-controls/modal-controls.d.ts +1 -1
- package/lib/src/components/pairwise-links/orchestrator.d.ts +1 -2
- package/lib/src/components/pairwise-links/pairwise-links.d.ts +1 -2
- package/lib/src/components/pairwise-links/row.d.ts +1 -2
- package/lib/src/components/questions/index.d.ts +2 -0
- package/lib/src/components/{sequence/sequence.d.ts → questions/question-context.d.ts} +2 -2
- package/lib/src/components/questions/question-information.d.ts +4 -0
- package/lib/src/components/radio/html/radio-group-content.d.ts +1 -1
- package/lib/src/components/roundabout/lunatic-roundabout.d.ts +1 -2
- package/lib/src/components/roundabout/redirect.d.ts +1 -2
- package/lib/src/components/sequence/html/sequence.d.ts +5 -0
- package/lib/src/components/sequence/index.d.ts +1 -1
- package/lib/src/components/sequence/lunatic-sequence.d.ts +3 -0
- package/lib/src/components/suggester/idb-suggester/check-store.d.ts +1 -1
- package/lib/src/components/suggester/idb-suggester/idb-suggester.d.ts +1 -2
- package/lib/src/components/suggester/idb-suggester/suggester-status.d.ts +1 -1
- package/lib/src/components/suggester/lunatic-suggester.d.ts +1 -2
- package/lib/src/components/suggester-loader-widget/loader-row.d.ts +1 -2
- package/lib/src/components/suggester-loader-widget/loader.d.ts +1 -2
- package/lib/src/components/suggester-loader-widget/progress.d.ts +1 -2
- package/lib/src/components/suggester-loader-widget/tools/action-tool.d.ts +1 -1
- package/lib/src/components/suggester-loader-widget/tools/tools.d.ts +1 -1
- package/lib/src/components/suggester-loader-widget/widget.d.ts +1 -2
- package/lib/src/components/switch/lunatic-switch.d.ts +1 -2
- package/lib/src/components/table/cell.d.ts +2 -3
- package/lib/src/components/table/header.d.ts +1 -1
- package/lib/src/components/table/lunatic-table.d.ts +1 -2
- package/lib/src/components/table/row.d.ts +2 -3
- package/lib/src/components/table/table-orchestrator.d.ts +2 -3
- package/lib/src/components/textarea/lunatic-textarea.d.ts +1 -2
- package/lib/src/components/type.d.ts +1 -0
- package/lib/stories/input/input.stories.js +9 -1
- package/lib/stories/input/source-with-question.json +74 -0
- package/lib/stories/sequence/sequence.stories.js +34 -0
- package/lib/stories/sequence/source-declarations.json +31 -0
- package/package.json +1 -1
- package/lib/components/sequence/sequence.js +0 -35
- /package/lib/components/sequence/{sequence.scss → html/sequence.scss} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SuggesterType } from '../../use-lunatic/type-source';
|
|
3
2
|
type Props = {
|
|
4
3
|
idbVersion?: number;
|
|
@@ -9,5 +8,5 @@ type Props = {
|
|
|
9
8
|
start?: boolean;
|
|
10
9
|
store: SuggesterType;
|
|
11
10
|
};
|
|
12
|
-
declare function Loader({ start, db, store, idbVersion, fetch, post, handleClick, }: Props): JSX.Element;
|
|
11
|
+
declare function Loader({ start, db, store, idbVersion, fetch, post, handleClick, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export default Loader;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type Props = {
|
|
3
2
|
display?: boolean;
|
|
4
3
|
percent?: number;
|
|
5
4
|
handleClick?: (v: number) => void;
|
|
6
5
|
};
|
|
7
|
-
declare function Progress({ display, percent, handleClick }: Props): JSX.Element | null;
|
|
6
|
+
declare function Progress({ display, percent, handleClick }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
8
7
|
export default Progress;
|
|
@@ -5,5 +5,5 @@ type Props = PropsWithChildren<{
|
|
|
5
5
|
title?: string;
|
|
6
6
|
display?: boolean;
|
|
7
7
|
}>;
|
|
8
|
-
declare function ActionTool({ children, ariaLabel, className, title, display, }: Props): JSX.Element | null;
|
|
8
|
+
declare function ActionTool({ children, ariaLabel, className, title, display, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
export default ActionTool;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './widget.scss';
|
|
3
2
|
import { SuggesterType } from '../../use-lunatic/type-source';
|
|
4
3
|
type Props = {
|
|
@@ -12,5 +11,5 @@ type Props = {
|
|
|
12
11
|
fetch: () => Promise<unknown[]>;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
declare function SuggesterLoaderWidget({ source, getStoreInfo, onRefresh, absolute, }: Props): JSX.Element;
|
|
14
|
+
declare function SuggesterLoaderWidget({ source, getStoreInfo, onRefresh, absolute, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export default SuggesterLoaderWidget;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LunaticComponentProps } from '../type';
|
|
3
|
-
declare function LunaticSwitch({ id, value, statusLabel, handleChange, response, preferences, declarations, missing, missingResponse, management, description, label, errors, }: LunaticComponentProps<'Switch'>): JSX.Element;
|
|
2
|
+
declare function LunaticSwitch({ id, value, statusLabel, handleChange, response, preferences, declarations, missing, missingResponse, management, description, label, errors, }: LunaticComponentProps<'Switch'>): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default LunaticSwitch;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LunaticBaseProps } from '../type';
|
|
3
2
|
import type { LunaticComponentDefinition, LunaticExpression } from '../../use-lunatic/type';
|
|
4
3
|
type Props = {
|
|
@@ -14,7 +13,7 @@ type Props = {
|
|
|
14
13
|
row?: string | number;
|
|
15
14
|
index?: string | number;
|
|
16
15
|
handleChange: LunaticBaseProps['handleChange'];
|
|
17
|
-
errors
|
|
16
|
+
errors?: LunaticBaseProps['errors'];
|
|
18
17
|
};
|
|
19
|
-
declare function Cell({ content, id, executeExpression, iteration, value, row, index, handleChange, errors, }: Props): JSX.Element;
|
|
18
|
+
declare function Cell({ content, id, executeExpression, iteration, value, row, index, handleChange, errors, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export default Cell;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LunaticComponentProps } from '../type';
|
|
3
|
-
declare function LunaticTable(props: LunaticComponentProps<'Table'>): JSX.Element;
|
|
2
|
+
declare function LunaticTable(props: LunaticComponentProps<'Table'>): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default LunaticTable;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { LunaticComponentDefinition, LunaticExpression } from '../../use-lunatic/type';
|
|
3
2
|
import { LunaticBaseProps } from '../type';
|
|
4
3
|
type Props = {
|
|
@@ -13,7 +12,7 @@ type Props = {
|
|
|
13
12
|
valueMap: Record<string, unknown>;
|
|
14
13
|
rowIndex?: string | number;
|
|
15
14
|
handleChange: LunaticBaseProps['handleChange'];
|
|
16
|
-
errors
|
|
15
|
+
errors?: LunaticBaseProps['errors'];
|
|
17
16
|
};
|
|
18
|
-
declare function Row({ id, components, executeExpression, valueMap, rowIndex, iteration, handleChange, errors, }: Props): JSX.Element;
|
|
17
|
+
declare function Row({ id, components, executeExpression, valueMap, rowIndex, iteration, handleChange, errors, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
export default Row;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LunaticComponentProps } from '../type';
|
|
3
|
-
type Props = {} & Pick<LunaticComponentProps<'Table'>, 'body' | 'id' | 'executeExpression' | 'value' | 'handleChange' | 'iteration'
|
|
4
|
-
declare function TableOrchestrator({ body, id, executeExpression, value: valueMap, handleChange, iteration,
|
|
2
|
+
type Props = {} & Pick<LunaticComponentProps<'Table'>, 'body' | 'id' | 'executeExpression' | 'value' | 'handleChange' | 'iteration'>;
|
|
3
|
+
declare function TableOrchestrator({ body, id, executeExpression, value: valueMap, handleChange, iteration, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
5
4
|
export default TableOrchestrator;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
2
|
import { LunaticComponentProps } from '../type';
|
|
4
3
|
declare const LunaticTextarea: {
|
|
5
|
-
(props: LunaticComponentProps<'Textarea'>): JSX.Element;
|
|
4
|
+
(props: LunaticComponentProps<'Textarea'>): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
defaultProps: {
|
|
7
6
|
rows: number;
|
|
8
7
|
maxLength: number;
|
|
@@ -69,6 +69,7 @@ type ComponentPropsByType = {
|
|
|
69
69
|
};
|
|
70
70
|
Sequence: Pick<LunaticBaseProps<string>, 'id' | 'declarations' | 'label' | 'style'>;
|
|
71
71
|
Subsequence: Pick<LunaticBaseProps<string>, 'id' | 'declarations' | 'label'>;
|
|
72
|
+
Question: Pick<LunaticBaseProps<unknown>, 'label' | 'description'>;
|
|
72
73
|
ComponentSet: LunaticBaseProps<unknown> & {
|
|
73
74
|
components: LunaticComponentDefinition[];
|
|
74
75
|
value: Record<string, unknown>;
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.Default = void 0;
|
|
6
|
+
exports["default"] = exports.WithQuestion = exports.Default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
|
|
9
9
|
var _source = _interopRequireDefault(require("./source"));
|
|
10
|
+
var _sourceWithQuestion = _interopRequireDefault(require("./source-with-question"));
|
|
10
11
|
var _data = _interopRequireDefault(require("./data"));
|
|
11
12
|
var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -33,4 +34,11 @@ Default.args = {
|
|
|
33
34
|
id: 'input',
|
|
34
35
|
source: _source["default"],
|
|
35
36
|
data: _data["default"]
|
|
37
|
+
};
|
|
38
|
+
var WithQuestion = Template.bind({});
|
|
39
|
+
exports.WithQuestion = WithQuestion;
|
|
40
|
+
WithQuestion.args = {
|
|
41
|
+
id: 'input',
|
|
42
|
+
source: _sourceWithQuestion["default"],
|
|
43
|
+
data: _data["default"]
|
|
36
44
|
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"componentType": "QuestionInformation",
|
|
5
|
+
"label": { "value": "\"Question Information\"", "type": "VTL|MD" },
|
|
6
|
+
"description": { "value": "\"Question Information description\"", "type": "VTL|MD" },
|
|
7
|
+
"page": "1"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"componentType": "Input",
|
|
11
|
+
"label": {
|
|
12
|
+
"value": "\"Prénom de l'occupant principal.\"",
|
|
13
|
+
"type": "VTL|MD"
|
|
14
|
+
},
|
|
15
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
16
|
+
"maxLength": 30,
|
|
17
|
+
"id": "name",
|
|
18
|
+
"response": {
|
|
19
|
+
"name": "PRENOM"
|
|
20
|
+
},
|
|
21
|
+
"page": "1"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"componentType": "QuestionContext",
|
|
25
|
+
"label": { "value": "\"Question Context\"", "type": "VTL|MD" },
|
|
26
|
+
"description": { "value": "\"Question Context description\"", "type": "VTL|MD" },
|
|
27
|
+
"page": "1"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"componentType": "Input",
|
|
31
|
+
"label": {
|
|
32
|
+
"value": "\"Nom de l'occupant principal.\"",
|
|
33
|
+
"type": "VTL|MD"
|
|
34
|
+
},
|
|
35
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
36
|
+
"maxLength": 30,
|
|
37
|
+
"id": "surname",
|
|
38
|
+
"description": {
|
|
39
|
+
"value": "\"For example, Bob.\"",
|
|
40
|
+
"type": "VTL|MD"
|
|
41
|
+
},
|
|
42
|
+
"response": {
|
|
43
|
+
"name": "NOM"
|
|
44
|
+
},
|
|
45
|
+
"page": "1"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"variables": [
|
|
49
|
+
{
|
|
50
|
+
"variableType": "COLLECTED",
|
|
51
|
+
"name": "NOM",
|
|
52
|
+
"componentRef": "name",
|
|
53
|
+
"values": {
|
|
54
|
+
"PREVIOUS": null,
|
|
55
|
+
"COLLECTED": null,
|
|
56
|
+
"FORCED": null,
|
|
57
|
+
"EDITED": null,
|
|
58
|
+
"INPUTED": null
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"variableType": "COLLECTED",
|
|
63
|
+
"name": "PRENOM",
|
|
64
|
+
"componentRef": "name",
|
|
65
|
+
"values": {
|
|
66
|
+
"PREVIOUS": null,
|
|
67
|
+
"COLLECTED": null,
|
|
68
|
+
"FORCED": null,
|
|
69
|
+
"EDITED": null,
|
|
70
|
+
"INPUTED": null
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.WithDeclarations = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
|
|
9
|
+
var _sourceDeclarations = _interopRequireDefault(require("./source-declarations.json"));
|
|
10
|
+
var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
var stories = {
|
|
20
|
+
title: 'Components/Sequence',
|
|
21
|
+
component: _orchestrator["default"],
|
|
22
|
+
argTypes: _objectSpread({}, _defaultArgTypes["default"])
|
|
23
|
+
};
|
|
24
|
+
var _default = stories;
|
|
25
|
+
exports["default"] = _default;
|
|
26
|
+
var Template = function Template(args) {
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_orchestrator["default"], _objectSpread({}, args));
|
|
28
|
+
};
|
|
29
|
+
var WithDeclarations = Template.bind({});
|
|
30
|
+
exports.WithDeclarations = WithDeclarations;
|
|
31
|
+
WithDeclarations.args = {
|
|
32
|
+
id: 'sequence-declarations',
|
|
33
|
+
source: _sourceDeclarations["default"]
|
|
34
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxPages": "1",
|
|
3
|
+
"components": [
|
|
4
|
+
{
|
|
5
|
+
"componentType": "Sequence",
|
|
6
|
+
"page": "1",
|
|
7
|
+
"conditionFilter": { "value": "true", "type": "VTL" },
|
|
8
|
+
"label": { "value": "\"Sequence example\"", "type": "VTL|MD" },
|
|
9
|
+
"declarations": [
|
|
10
|
+
{
|
|
11
|
+
"id": "kb9hi4j0-krnoclfe",
|
|
12
|
+
"declarationType": "INSTRUCTION",
|
|
13
|
+
"position": "BEFORE_QUESTION_TEXT",
|
|
14
|
+
"label": {
|
|
15
|
+
"value": "\"Déclaration Before\"",
|
|
16
|
+
"type": "VTL|MD"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "kb9hi4j0-krnoclfe",
|
|
21
|
+
"declarationType": "HELP",
|
|
22
|
+
"position": "DETACHABLE",
|
|
23
|
+
"label": {
|
|
24
|
+
"value": "\"Declaration Detachable\"",
|
|
25
|
+
"type": "VTL|MD"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _declarations = require("../declarations");
|
|
8
|
-
require("./sequence.scss");
|
|
9
|
-
var _commons = require("../commons");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function Sequence(_ref) {
|
|
12
|
-
var declarations = _ref.declarations,
|
|
13
|
-
label = _ref.label,
|
|
14
|
-
id = _ref.id,
|
|
15
|
-
style = _ref.style;
|
|
16
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
17
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_declarations.DeclarationsBeforeText, {
|
|
18
|
-
declarations: declarations,
|
|
19
|
-
id: id
|
|
20
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21
|
-
className: "sequence-lunatic",
|
|
22
|
-
id: "sequence-".concat(id),
|
|
23
|
-
style: style,
|
|
24
|
-
children: label
|
|
25
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_declarations.DeclarationsAfterText, {
|
|
26
|
-
declarations: declarations,
|
|
27
|
-
id: id
|
|
28
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_declarations.DeclarationsDetachable, {
|
|
29
|
-
declarations: declarations,
|
|
30
|
-
id: id
|
|
31
|
-
})]
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
var _default = (0, _commons.createCustomizableLunaticField)(Sequence, 'Sequence');
|
|
35
|
-
exports["default"] = _default;
|
|
File without changes
|