@inseefr/lunatic 2.7.14 → 2.7.16
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/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +3 -1
- package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +4 -1
- package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +7 -2
- package/lib/components/commons/components/missing/missing.js +4 -1
- package/lib/components/commons/components/missing/missing.scss +26 -29
- package/lib/components/datepicker/lunatic-datepicker.js +1 -0
- package/lib/components/dropdown/lunatic-dropdown.js +1 -0
- package/lib/components/duration/duration.js +4 -1
- package/lib/components/input/lunatic-input.js +1 -0
- package/lib/components/input-number/lunatic-input-number.js +1 -0
- package/lib/components/radio/lunatic-radio-group.js +1 -0
- package/lib/components/suggester/lunatic-suggester.js +1 -0
- package/lib/components/switch/lunatic-switch.js +7 -2
- package/lib/components/textarea/lunatic-textarea.js +3 -1
- package/lib/src/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.d.ts +1 -1
- 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 -1
- package/lib/src/components/commons/components/lunatic-component-without-label.d.ts +1 -1
- package/lib/src/components/commons/components/missing/missing.d.ts +2 -1
- package/lib/src/components/switch/html/switch.d.ts +1 -0
- package/lib/src/components/switch/lunatic-switch.d.ts +1 -1
- package/lib/src/use-lunatic/commons/execute-condition-filter.d.ts +1 -1
- package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +1 -0
- package/lib/src/utils/array.d.ts +11 -0
- package/lib/src/utils/variables.spec.d.ts +1 -0
- package/lib/stories/behaviour/missing/missing.stories.js +90 -0
- package/lib/stories/behaviour/missing/source.json +822 -0
- package/lib/stories/utils/referentiel.js +3 -3
- package/lib/use-lunatic/commons/execute-condition-filter.js +4 -1
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +4 -2
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +28 -17
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js +20 -5
- package/lib/utils/array.js +34 -0
- package/lib/utils/array.spec.js +5 -0
- package/lib/utils/variables.js +4 -15
- package/lib/utils/variables.spec.js +74 -0
- package/package.json +1 -1
|
@@ -24,13 +24,15 @@ function LunaticCheckboxBoolean(_ref) {
|
|
|
24
24
|
missing = _ref.missing,
|
|
25
25
|
missingResponse = _ref.missingResponse,
|
|
26
26
|
management = _ref.management,
|
|
27
|
-
description = _ref.description
|
|
27
|
+
description = _ref.description,
|
|
28
|
+
readOnly = _ref.readOnly;
|
|
28
29
|
var onChange = (0, _useOnHandleChange["default"])({
|
|
29
30
|
handleChange: handleChange,
|
|
30
31
|
response: response,
|
|
31
32
|
value: value
|
|
32
33
|
});
|
|
33
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
|
|
35
|
+
disabled: readOnly || disabled,
|
|
34
36
|
id: id,
|
|
35
37
|
preferences: preferences,
|
|
36
38
|
declarations: declarations,
|
|
@@ -22,7 +22,9 @@ function LunaticCheckboxGroup(_ref) {
|
|
|
22
22
|
declarations = _ref.declarations,
|
|
23
23
|
missingResponse = _ref.missingResponse,
|
|
24
24
|
missing = _ref.missing,
|
|
25
|
-
management = _ref.management
|
|
25
|
+
management = _ref.management,
|
|
26
|
+
readOnly = _ref.readOnly,
|
|
27
|
+
disabled = _ref.disabled;
|
|
26
28
|
var options = responses.map(function (_ref2) {
|
|
27
29
|
var label = _ref2.label,
|
|
28
30
|
response = _ref2.response,
|
|
@@ -39,6 +41,7 @@ function LunaticCheckboxGroup(_ref) {
|
|
|
39
41
|
};
|
|
40
42
|
});
|
|
41
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
|
|
44
|
+
disabled: readOnly || disabled,
|
|
42
45
|
id: id,
|
|
43
46
|
label: label,
|
|
44
47
|
preferences: preferences,
|
|
@@ -24,13 +24,16 @@ function LunaticCheckboxOne(_ref) {
|
|
|
24
24
|
missingResponse = _ref.missingResponse,
|
|
25
25
|
missing = _ref.missing,
|
|
26
26
|
management = _ref.management,
|
|
27
|
-
shortcut = _ref.shortcut
|
|
27
|
+
shortcut = _ref.shortcut,
|
|
28
|
+
readOnly = _ref.readOnly,
|
|
29
|
+
disabled = _ref.disabled;
|
|
28
30
|
var onSelect = (0, _useOnHandleChange["default"])({
|
|
29
31
|
handleChange: handleChange,
|
|
30
32
|
response: response,
|
|
31
33
|
value: value
|
|
32
34
|
});
|
|
33
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
|
|
36
|
+
disabled: readOnly || disabled,
|
|
34
37
|
id: id,
|
|
35
38
|
label: label,
|
|
36
39
|
preferences: preferences,
|
|
@@ -49,7 +52,9 @@ function LunaticCheckboxOne(_ref) {
|
|
|
49
52
|
errors: (0, _errors.getComponentErrors)(errors, id),
|
|
50
53
|
onSelect: onSelect,
|
|
51
54
|
label: label,
|
|
52
|
-
shortcut: shortcut
|
|
55
|
+
shortcut: shortcut,
|
|
56
|
+
readOnly: readOnly,
|
|
57
|
+
disabled: disabled
|
|
53
58
|
})
|
|
54
59
|
});
|
|
55
60
|
}
|
|
@@ -36,7 +36,8 @@ var MissingPure = exports.MissingPure = function MissingPure(props) {
|
|
|
36
36
|
shortcut = props.shortcut,
|
|
37
37
|
missingShortcut = props.missingShortcut,
|
|
38
38
|
dontKnowButton = props.dontKnowButton,
|
|
39
|
-
refusedButton = props.refusedButton
|
|
39
|
+
refusedButton = props.refusedButton,
|
|
40
|
+
disabled = props.disabled;
|
|
40
41
|
var value = missingResponse === null || missingResponse === void 0 ? void 0 : missingResponse.value;
|
|
41
42
|
var onClick = (0, _useOnHandleChange["default"])({
|
|
42
43
|
handleChange: handleChange,
|
|
@@ -61,12 +62,14 @@ var MissingPure = exports.MissingPure = function MissingPure(props) {
|
|
|
61
62
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
62
63
|
className: "missing-button".concat(value === _constants.DK ? '-active' : '', " missing-button-dk").concat(value === _constants.DK ? '-active' : ''),
|
|
63
64
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button["default"], {
|
|
65
|
+
disabled: disabled,
|
|
64
66
|
label: dontKnowButton,
|
|
65
67
|
onClick: onClickDK
|
|
66
68
|
})
|
|
67
69
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
68
70
|
className: "missing-button".concat(value === _constants.RF ? '-active' : '', " missing-button-rf").concat(value === _constants.RF ? '-active' : ''),
|
|
69
71
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button["default"], {
|
|
72
|
+
disabled: disabled,
|
|
70
73
|
label: refusedButton,
|
|
71
74
|
onClick: onClickRF
|
|
72
75
|
})
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
.missing-buttons {
|
|
2
|
+
margin-top: 1em;
|
|
3
|
+
}
|
|
4
|
+
.missing-buttons .button-lunatic {
|
|
5
|
+
width: 4em;
|
|
6
|
+
font-size: 1em;
|
|
7
|
+
font-weight: normal;
|
|
8
|
+
}
|
|
9
|
+
.missing-buttons .button-lunatic {
|
|
10
|
+
background-color: var(--color-very-very-light);
|
|
11
|
+
color: var(--color-primary-dark);
|
|
12
|
+
}
|
|
13
|
+
.missing-buttons .button-lunatic:not(:disabled):hover {
|
|
14
|
+
background-color: white;
|
|
15
|
+
color: var(--color-primary-main);
|
|
16
|
+
}
|
|
17
|
+
.missing-buttons .button-lunatic:disabled {
|
|
18
|
+
opacity: .5;
|
|
19
|
+
}
|
|
20
|
+
.missing-button-active .button-lunatic {
|
|
21
|
+
background-color: var(--color-primary-dark);
|
|
22
|
+
color: var(--color-very-very-light);
|
|
23
|
+
}
|
|
24
|
+
.missing-buttons .missing-button-active .button-lunatic:hover {
|
|
25
|
+
background-color: var(--color-primary-main);
|
|
26
|
+
color: white;
|
|
30
27
|
}
|
|
@@ -35,6 +35,7 @@ var LunaticDatepicker = function LunaticDatepicker(props) {
|
|
|
35
35
|
value: value
|
|
36
36
|
});
|
|
37
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
|
|
38
|
+
disabled: readOnly || disabled,
|
|
38
39
|
id: id,
|
|
39
40
|
preferences: preferences,
|
|
40
41
|
declarations: declarations,
|
|
@@ -22,13 +22,16 @@ function Duration(props) {
|
|
|
22
22
|
missing = props.missing,
|
|
23
23
|
missingResponse = props.missingResponse,
|
|
24
24
|
management = props.management,
|
|
25
|
-
description = props.description
|
|
25
|
+
description = props.description,
|
|
26
|
+
readOnly = props.readOnly,
|
|
27
|
+
disabled = props.disabled;
|
|
26
28
|
var onChange = (0, _commons.useOnHandleChange)({
|
|
27
29
|
handleChange: handleChange,
|
|
28
30
|
response: response,
|
|
29
31
|
value: value !== null && value !== void 0 ? value : ''
|
|
30
32
|
});
|
|
31
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
|
|
34
|
+
disabled: readOnly || disabled,
|
|
32
35
|
id: id,
|
|
33
36
|
preferences: preferences,
|
|
34
37
|
declarations: declarations,
|
|
@@ -44,6 +44,7 @@ function LunaticInputNumber(props) {
|
|
|
44
44
|
management: management,
|
|
45
45
|
description: description,
|
|
46
46
|
handleChange: handleChange,
|
|
47
|
+
disabled: readOnly || disabled,
|
|
47
48
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_inputNumber["default"], {
|
|
48
49
|
onChange: onChange,
|
|
49
50
|
id: id,
|
|
@@ -28,7 +28,9 @@ function LunaticSwitch(_ref) {
|
|
|
28
28
|
management = _ref.management,
|
|
29
29
|
description = _ref.description,
|
|
30
30
|
label = _ref.label,
|
|
31
|
-
errors = _ref.errors
|
|
31
|
+
errors = _ref.errors,
|
|
32
|
+
readOnly = _ref.readOnly,
|
|
33
|
+
disabled = _ref.disabled;
|
|
32
34
|
var booleanValue = value !== null && value !== void 0 ? value : false;
|
|
33
35
|
var onClick = (0, _useOnHandleChange["default"])({
|
|
34
36
|
handleChange: handleChange,
|
|
@@ -36,6 +38,7 @@ function LunaticSwitch(_ref) {
|
|
|
36
38
|
value: value
|
|
37
39
|
});
|
|
38
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
|
|
41
|
+
disabled: readOnly || disabled,
|
|
39
42
|
id: id,
|
|
40
43
|
preferences: preferences,
|
|
41
44
|
declarations: declarations,
|
|
@@ -51,7 +54,9 @@ function LunaticSwitch(_ref) {
|
|
|
51
54
|
onClick: onClick,
|
|
52
55
|
statusLabel: statusLabel,
|
|
53
56
|
label: label,
|
|
54
|
-
errors: (0, _errors.getComponentErrors)(errors, id)
|
|
57
|
+
errors: (0, _errors.getComponentErrors)(errors, id),
|
|
58
|
+
readOnly: readOnly,
|
|
59
|
+
disabled: disabled
|
|
55
60
|
})
|
|
56
61
|
});
|
|
57
62
|
}
|
|
@@ -29,13 +29,15 @@ var LunaticTextarea = function LunaticTextarea(props) {
|
|
|
29
29
|
missingResponse = props.missingResponse,
|
|
30
30
|
management = props.management,
|
|
31
31
|
readOnly = props.readOnly,
|
|
32
|
-
required = props.required
|
|
32
|
+
required = props.required,
|
|
33
|
+
disabled = props.disabled;
|
|
33
34
|
var onChange = (0, _useOnHandleChange["default"])({
|
|
34
35
|
handleChange: handleChange,
|
|
35
36
|
response: response,
|
|
36
37
|
value: value
|
|
37
38
|
});
|
|
38
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_lunaticComponentWithoutLabel["default"], {
|
|
40
|
+
disabled: readOnly || disabled,
|
|
39
41
|
id: id,
|
|
40
42
|
preferences: preferences,
|
|
41
43
|
declarations: declarations,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LunaticComponentProps } from '../../type';
|
|
2
|
-
declare function LunaticCheckboxBoolean({ value, id, options, disabled, handleChange, response, errors, label, preferences, declarations, missing, missingResponse, management, description, }: LunaticComponentProps<'CheckboxBoolean'>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function LunaticCheckboxBoolean({ value, id, options, disabled, handleChange, response, errors, label, preferences, declarations, missing, missingResponse, management, description, readOnly, }: LunaticComponentProps<'CheckboxBoolean'>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace LunaticCheckboxBoolean {
|
|
4
4
|
var defaultProps: {
|
|
5
5
|
value: boolean;
|
|
@@ -7,5 +7,5 @@ export type CheckboxGroupOption = {
|
|
|
7
7
|
description?: ReactNode;
|
|
8
8
|
onClick: (b: boolean) => void;
|
|
9
9
|
};
|
|
10
|
-
declare function LunaticCheckboxGroup({ id, value, responses, shortcut, handleChange, errors, label, description, preferences, declarations, missingResponse, missing, management, }: LunaticComponentProps<'CheckboxGroup'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function LunaticCheckboxGroup({ id, value, responses, shortcut, handleChange, errors, label, description, preferences, declarations, missingResponse, missing, management, readOnly, disabled, }: LunaticComponentProps<'CheckboxGroup'>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default LunaticCheckboxGroup;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LunaticComponentProps } from '../../type';
|
|
2
|
-
declare function LunaticCheckboxOne({ id, options, value, errors, handleChange, response, label, description, preferences, declarations, missingResponse, missing, management, shortcut, }: LunaticComponentProps<'CheckboxOne'>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function LunaticCheckboxOne({ id, options, value, errors, handleChange, response, label, description, preferences, declarations, missingResponse, missing, management, shortcut, readOnly, disabled, }: LunaticComponentProps<'CheckboxOne'>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default LunaticCheckboxOne;
|
|
@@ -7,6 +7,6 @@ type Props = {
|
|
|
7
7
|
handleChange: (response: {
|
|
8
8
|
name: string;
|
|
9
9
|
}, value: any, args?: Record<string, unknown>) => void;
|
|
10
|
-
} & Pick<LunaticBaseProps, 'description' | 'declarations' | 'management' | 'id' | 'label' | 'missingResponse' | 'preferences' | 'value' | 'missing'>;
|
|
10
|
+
} & Pick<LunaticBaseProps, 'description' | 'declarations' | 'management' | 'id' | 'label' | 'missingResponse' | 'preferences' | 'value' | 'missing' | 'disabled'>;
|
|
11
11
|
declare function LunaticComponent(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default LunaticComponent;
|
|
@@ -5,9 +5,10 @@ type Props = {
|
|
|
5
5
|
handleChange: LunaticBaseProps<any>['handleChange'];
|
|
6
6
|
componentType?: string;
|
|
7
7
|
paginatedLoop?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
8
9
|
missingResponse?: LunaticBaseProps['missingResponse'];
|
|
9
10
|
};
|
|
10
11
|
type PropsFromContext = Pick<ReturnType<typeof useLunaticMissing>, 'shortcut' | 'missingStrategy' | 'dontKnowButton' | 'refusedButton' | 'missingShortcut'>;
|
|
11
12
|
declare const Missing: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
-
export declare const MissingPure: (props: Pick<Props, 'handleChange' | 'missingResponse'> & PropsFromContext) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const MissingPure: (props: Pick<Props, 'handleChange' | 'missingResponse' | 'disabled'> & PropsFromContext) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default Missing;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LunaticComponentProps } from '../type';
|
|
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;
|
|
2
|
+
declare function LunaticSwitch({ id, value, statusLabel, handleChange, response, preferences, declarations, missing, missingResponse, management, description, label, errors, readOnly, disabled, }: LunaticComponentProps<'Switch'>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default LunaticSwitch;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LunaticExpression, LunaticState } from '../type';
|
|
2
|
-
declare function executeConditionFilter(filter: LunaticExpression, execute: LunaticState['executeExpression'], iteration?: number):
|
|
2
|
+
declare function executeConditionFilter(filter: LunaticExpression, execute: LunaticState['executeExpression'], iteration?: number): any;
|
|
3
3
|
export default executeConditionFilter;
|
|
@@ -76,6 +76,7 @@ declare class LunaticVariable {
|
|
|
76
76
|
* Set the value and returns true if the variable is touched
|
|
77
77
|
*/
|
|
78
78
|
setValue(value: unknown, iteration?: IterationLevel): boolean;
|
|
79
|
+
private updateTimestamps;
|
|
79
80
|
private setValueForArray;
|
|
80
81
|
private getSavedValue;
|
|
81
82
|
private getDependencies;
|
package/lib/src/utils/array.d.ts
CHANGED
|
@@ -11,3 +11,14 @@ export declare function setAtIndex<T>(arr: T, index: number | number[], newValue
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function getAtIndex(arr: unknown, indexes: number[]): unknown;
|
|
13
13
|
export declare function resizeArray<T = unknown>(array: unknown, newLength: number, defaultValue?: T): T[];
|
|
14
|
+
/**
|
|
15
|
+
* Return the first non null/undefined value of an array
|
|
16
|
+
*/
|
|
17
|
+
export declare function firstValueItem<T = unknown>(items: T | T[]): T | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Return a list of partial array
|
|
20
|
+
*
|
|
21
|
+
* Example :
|
|
22
|
+
* - subArray([1, 2, 3]) // [[1], [1, 2], [1, 2, 3]]
|
|
23
|
+
*/
|
|
24
|
+
export declare function subArrays<T = unknown>(items: T[] | T): T[][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.ReadOnly = exports.Default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
|
|
9
|
+
var _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
|
|
10
|
+
var _source = _interopRequireDefault(require("./source.json"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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: 'Behaviour/Missing',
|
|
21
|
+
component: _orchestrator["default"],
|
|
22
|
+
argTypes: _objectSpread(_objectSpread({}, _defaultArgTypes["default"]), {}, {
|
|
23
|
+
missing: {
|
|
24
|
+
table: {
|
|
25
|
+
disable: false
|
|
26
|
+
},
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
defaultValue: true
|
|
29
|
+
},
|
|
30
|
+
activeGoNextForMissing: {
|
|
31
|
+
table: {
|
|
32
|
+
disable: false
|
|
33
|
+
},
|
|
34
|
+
control: 'boolean',
|
|
35
|
+
defaultValue: true
|
|
36
|
+
},
|
|
37
|
+
management: {
|
|
38
|
+
table: {
|
|
39
|
+
disable: false
|
|
40
|
+
},
|
|
41
|
+
control: 'boolean',
|
|
42
|
+
defaultValue: false
|
|
43
|
+
},
|
|
44
|
+
activeControls: {
|
|
45
|
+
control: 'boolean',
|
|
46
|
+
defaultValue: true
|
|
47
|
+
},
|
|
48
|
+
source: {
|
|
49
|
+
table: {
|
|
50
|
+
disable: false
|
|
51
|
+
},
|
|
52
|
+
control: {
|
|
53
|
+
type: 'object'
|
|
54
|
+
},
|
|
55
|
+
defaultValue: _source["default"]
|
|
56
|
+
},
|
|
57
|
+
data: {
|
|
58
|
+
table: {
|
|
59
|
+
disable: false
|
|
60
|
+
},
|
|
61
|
+
control: {
|
|
62
|
+
type: 'object'
|
|
63
|
+
},
|
|
64
|
+
defaultValue: {
|
|
65
|
+
COLLECTED: {
|
|
66
|
+
READY: {
|
|
67
|
+
COLLECTED: true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
};
|
|
74
|
+
var _default = exports["default"] = stories;
|
|
75
|
+
var Template = function Template(args) {
|
|
76
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_orchestrator["default"], _objectSpread({}, args));
|
|
77
|
+
};
|
|
78
|
+
var Default = exports.Default = Template.bind({});
|
|
79
|
+
Default.args = {
|
|
80
|
+
pagination: true,
|
|
81
|
+
missing: true,
|
|
82
|
+
source: _source["default"]
|
|
83
|
+
};
|
|
84
|
+
var ReadOnly = exports.ReadOnly = Template.bind({});
|
|
85
|
+
ReadOnly.args = {
|
|
86
|
+
pagination: true,
|
|
87
|
+
missing: true,
|
|
88
|
+
readOnly: true,
|
|
89
|
+
source: _source["default"]
|
|
90
|
+
};
|