@egen-civitas/esm-styleguide 2.3.1 → 3.1.0
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/CHANGELOG.md +51 -0
- package/dist/_all.scss +0 -1
- package/dist/_vars.scss +4 -4
- package/dist/assistant/index.d.ts +7 -0
- package/dist/assistant/index.d.ts.map +1 -1
- package/dist/assistant/index.js +5 -0
- package/dist/assistant/robot/README.md +47 -0
- package/dist/assistant/robot/Robot.d.ts +16 -0
- package/dist/assistant/robot/Robot.d.ts.map +1 -0
- package/dist/assistant/robot/Robot.js +159 -0
- package/dist/assistant/robot/RobotStage.d.ts +31 -0
- package/dist/assistant/robot/RobotStage.d.ts.map +1 -0
- package/dist/assistant/robot/RobotStage.js +250 -0
- package/dist/assistant/robot/clips.d.ts +62 -0
- package/dist/assistant/robot/clips.d.ts.map +1 -0
- package/dist/assistant/robot/clips.js +179 -0
- package/dist/assistant/robot/controller.d.ts +133 -0
- package/dist/assistant/robot/controller.d.ts.map +1 -0
- package/dist/assistant/robot/controller.js +522 -0
- package/dist/assistant/robot/gestures.d.ts +23 -0
- package/dist/assistant/robot/gestures.d.ts.map +1 -0
- package/dist/assistant/robot/gestures.js +1301 -0
- package/dist/assistant/robot/hands.d.ts +55 -0
- package/dist/assistant/robot/hands.d.ts.map +1 -0
- package/dist/assistant/robot/hands.js +121 -0
- package/dist/assistant/robot/ik.d.ts +34 -0
- package/dist/assistant/robot/ik.d.ts.map +1 -0
- package/dist/assistant/robot/ik.js +57 -0
- package/dist/assistant/robot/index.d.ts +18 -0
- package/dist/assistant/robot/index.d.ts.map +1 -0
- package/dist/assistant/robot/index.js +9 -0
- package/dist/assistant/robot/lazy.d.ts +8 -0
- package/dist/assistant/robot/lazy.d.ts.map +1 -0
- package/dist/assistant/robot/lazy.js +33 -0
- package/dist/assistant/robot/materials.d.ts +46 -0
- package/dist/assistant/robot/materials.d.ts.map +1 -0
- package/dist/assistant/robot/materials.js +101 -0
- package/dist/assistant/robot/parts/Body.d.ts +28 -0
- package/dist/assistant/robot/parts/Body.d.ts.map +1 -0
- package/dist/assistant/robot/parts/Body.js +368 -0
- package/dist/assistant/robot/parts/Head.d.ts +11 -0
- package/dist/assistant/robot/parts/Head.d.ts.map +1 -0
- package/dist/assistant/robot/parts/Head.js +210 -0
- package/dist/assistant/robot/parts/primitives.d.ts +36 -0
- package/dist/assistant/robot/parts/primitives.d.ts.map +1 -0
- package/dist/assistant/robot/parts/primitives.js +127 -0
- package/dist/assistant/robot/skeleton.d.ts +66 -0
- package/dist/assistant/robot/skeleton.d.ts.map +1 -0
- package/dist/assistant/robot/skeleton.js +266 -0
- package/dist/cards/card-header.component.d.ts +1 -1
- package/dist/cards/card-header.component.js +1 -1
- package/dist/cards/card-header.stories.js +1 -1
- package/dist/components/_general.scss +3 -3
- package/dist/config-schema.d.ts +0 -17
- package/dist/config-schema.d.ts.map +1 -1
- package/dist/config-schema.js +0 -25
- package/dist/datepicker/datepicker.stories.js +1 -1
- package/dist/empty-card/empty-card.stories.js +2 -2
- package/dist/error-state/error-state.stories.js +2 -2
- package/dist/icons/icon-registration.d.ts.map +1 -1
- package/dist/icons/icon-registration.js +0 -30
- package/dist/icons/icons.d.ts +4 -32
- package/dist/icons/icons.d.ts.map +1 -1
- package/dist/icons/icons.js +18 -148
- package/dist/index.js +0 -2
- package/dist/internal.d.ts +0 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +0 -3
- package/dist/notifications/actionable-notification.stories.js +5 -5
- package/dist/notifications/notification.stories.js +5 -5
- package/dist/page-header/page-header.component.d.ts +1 -1
- package/dist/page-header/page-header.component.js +1 -1
- package/dist/pagination/pagination.stories.js +2 -2
- package/dist/pictograms/pictogram-registration.d.ts.map +1 -1
- package/dist/pictograms/pictogram-registration.js +2 -36
- package/dist/pictograms/pictograms.d.ts +2 -20
- package/dist/pictograms/pictograms.d.ts.map +1 -1
- package/dist/pictograms/pictograms.js +2 -139
- package/dist/public.d.ts +0 -3
- package/dist/public.d.ts.map +1 -1
- package/dist/public.js +0 -3
- package/dist/responsive-wrapper/responsive-wrapper.stories.js +1 -1
- package/dist/snackbars/snackbar.stories.js +1 -1
- package/dist/toasts/toast.stories.js +1 -1
- package/dist/workbench/compartments.d.ts +47 -0
- package/dist/workbench/compartments.d.ts.map +1 -0
- package/dist/workbench/compartments.js +147 -0
- package/dist/workbench/index.d.ts +1 -0
- package/dist/workbench/index.d.ts.map +1 -1
- package/dist/workbench/index.js +1 -0
- package/dist/workbench/splitter.component.d.ts +32 -0
- package/dist/workbench/splitter.component.d.ts.map +1 -1
- package/dist/workbench/splitter.component.js +120 -1
- package/dist/workbench/tool-window-header.component.d.ts +2 -0
- package/dist/workbench/tool-window-header.component.d.ts.map +1 -1
- package/dist/workbench/tool-window-header.component.js +3 -1
- package/dist/workbench/tool-window-rail.component.d.ts.map +1 -1
- package/dist/workbench/tool-window-rail.component.js +16 -6
- package/dist/workbench/tool-window-zone.component.d.ts +11 -4
- package/dist/workbench/tool-window-zone.component.d.ts.map +1 -1
- package/dist/workbench/tool-window-zone.component.js +152 -57
- package/dist/workbench/use-tool-windows.d.ts +7 -1
- package/dist/workbench/use-tool-windows.d.ts.map +1 -1
- package/dist/workbench/use-tool-windows.js +4 -2
- package/dist/workbench/workbench.module.scss +139 -13
- package/dist/workbench/workbench.store.d.ts +39 -4
- package/dist/workbench/workbench.store.d.ts.map +1 -1
- package/dist/workbench/workbench.store.js +128 -5
- package/dist/workspaces/container/workspace-container.component.d.ts +8 -8
- package/dist/workspaces/container/workspace-container.component.js +9 -9
- package/dist/workspaces2/workspace2.d.ts +3 -3
- package/dist/workspaces2/workspace2.js +3 -3
- package/mock-jest.tsx +0 -41
- package/mock.tsx +0 -41
- package/package.json +26 -23
- package/src/_vars.scss +4 -4
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.d.ts +0 -19
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.d.ts.map +0 -1
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.js +0 -137
- package/dist/entity-banner/actions-menu/entity-banner-actions-menu.module.scss +0 -23
- package/dist/entity-banner/contact-details/entity-banner-contact-details.component.d.ts +0 -9
- package/dist/entity-banner/contact-details/entity-banner-contact-details.component.d.ts.map +0 -1
- package/dist/entity-banner/contact-details/entity-banner-contact-details.component.js +0 -207
- package/dist/entity-banner/contact-details/entity-banner-contact-details.module.scss +0 -47
- package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.d.ts +0 -12
- package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.d.ts.map +0 -1
- package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.js +0 -15
- package/dist/entity-banner/contact-details/types.d.ts +0 -48
- package/dist/entity-banner/contact-details/types.d.ts.map +0 -1
- package/dist/entity-banner/contact-details/types.js +0 -1
- package/dist/entity-banner/contact-details/useEntityAttributes.d.ts +0 -14
- package/dist/entity-banner/contact-details/useEntityAttributes.d.ts.map +0 -1
- package/dist/entity-banner/contact-details/useEntityAttributes.js +0 -12
- package/dist/entity-banner/contact-details/useEntityGroupsForEntity.d.ts +0 -11
- package/dist/entity-banner/contact-details/useEntityGroupsForEntity.d.ts.map +0 -1
- package/dist/entity-banner/contact-details/useEntityGroupsForEntity.js +0 -9
- package/dist/entity-banner/contact-details/useRelationships.d.ts +0 -35
- package/dist/entity-banner/contact-details/useRelationships.d.ts.map +0 -1
- package/dist/entity-banner/contact-details/useRelationships.js +0 -37
- package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.d.ts +0 -9
- package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.d.ts.map +0 -1
- package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.js +0 -77
- package/dist/entity-banner/entity-info/entity-banner-entity-info.component.d.ts +0 -9
- package/dist/entity-banner/entity-info/entity-banner-entity-info.component.d.ts.map +0 -1
- package/dist/entity-banner/entity-info/entity-banner-entity-info.component.js +0 -72
- package/dist/entity-banner/entity-info/entity-banner-entity-info.module.scss +0 -165
- package/dist/entity-banner/index.d.ts +0 -5
- package/dist/entity-banner/index.d.ts.map +0 -1
- package/dist/entity-banner/index.js +0 -4
- package/dist/entity-photo/entity-photo.component.d.ts +0 -21
- package/dist/entity-photo/entity-photo.component.d.ts.map +0 -1
- package/dist/entity-photo/entity-photo.component.js +0 -111
- package/dist/entity-photo/entity-photo.module.scss +0 -21
- package/dist/entity-photo/index.d.ts +0 -3
- package/dist/entity-photo/index.d.ts.map +0 -1
- package/dist/entity-photo/index.js +0 -2
- package/dist/entity-photo/placeholder-icon.component.d.ts +0 -9
- package/dist/entity-photo/placeholder-icon.component.d.ts.map +0 -1
- package/dist/entity-photo/placeholder-icon.component.js +0 -26
- package/dist/entity-photo/useEntityPhoto.d.ts +0 -29
- package/dist/entity-photo/useEntityPhoto.d.ts.map +0 -1
- package/dist/entity-photo/useEntityPhoto.js +0 -37
- package/dist/icons/svgs/baby.svg +0 -1
- package/dist/icons/svgs/chemistry.svg +0 -1
- package/dist/icons/svgs/drug-order.svg +0 -1
- package/dist/icons/svgs/generic-order-type.svg +0 -1
- package/dist/icons/svgs/hospital-bed.svg +0 -1
- package/dist/icons/svgs/image-medical.svg +0 -1
- package/dist/icons/svgs/lab-order.svg +0 -1
- package/dist/icons/svgs/material-order.svg +0 -1
- package/dist/icons/svgs/medication.svg +0 -1
- package/dist/icons/svgs/microscope.svg +0 -1
- package/dist/icons/svgs/mother.svg +0 -1
- package/dist/icons/svgs/procedure-order.svg +0 -1
- package/dist/icons/svgs/referral-order.svg +0 -1
- package/dist/icons/svgs/syringe.svg +0 -1
- package/dist/logo/_logo.scss +0 -34
- package/dist/logo/egen-logo-full.svg +0 -1
- package/dist/logo/egen-logo-icon.svg +0 -1
- package/dist/logo/egen-logo-partial.svg +0 -1
- package/dist/logo/egen-logo-white.svg +0 -1
- package/dist/logo/index.d.ts +0 -8
- package/dist/logo/index.d.ts.map +0 -1
- package/dist/logo/index.js +0 -22
- package/dist/numeric-datapoint/index.d.ts +0 -4
- package/dist/numeric-datapoint/index.d.ts.map +0 -1
- package/dist/numeric-datapoint/index.js +0 -3
- package/dist/numeric-datapoint/interpretation-utils.d.ts +0 -27
- package/dist/numeric-datapoint/interpretation-utils.d.ts.map +0 -1
- package/dist/numeric-datapoint/interpretation-utils.js +0 -66
- package/dist/numeric-datapoint/numeric-datapoint.component.d.ts +0 -44
- package/dist/numeric-datapoint/numeric-datapoint.component.d.ts.map +0 -1
- package/dist/numeric-datapoint/numeric-datapoint.component.js +0 -110
- package/dist/numeric-datapoint/numeric-datapoint.module.scss +0 -141
- package/dist/numeric-datapoint/use-concept-reference-range.d.ts +0 -13
- package/dist/numeric-datapoint/use-concept-reference-range.d.ts.map +0 -1
- package/dist/numeric-datapoint/use-concept-reference-range.js +0 -31
- package/dist/pictograms/svgs/blood-bank.svg +0 -1
- package/dist/pictograms/svgs/cardiology.svg +0 -1
- package/dist/pictograms/svgs/ct-scan.svg +0 -1
- package/dist/pictograms/svgs/dentistry.svg +0 -1
- package/dist/pictograms/svgs/emergency-department.svg +0 -1
- package/dist/pictograms/svgs/geriatrics.svg +0 -1
- package/dist/pictograms/svgs/gynaecology.svg +0 -1
- package/dist/pictograms/svgs/in-patient.svg +0 -1
- package/dist/pictograms/svgs/labs-2.svg +0 -1
- package/dist/pictograms/svgs/labs.svg +0 -1
- package/dist/pictograms/svgs/obstetrics.svg +0 -1
- package/dist/pictograms/svgs/patient-search.svg +0 -1
- package/dist/pictograms/svgs/patients.svg +0 -1
- package/dist/pictograms/svgs/pharmacy-1.svg +0 -1
- package/dist/pictograms/svgs/pharmacy-2.svg +0 -1
- package/dist/pictograms/svgs/triage.svg +0 -1
- package/dist/pictograms/svgs/x-ray.svg +0 -1
|
@@ -7,29 +7,12 @@ import style from "./pictograms.module.scss";
|
|
|
7
7
|
'egen-pict-appointments',
|
|
8
8
|
'egen-pict-assessment-1',
|
|
9
9
|
'egen-pict-assessment-2',
|
|
10
|
-
'egen-pict-blood-bank',
|
|
11
|
-
'egen-pict-cardiology',
|
|
12
|
-
'egen-pict-ct-scan',
|
|
13
|
-
'egen-pict-dentistry',
|
|
14
|
-
'egen-pict-emergency-department',
|
|
15
10
|
'egen-pict-facility',
|
|
16
|
-
'egen-pict-geriatrics',
|
|
17
|
-
'egen-pict-gynaecology',
|
|
18
|
-
'egen-pict-in-patient',
|
|
19
|
-
'egen-pict-laboratory',
|
|
20
|
-
'egen-pict-labs-2',
|
|
21
|
-
'egen-pict-obstetrics',
|
|
22
|
-
'egen-pict-patient-search',
|
|
23
|
-
'egen-pict-patients',
|
|
24
11
|
'egen-pict-payments-desk',
|
|
25
|
-
'egen-pict-pharmacy',
|
|
26
|
-
'egen-pict-pharmacy-2',
|
|
27
12
|
'egen-pict-registration',
|
|
28
13
|
'egen-pict-service-queues',
|
|
29
14
|
'egen-pict-stock-management',
|
|
30
|
-
'egen-pict-transfer'
|
|
31
|
-
'egen-pict-triage',
|
|
32
|
-
'egen-pict-x-ray'
|
|
15
|
+
'egen-pict-transfer'
|
|
33
16
|
];
|
|
34
17
|
export const AppointmentsPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function AppointmentsPictogram(props, ref) {
|
|
35
18
|
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
@@ -55,41 +38,6 @@ export const Assessment2Pictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(
|
|
|
55
38
|
pictogramProps: props
|
|
56
39
|
});
|
|
57
40
|
}));
|
|
58
|
-
export const BloodBankPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function BloodBankPictogram(props, ref) {
|
|
59
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
60
|
-
ref: ref,
|
|
61
|
-
pictogram: "egen-pict-blood-bank",
|
|
62
|
-
pictogramProps: props
|
|
63
|
-
});
|
|
64
|
-
}));
|
|
65
|
-
export const CardiologyPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function CardiologyPictogram(props, ref) {
|
|
66
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
67
|
-
ref: ref,
|
|
68
|
-
pictogram: "egen-pict-cardiology",
|
|
69
|
-
pictogramProps: props
|
|
70
|
-
});
|
|
71
|
-
}));
|
|
72
|
-
export const CtScanPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function CtScanPictogram(props, ref) {
|
|
73
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
74
|
-
ref: ref,
|
|
75
|
-
pictogram: "egen-pict-ct-scan",
|
|
76
|
-
pictogramProps: props
|
|
77
|
-
});
|
|
78
|
-
}));
|
|
79
|
-
export const DentistryPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function DentistryPictogram(props, ref) {
|
|
80
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
81
|
-
ref: ref,
|
|
82
|
-
pictogram: "egen-pict-dentistry",
|
|
83
|
-
pictogramProps: props
|
|
84
|
-
});
|
|
85
|
-
}));
|
|
86
|
-
export const EmergencyDepartmentPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function EmergencyDepartmentPictogram(props, ref) {
|
|
87
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
88
|
-
ref: ref,
|
|
89
|
-
pictogram: "egen-pict-emergency-department",
|
|
90
|
-
pictogramProps: props
|
|
91
|
-
});
|
|
92
|
-
}));
|
|
93
41
|
export const FacilityPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function FacilityPictogram(props, ref) {
|
|
94
42
|
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
95
43
|
ref: ref,
|
|
@@ -97,62 +45,6 @@ export const FacilityPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(fun
|
|
|
97
45
|
pictogramProps: props
|
|
98
46
|
});
|
|
99
47
|
}));
|
|
100
|
-
export const GeriatricsPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function GeriatricsPictogram(props, ref) {
|
|
101
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
102
|
-
ref: ref,
|
|
103
|
-
pictogram: "egen-pict-geriatrics",
|
|
104
|
-
pictogramProps: props
|
|
105
|
-
});
|
|
106
|
-
}));
|
|
107
|
-
export const GynaecologyPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function GynaecologyPictogram(props, ref) {
|
|
108
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
109
|
-
ref: ref,
|
|
110
|
-
pictogram: "egen-pict-gynaecology",
|
|
111
|
-
pictogramProps: props
|
|
112
|
-
});
|
|
113
|
-
}));
|
|
114
|
-
export const InPatientPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function InPatientPictogram(props, ref) {
|
|
115
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
116
|
-
ref: ref,
|
|
117
|
-
pictogram: "egen-pict-in-patient",
|
|
118
|
-
pictogramProps: props
|
|
119
|
-
});
|
|
120
|
-
}));
|
|
121
|
-
export const LaboratoryPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function LaboratoryPictogram(props, ref) {
|
|
122
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
123
|
-
ref: ref,
|
|
124
|
-
pictogram: "egen-pict-laboratory",
|
|
125
|
-
pictogramProps: props
|
|
126
|
-
});
|
|
127
|
-
}));
|
|
128
|
-
export const Labs2Pictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function Labs2Pictogram(props, ref) {
|
|
129
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
130
|
-
ref: ref,
|
|
131
|
-
pictogram: "egen-pict-labs-2",
|
|
132
|
-
pictogramProps: props
|
|
133
|
-
});
|
|
134
|
-
}));
|
|
135
|
-
export const ObstetricsPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function ObstetricsPictogram(props, ref) {
|
|
136
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
137
|
-
ref: ref,
|
|
138
|
-
pictogram: "egen-pict-obstetrics",
|
|
139
|
-
pictogramProps: props
|
|
140
|
-
});
|
|
141
|
-
}));
|
|
142
|
-
export const PatientSearchPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function PatientSearchPictogram(props, ref) {
|
|
143
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
144
|
-
ref: ref,
|
|
145
|
-
pictogram: "egen-pict-patient-search",
|
|
146
|
-
pictogramProps: props
|
|
147
|
-
});
|
|
148
|
-
}));
|
|
149
|
-
export const PatientsPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function PatientsPictogram(props, ref) {
|
|
150
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
151
|
-
ref: ref,
|
|
152
|
-
pictogram: "egen-pict-patients",
|
|
153
|
-
pictogramProps: props
|
|
154
|
-
});
|
|
155
|
-
}));
|
|
156
48
|
export const PaymentsDeskPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function PaymentsDeskPictogram(props, ref) {
|
|
157
49
|
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
158
50
|
ref: ref,
|
|
@@ -160,20 +52,6 @@ export const PaymentsDeskPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef
|
|
|
160
52
|
pictogramProps: props
|
|
161
53
|
});
|
|
162
54
|
}));
|
|
163
|
-
export const PharmacyPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function PharmacyPictogram(props, ref) {
|
|
164
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
165
|
-
ref: ref,
|
|
166
|
-
pictogram: "egen-pict-pharmacy",
|
|
167
|
-
pictogramProps: props
|
|
168
|
-
});
|
|
169
|
-
}));
|
|
170
|
-
export const Pharmacy2Pictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function Pharmacy2Pictogram(props, ref) {
|
|
171
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
172
|
-
ref: ref,
|
|
173
|
-
pictogram: "egen-pict-pharmacy-2",
|
|
174
|
-
pictogramProps: props
|
|
175
|
-
});
|
|
176
|
-
}));
|
|
177
55
|
export const RegistrationPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function RegistrationPictogram(props, ref) {
|
|
178
56
|
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
179
57
|
ref: ref,
|
|
@@ -202,31 +80,16 @@ export const TransferPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(fun
|
|
|
202
80
|
pictogramProps: props
|
|
203
81
|
});
|
|
204
82
|
}));
|
|
205
|
-
export const TriagePictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function TriagePictogram(props, ref) {
|
|
206
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
207
|
-
ref: ref,
|
|
208
|
-
pictogram: "egen-pict-triage",
|
|
209
|
-
pictogramProps: props
|
|
210
|
-
});
|
|
211
|
-
}));
|
|
212
|
-
export const XrayPictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function XrayPictogram(props, ref) {
|
|
213
|
-
return /*#__PURE__*/ _jsx(Pictogram, {
|
|
214
|
-
ref: ref,
|
|
215
|
-
pictogram: "egen-pict-x-ray",
|
|
216
|
-
pictogramProps: props
|
|
217
|
-
});
|
|
218
|
-
}));
|
|
219
83
|
// Pictogram aliases that are a little more aligned to specific use-cases
|
|
220
84
|
// should all resolve to a defined React icon
|
|
221
85
|
export const HomePictogram = FacilityPictogram;
|
|
222
|
-
export const PatientListsPictogram = PatientsPictogram;
|
|
223
86
|
/**
|
|
224
87
|
* This is a utility component that takes an `pictogram` and render it if the sprite for the pictogram
|
|
225
88
|
* is available. The goal is to make it easier to conditionally render configuration-specified pictograms.
|
|
226
89
|
*
|
|
227
90
|
* @example
|
|
228
91
|
* ```tsx
|
|
229
|
-
* <MaybePictogram pictogram='egen-icon-
|
|
92
|
+
* <MaybePictogram pictogram='egen-icon-user' className={styles.myPictogramStyles} />
|
|
230
93
|
* ```
|
|
231
94
|
*/ export const MaybePictogram = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(function MaybePictogram({ pictogram, fallback, ...pictogramProps }, ref) {
|
|
232
95
|
const iconRef = useRef(document.getElementById(pictogram));
|
package/dist/public.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from './error-state/index.js';
|
|
|
9
9
|
export * from './fields/index.js';
|
|
10
10
|
export * from './icons/icons.js';
|
|
11
11
|
export * from './location-picker/index.js';
|
|
12
|
-
export * from './numeric-datapoint/index.js';
|
|
13
12
|
export * from './page-background/index.js';
|
|
14
13
|
export { showModal } from './modals/index.js';
|
|
15
14
|
export { showNotification, showActionableNotification } from './notifications/index.js';
|
|
@@ -17,8 +16,6 @@ export { type ActionableNotificationDescriptor, type ActionableNotificationType,
|
|
|
17
16
|
export { type NotificationDescriptor, type InlineNotificationType } from './notifications/notification.component.js';
|
|
18
17
|
export * from './page-header/index.js';
|
|
19
18
|
export * from './pagination/index.js';
|
|
20
|
-
export * from './entity-banner/index.js';
|
|
21
|
-
export * from './entity-photo/index.js';
|
|
22
19
|
export * from './pictograms/pictograms.js';
|
|
23
20
|
export * from './responsive-wrapper/index.js';
|
|
24
21
|
export { showSnackbar, type SnackbarDescriptor, type SnackbarType, type SnackbarMeta } from './snackbars/index.js';
|
package/dist/public.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EACL,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,GAChC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACrH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,EACL,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/public.js
CHANGED
|
@@ -8,14 +8,11 @@ export * from "./error-state/index.js";
|
|
|
8
8
|
export * from "./fields/index.js";
|
|
9
9
|
export * from "./icons/icons.js";
|
|
10
10
|
export * from "./location-picker/index.js";
|
|
11
|
-
export * from "./numeric-datapoint/index.js";
|
|
12
11
|
export * from "./page-background/index.js";
|
|
13
12
|
export { showModal } from "./modals/index.js";
|
|
14
13
|
export { showNotification, showActionableNotification } from "./notifications/index.js";
|
|
15
14
|
export * from "./page-header/index.js";
|
|
16
15
|
export * from "./pagination/index.js";
|
|
17
|
-
export * from "./entity-banner/index.js";
|
|
18
|
-
export * from "./entity-photo/index.js";
|
|
19
16
|
export * from "./pictograms/pictograms.js";
|
|
20
17
|
export * from "./responsive-wrapper/index.js";
|
|
21
18
|
export { showSnackbar } from "./snackbars/index.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calcul des hauteurs des compartiments verticaux d'une zone latérale (gauche ou droite).
|
|
3
|
+
*
|
|
4
|
+
* Fonctions pures, sans dépendance au DOM ni au store : la zone empile des compartiments dont les
|
|
5
|
+
* hauteurs, en **% de la zone**, totalisent toujours 100 (aucun débordement). Chaque compartiment a une
|
|
6
|
+
* hauteur de base, un minimum et un maximum.
|
|
7
|
+
*/
|
|
8
|
+
/** Identifiant réservé du compartiment par défaut d'une zone (aucune fenêtre d'outils ne peut le porter). */
|
|
9
|
+
export declare const DEFAULT_COMPARTMENT_ID = "__default__";
|
|
10
|
+
/**
|
|
11
|
+
* Dimensions du compartiment par défaut (en % de la zone). Fixées par le shell : les apps ne peuvent pas les
|
|
12
|
+
* modifier. Maximum à 100 pour qu'il remplisse la zone quand il est seul.
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_COMPARTMENT_LIMITS: Readonly<{
|
|
15
|
+
height: number;
|
|
16
|
+
minHeight: number;
|
|
17
|
+
maxHeight: number;
|
|
18
|
+
}>;
|
|
19
|
+
export interface CompartmentItem {
|
|
20
|
+
/** Clé stable du compartiment dans sa zone. */
|
|
21
|
+
key: string;
|
|
22
|
+
/** Hauteur de base (%), utilisée tant que le compartiment n'a pas de hauteur mémorisée. */
|
|
23
|
+
height: number;
|
|
24
|
+
/** Hauteur minimale (%). */
|
|
25
|
+
minHeight: number;
|
|
26
|
+
/** Hauteur maximale (%). */
|
|
27
|
+
maxHeight: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Hauteurs (%) des compartiments ouverts, dans l'ordre : somme exacte de 100, chacune dans ses bornes.
|
|
31
|
+
*
|
|
32
|
+
* `stored` : hauteurs déjà mémorisées. Un compartiment sans valeur mémorisée (nouvellement ouvert) reçoit sa
|
|
33
|
+
* hauteur de base et les autres se partagent le reste proportionnellement à leurs hauteurs.
|
|
34
|
+
*/
|
|
35
|
+
export declare function fitCompartmentHeights(items: readonly CompartmentItem[], stored?: Readonly<Record<string, number | undefined>>): number[];
|
|
36
|
+
/**
|
|
37
|
+
* Déplace la frontière entre le compartiment `index` et le suivant de `delta` points de pourcentage
|
|
38
|
+
* (positif : vers le bas). La somme reste 100 :
|
|
39
|
+
*
|
|
40
|
+
* - le côté qui gagne de la place s'agrandit en commençant par le compartiment contre la frontière,
|
|
41
|
+
* puis le suivant s'il atteint son maximum ;
|
|
42
|
+
* - le côté qui en perd rétrécit de la même façon, jusqu'aux minimums.
|
|
43
|
+
*
|
|
44
|
+
* Le déplacement est borné par ce que les deux côtés peuvent absorber : la frontière s'arrête net.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resizeCompartmentBoundary(heights: readonly number[], items: readonly CompartmentItem[], index: number, delta: number): number[];
|
|
47
|
+
//# sourceMappingURL=compartments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compartments.d.ts","sourceRoot":"","sources":["../../src/workbench/compartments.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,6GAA6G;AAC7G,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAIzG,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,2FAA2F;IAC3F,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAkBD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,MAAM,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAM,GACxD,MAAM,EAAE,CAiEV;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,MAAM,EAAE,CA8BV"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calcul des hauteurs des compartiments verticaux d'une zone latérale (gauche ou droite).
|
|
3
|
+
*
|
|
4
|
+
* Fonctions pures, sans dépendance au DOM ni au store : la zone empile des compartiments dont les
|
|
5
|
+
* hauteurs, en **% de la zone**, totalisent toujours 100 (aucun débordement). Chaque compartiment a une
|
|
6
|
+
* hauteur de base, un minimum et un maximum.
|
|
7
|
+
*/ /** Identifiant réservé du compartiment par défaut d'une zone (aucune fenêtre d'outils ne peut le porter). */ export const DEFAULT_COMPARTMENT_ID = '__default__';
|
|
8
|
+
/**
|
|
9
|
+
* Dimensions du compartiment par défaut (en % de la zone). Fixées par le shell : les apps ne peuvent pas les
|
|
10
|
+
* modifier. Maximum à 100 pour qu'il remplisse la zone quand il est seul.
|
|
11
|
+
*/ export const DEFAULT_COMPARTMENT_LIMITS = {
|
|
12
|
+
height: 60,
|
|
13
|
+
minHeight: 25,
|
|
14
|
+
maxHeight: 100
|
|
15
|
+
};
|
|
16
|
+
const TOTAL = 100;
|
|
17
|
+
const EPSILON = 1e-6;
|
|
18
|
+
/** Arrondit à 0,01 % : assez fin pour un glissement fluide, assez grossier pour ne pas osciller. */ const round = (n)=>Math.round(n * 100) / 100;
|
|
19
|
+
/** Bornes effectives : minimums réduits proportionnellement s'ils dépassent 100, maximums ignorés s'ils n'atteignent pas 100. */ function effectiveLimits(items) {
|
|
20
|
+
const sumMin = items.reduce((total, item)=>total + item.minHeight, 0);
|
|
21
|
+
const sumMax = items.reduce((total, item)=>total + item.maxHeight, 0);
|
|
22
|
+
const minScale = sumMin > TOTAL ? TOTAL / sumMin : 1;
|
|
23
|
+
const mins = items.map((item)=>item.minHeight * minScale);
|
|
24
|
+
const maxs = items.map((item)=>sumMax < TOTAL ? TOTAL : Math.max(item.maxHeight, item.minHeight * minScale));
|
|
25
|
+
return {
|
|
26
|
+
mins,
|
|
27
|
+
maxs
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Hauteurs (%) des compartiments ouverts, dans l'ordre : somme exacte de 100, chacune dans ses bornes.
|
|
32
|
+
*
|
|
33
|
+
* `stored` : hauteurs déjà mémorisées. Un compartiment sans valeur mémorisée (nouvellement ouvert) reçoit sa
|
|
34
|
+
* hauteur de base et les autres se partagent le reste proportionnellement à leurs hauteurs.
|
|
35
|
+
*/ export function fitCompartmentHeights(items, stored = {}) {
|
|
36
|
+
if (items.length === 0) return [];
|
|
37
|
+
if (items.length === 1) return [
|
|
38
|
+
TOTAL
|
|
39
|
+
];
|
|
40
|
+
const { mins, maxs } = effectiveLimits(items);
|
|
41
|
+
const known = items.map((item)=>{
|
|
42
|
+
const value = stored[item.key];
|
|
43
|
+
return typeof value === 'number' && Number.isFinite(value) && value > 0;
|
|
44
|
+
});
|
|
45
|
+
const fresh = items.reduce((total, item, i)=>total + (known[i] ? 0 : item.height), 0);
|
|
46
|
+
const knownSum = items.reduce((total, item, i)=>total + (known[i] ? stored[item.key] : 0), 0);
|
|
47
|
+
const knownTarget = TOTAL - fresh;
|
|
48
|
+
// Valeurs de départ : nouveaux à leur base, les autres ramenés à la place restante (ou tout ramené à 100 sinon).
|
|
49
|
+
let values;
|
|
50
|
+
if (knownSum > 0 && knownTarget > 0) {
|
|
51
|
+
values = items.map((item, i)=>known[i] ? stored[item.key] * knownTarget / knownSum : item.height);
|
|
52
|
+
} else {
|
|
53
|
+
const raw = items.map((item, i)=>known[i] ? stored[item.key] : item.height);
|
|
54
|
+
const sum = raw.reduce((total, v)=>total + v, 0);
|
|
55
|
+
values = raw.map((v)=>v * TOTAL / sum);
|
|
56
|
+
}
|
|
57
|
+
// Écrêtage itératif : on fige les compartiments qui sortent de leurs bornes et on redistribue le reste.
|
|
58
|
+
const fixed = items.map(()=>undefined);
|
|
59
|
+
for(let pass = 0; pass <= items.length; pass += 1){
|
|
60
|
+
const fixedSum = fixed.reduce((total, v)=>total + (v ?? 0), 0);
|
|
61
|
+
const freeIndexes = items.map((_, i)=>i).filter((i)=>fixed[i] === undefined);
|
|
62
|
+
if (freeIndexes.length === 0) break;
|
|
63
|
+
const freeSum = freeIndexes.reduce((total, i)=>total + values[i], 0);
|
|
64
|
+
const scale = freeSum > 0 ? (TOTAL - fixedSum) / freeSum : 0;
|
|
65
|
+
const scaled = new Map(freeIndexes.map((i)=>[
|
|
66
|
+
i,
|
|
67
|
+
freeSum > 0 ? values[i] * scale : (TOTAL - fixedSum) / freeIndexes.length
|
|
68
|
+
]));
|
|
69
|
+
let excess = 0; // > 0 : trop grand une fois écrêté ; < 0 : trop petit
|
|
70
|
+
for (const i of freeIndexes){
|
|
71
|
+
const v = scaled.get(i);
|
|
72
|
+
excess += Math.min(maxs[i], Math.max(mins[i], v)) - v;
|
|
73
|
+
}
|
|
74
|
+
const tooSmall = freeIndexes.filter((i)=>scaled.get(i) < mins[i] - EPSILON);
|
|
75
|
+
const tooBig = freeIndexes.filter((i)=>scaled.get(i) > maxs[i] + EPSILON);
|
|
76
|
+
if (tooSmall.length === 0 && tooBig.length === 0) {
|
|
77
|
+
for (const i of freeIndexes)fixed[i] = scaled.get(i);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
// Excès positif (on a relevé des minimums) : on fige les minimums ; négatif : les maximums ; nul : les deux.
|
|
81
|
+
const toFix = excess > EPSILON ? tooSmall : excess < -EPSILON ? tooBig : [
|
|
82
|
+
...tooSmall,
|
|
83
|
+
...tooBig
|
|
84
|
+
];
|
|
85
|
+
for (const i of toFix.length > 0 ? toFix : [
|
|
86
|
+
...tooSmall,
|
|
87
|
+
...tooBig
|
|
88
|
+
]){
|
|
89
|
+
fixed[i] = Math.min(maxs[i], Math.max(mins[i], scaled.get(i)));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const result = items.map((_, i)=>fixed[i] ?? values[i]);
|
|
93
|
+
// Somme exacte : l'arrondi est absorbé par le plus grand compartiment.
|
|
94
|
+
const rounded = result.map(round);
|
|
95
|
+
const drift = round(TOTAL - rounded.reduce((total, v)=>total + v, 0));
|
|
96
|
+
if (drift !== 0) {
|
|
97
|
+
let largest = 0;
|
|
98
|
+
rounded.forEach((v, i)=>{
|
|
99
|
+
if (v > rounded[largest]) largest = i;
|
|
100
|
+
});
|
|
101
|
+
rounded[largest] = round(rounded[largest] + drift);
|
|
102
|
+
}
|
|
103
|
+
return rounded;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Déplace la frontière entre le compartiment `index` et le suivant de `delta` points de pourcentage
|
|
107
|
+
* (positif : vers le bas). La somme reste 100 :
|
|
108
|
+
*
|
|
109
|
+
* - le côté qui gagne de la place s'agrandit en commençant par le compartiment contre la frontière,
|
|
110
|
+
* puis le suivant s'il atteint son maximum ;
|
|
111
|
+
* - le côté qui en perd rétrécit de la même façon, jusqu'aux minimums.
|
|
112
|
+
*
|
|
113
|
+
* Le déplacement est borné par ce que les deux côtés peuvent absorber : la frontière s'arrête net.
|
|
114
|
+
*/ export function resizeCompartmentBoundary(heights, items, index, delta) {
|
|
115
|
+
const next = [
|
|
116
|
+
...heights
|
|
117
|
+
];
|
|
118
|
+
if (index < 0 || index >= heights.length - 1 || !Number.isFinite(delta) || delta === 0) return next;
|
|
119
|
+
const { mins, maxs } = effectiveLimits(items);
|
|
120
|
+
const above = Array.from({
|
|
121
|
+
length: index + 1
|
|
122
|
+
}, (_, k)=>index - k); // du plus proche de la frontière au plus loin
|
|
123
|
+
const below = Array.from({
|
|
124
|
+
length: heights.length - index - 1
|
|
125
|
+
}, (_, k)=>index + 1 + k);
|
|
126
|
+
const growing = delta > 0 ? above : below;
|
|
127
|
+
const shrinking = delta > 0 ? below : above;
|
|
128
|
+
const growCapacity = growing.reduce((total, i)=>total + Math.max(0, maxs[i] - next[i]), 0);
|
|
129
|
+
const shrinkCapacity = shrinking.reduce((total, i)=>total + Math.max(0, next[i] - mins[i]), 0);
|
|
130
|
+
const amount = Math.min(Math.abs(delta), growCapacity, shrinkCapacity);
|
|
131
|
+
if (amount <= 0) return next;
|
|
132
|
+
let toGrow = amount;
|
|
133
|
+
for (const i of growing){
|
|
134
|
+
const step = Math.min(toGrow, Math.max(0, maxs[i] - next[i]));
|
|
135
|
+
next[i] += step;
|
|
136
|
+
toGrow -= step;
|
|
137
|
+
if (toGrow <= EPSILON) break;
|
|
138
|
+
}
|
|
139
|
+
let toShrink = amount;
|
|
140
|
+
for (const i of shrinking){
|
|
141
|
+
const step = Math.min(toShrink, Math.max(0, next[i] - mins[i]));
|
|
142
|
+
next[i] -= step;
|
|
143
|
+
toShrink -= step;
|
|
144
|
+
if (toShrink <= EPSILON) break;
|
|
145
|
+
}
|
|
146
|
+
return next.map(round);
|
|
147
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workbench/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workbench/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC"}
|
package/dist/workbench/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ToolWindowAnchor } from '@egen-civitas/esm-extensions';
|
|
3
|
+
import { type CompartmentItem } from './compartments.js';
|
|
4
|
+
import { type SideAnchor } from './workbench.store.js';
|
|
3
5
|
interface SplitterProps {
|
|
4
6
|
anchor: ToolWindowAnchor;
|
|
5
7
|
/** Libellé accessible de la poignée. */
|
|
@@ -13,5 +15,35 @@ interface SplitterProps {
|
|
|
13
15
|
* saut au début du glissement, même si la poignée a été saisie à côté de son centre.
|
|
14
16
|
*/
|
|
15
17
|
export declare function Splitter({ anchor, label }: SplitterProps): React.JSX.Element;
|
|
18
|
+
type CornerSide = 'left' | 'right';
|
|
19
|
+
interface CornerSplitterProps {
|
|
20
|
+
/** Zone latérale dont la frontière croise celle de la zone basse. */
|
|
21
|
+
side: CornerSide;
|
|
22
|
+
label: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Poignée d'angle : posée à l'intersection de trois zones (latérale / centre / bas), elle redimensionne
|
|
26
|
+
* les deux axes d'un même geste — la largeur de la zone latérale et la hauteur de la zone basse.
|
|
27
|
+
* Le déplacement est relatif au point saisi : la frontière suit le pointeur sans saut. Double-clic :
|
|
28
|
+
* les deux tailles reviennent à leur valeur par défaut. Les deux poignées linéaires restent
|
|
29
|
+
* disponibles (souris et clavier) ; l'angle est donc un raccourci pointeur, masqué aux lecteurs d'écran.
|
|
30
|
+
*/
|
|
31
|
+
export declare function CornerSplitter({ side, label }: CornerSplitterProps): React.JSX.Element;
|
|
32
|
+
interface CompartmentSplitterProps {
|
|
33
|
+
anchor: SideAnchor;
|
|
34
|
+
/** Rang de la frontière : celle qui sépare le compartiment `index` du suivant. */
|
|
35
|
+
index: number;
|
|
36
|
+
/** Compartiments affichés dans la zone, dans l'ordre. */
|
|
37
|
+
items: readonly CompartmentItem[];
|
|
38
|
+
/** Hauteurs courantes (%) des compartiments. */
|
|
39
|
+
heights: readonly number[];
|
|
40
|
+
label: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Poignée entre deux compartiments empilés d'une zone latérale : glisser (souris/doigt) ou flèches haut/bas
|
|
44
|
+
* déplacent la frontière ; les autres compartiments s'ajustent selon leurs minimum et maximum, la somme restant
|
|
45
|
+
* à 100 % de la zone. Double-clic : hauteurs de base. Elle occupe l'écart entre les deux cartes.
|
|
46
|
+
*/
|
|
47
|
+
export declare function CompartmentSplitter({ anchor, index, items, heights, label }: CompartmentSplitterProps): React.JSX.Element;
|
|
16
48
|
export {};
|
|
17
49
|
//# sourceMappingURL=splitter.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitter.component.d.ts","sourceRoot":"","sources":["../../src/workbench/splitter.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"splitter.component.d.ts","sourceRoot":"","sources":["../../src/workbench/splitter.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAoD,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAC;AAM9B,UAAU,aAAa;IACrB,MAAM,EAAE,gBAAgB,CAAC;IACzB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,aAAa,qBAwExD;AAED,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnC,UAAU,mBAAmB;IAC3B,qEAAqE;IACrE,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,mBAAmB,qBA+ClE;AAOD,UAAU,wBAAwB;IAChC,MAAM,EAAE,UAAU,CAAC;IACnB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAClC,gDAAgD;IAChD,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,qBAyDrG"}
|