@esrf/daiquiri-lib 0.0.2-alpha.7 → 0.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/README.md +7 -0
- package/dist/index.d.ts +148 -12
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +4 -1
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @esrf/daiquiri-lib
|
|
2
|
+
|
|
3
|
+
Shared UI components and associated machinary from the [daiquiri-ui](https://gitlab.esrf.fr/ui/daiquiri-ui) project for beamline control and data acqusition. These shared components allow for a consistent look and feel for projects outside of the daiquiri core.
|
|
4
|
+
|
|
5
|
+
The library currently exports the YAML layout language, validator, and renderer, and a selection of hardware components.
|
|
6
|
+
|
|
7
|
+
See our [documentation](ui.gitlab-pages.esrf.fr/daiquiri-ui/daiquiri-lib) for more information.
|
package/dist/index.d.ts
CHANGED
|
@@ -229,7 +229,7 @@ declare function Property(props: HardwareWidgetProps<GenericSchema, PropertyWidg
|
|
|
229
229
|
|
|
230
230
|
declare function ShutterDefault(props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>): JSX.Element;
|
|
231
231
|
|
|
232
|
-
interface Props$
|
|
232
|
+
interface Props$b {
|
|
233
233
|
online: boolean;
|
|
234
234
|
activeMessage?: string;
|
|
235
235
|
inactiveMessage?: string;
|
|
@@ -237,9 +237,9 @@ interface Props$4 {
|
|
|
237
237
|
icon: string;
|
|
238
238
|
name: string;
|
|
239
239
|
}
|
|
240
|
-
declare function TypeIcon(props: Props$
|
|
240
|
+
declare function TypeIcon(props: Props$b): JSX.Element;
|
|
241
241
|
|
|
242
|
-
interface Props$
|
|
242
|
+
interface Props$a {
|
|
243
243
|
hardware: Hardware;
|
|
244
244
|
headerMode?: string;
|
|
245
245
|
widgetIcon: ReactElement;
|
|
@@ -250,7 +250,7 @@ interface Props$3 {
|
|
|
250
250
|
* Normalized way to compose hardware component in order to provide the same
|
|
251
251
|
* kind of layout
|
|
252
252
|
*/
|
|
253
|
-
declare function HardwareTemplate(props: Props$
|
|
253
|
+
declare function HardwareTemplate(props: Props$a): JSX.Element;
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
256
|
* Input number synchronized with a hardware.
|
|
@@ -367,12 +367,12 @@ declare class HardwareVariant extends Component<HardwareVariantOptions, void> {
|
|
|
367
367
|
render(): JSX.Element;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
interface Props$
|
|
370
|
+
interface Props$9 {
|
|
371
371
|
className?: string;
|
|
372
372
|
}
|
|
373
|
-
declare function FullSizer(props: PropsWithChildren<Props$
|
|
373
|
+
declare function FullSizer(props: PropsWithChildren<Props$9>): JSX.Element;
|
|
374
374
|
|
|
375
|
-
interface Props$
|
|
375
|
+
interface Props$8 {
|
|
376
376
|
step?: number;
|
|
377
377
|
steps?: number[];
|
|
378
378
|
disabled: boolean;
|
|
@@ -394,7 +394,7 @@ interface Props$1 {
|
|
|
394
394
|
}) => void;
|
|
395
395
|
onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
396
396
|
}
|
|
397
|
-
declare const NumericStep: react.ForwardRefExoticComponent<Props$
|
|
397
|
+
declare const NumericStep: react.ForwardRefExoticComponent<Props$8 & react.RefAttributes<HTMLInputElement>>;
|
|
398
398
|
|
|
399
399
|
interface YamlNode {
|
|
400
400
|
type: string;
|
|
@@ -409,20 +409,156 @@ interface YamlRoot extends YamlNode {
|
|
|
409
409
|
interface AnyYamlNode extends YamlNode {
|
|
410
410
|
[key: string]: any;
|
|
411
411
|
}
|
|
412
|
-
interface YamlComponent {
|
|
412
|
+
interface YamlComponent$1 {
|
|
413
413
|
providers?: Record<string, any>;
|
|
414
414
|
yamlNode: YamlNode;
|
|
415
415
|
[option: string]: unknown;
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
+
interface Props$7 {
|
|
419
|
+
yamlNode: AnyYamlNode;
|
|
420
|
+
panel: boolean;
|
|
421
|
+
}
|
|
422
|
+
declare function YamlRow({ yamlNode, panel }: Props$7): JSX.Element;
|
|
423
|
+
|
|
424
|
+
interface Props$6 {
|
|
425
|
+
yamlNode: AnyYamlNode;
|
|
426
|
+
panel: boolean;
|
|
427
|
+
}
|
|
428
|
+
declare function YamlCol({ yamlNode, panel }: Props$6): JSX.Element;
|
|
429
|
+
|
|
418
430
|
declare function registerComponent(name: string, component: React.ComponentType<any>): void;
|
|
431
|
+
interface YamlComponentNode extends YamlNode {
|
|
432
|
+
type: string;
|
|
433
|
+
[name: string]: any;
|
|
434
|
+
scroll?: boolean;
|
|
435
|
+
style?: Record<string, any>;
|
|
436
|
+
title?: string;
|
|
437
|
+
}
|
|
438
|
+
declare function YamlComponent(props: {
|
|
439
|
+
yamlNode: YamlComponentNode;
|
|
440
|
+
panel: boolean;
|
|
441
|
+
}): JSX.Element;
|
|
442
|
+
|
|
443
|
+
interface Props$5 {
|
|
444
|
+
yamlNode: {
|
|
445
|
+
children: any[];
|
|
446
|
+
options?: Record<string, any>;
|
|
447
|
+
};
|
|
448
|
+
panel: boolean;
|
|
449
|
+
}
|
|
450
|
+
declare function YamlContainer({ yamlNode, panel }: Props$5): JSX.Element;
|
|
451
|
+
|
|
452
|
+
interface Props$4 {
|
|
453
|
+
yamlNode: {
|
|
454
|
+
children: any[];
|
|
455
|
+
options?: Record<string, any>;
|
|
456
|
+
title?: string;
|
|
457
|
+
};
|
|
458
|
+
panel: boolean;
|
|
459
|
+
}
|
|
460
|
+
declare function YamlPanel(props: Props$4): ReactElement;
|
|
461
|
+
|
|
462
|
+
interface Props$3 {
|
|
463
|
+
yamlNode: {
|
|
464
|
+
children: any[];
|
|
465
|
+
options?: Record<string, any>;
|
|
466
|
+
title: string;
|
|
467
|
+
};
|
|
468
|
+
panel: boolean;
|
|
469
|
+
}
|
|
470
|
+
declare function YamlTabs({ yamlNode, panel }: Props$3): JSX.Element;
|
|
419
471
|
|
|
420
|
-
interface
|
|
472
|
+
interface YamlFormHeaderNode extends YamlNode {
|
|
473
|
+
type: 'formheader';
|
|
474
|
+
title?: string;
|
|
475
|
+
}
|
|
476
|
+
interface YamlFormRowNode extends YamlNode {
|
|
477
|
+
type: string;
|
|
478
|
+
title: string;
|
|
479
|
+
component?: string;
|
|
480
|
+
stateinheader?: boolean;
|
|
481
|
+
titlealign?: string;
|
|
482
|
+
id?: string;
|
|
483
|
+
variant?: string;
|
|
484
|
+
options?: Record<string, any>;
|
|
485
|
+
even: boolean;
|
|
486
|
+
}
|
|
487
|
+
interface YamlFormNode extends YamlNode {
|
|
488
|
+
children: (YamlFormHeaderNode | YamlFormRowNode)[];
|
|
489
|
+
title?: string;
|
|
490
|
+
[key: string]: any;
|
|
491
|
+
}
|
|
492
|
+
declare function YamlForm(props: {
|
|
493
|
+
yamlNode: YamlFormNode;
|
|
494
|
+
panel: boolean;
|
|
495
|
+
}): JSX.Element;
|
|
496
|
+
|
|
497
|
+
interface YamlGridNode extends YamlNode {
|
|
498
|
+
children: YamlGridCellNode[];
|
|
499
|
+
title?: string;
|
|
500
|
+
columns?: string;
|
|
501
|
+
rows?: string;
|
|
502
|
+
}
|
|
503
|
+
interface YamlGridCellNode extends YamlNode {
|
|
504
|
+
columnSpan?: number;
|
|
505
|
+
rowSpan?: number;
|
|
506
|
+
}
|
|
507
|
+
declare function YamlGrid(props: {
|
|
508
|
+
yamlNode: YamlGridNode;
|
|
509
|
+
panel: boolean;
|
|
510
|
+
}): JSX.Element;
|
|
511
|
+
|
|
512
|
+
interface Props$2 {
|
|
513
|
+
yamlNode: {
|
|
514
|
+
children: any[];
|
|
515
|
+
options?: {
|
|
516
|
+
[name: string]: any;
|
|
517
|
+
scroll?: boolean;
|
|
518
|
+
style?: Record<string, any>;
|
|
519
|
+
};
|
|
520
|
+
label?: string;
|
|
521
|
+
};
|
|
522
|
+
panel: boolean;
|
|
523
|
+
}
|
|
524
|
+
declare function YamlLabel({ yamlNode, panel }: Props$2): JSX.Element;
|
|
525
|
+
|
|
526
|
+
declare const yamlMap: {
|
|
527
|
+
row: typeof YamlRow;
|
|
528
|
+
col: typeof YamlCol;
|
|
529
|
+
container: typeof YamlContainer;
|
|
530
|
+
component: typeof YamlComponent;
|
|
531
|
+
panel: typeof YamlPanel;
|
|
532
|
+
tabs: typeof YamlTabs;
|
|
533
|
+
form: typeof YamlForm;
|
|
534
|
+
grid: typeof YamlGrid;
|
|
535
|
+
label: typeof YamlLabel;
|
|
536
|
+
};
|
|
537
|
+
interface Props$1 {
|
|
421
538
|
id: string;
|
|
422
539
|
layout: YamlRoot;
|
|
423
540
|
className?: string;
|
|
424
541
|
}
|
|
425
|
-
declare function Main(props: Props): JSX.Element;
|
|
542
|
+
declare function Main(props: Props$1): JSX.Element;
|
|
543
|
+
|
|
544
|
+
interface State {
|
|
545
|
+
hasError: boolean;
|
|
546
|
+
message: string;
|
|
547
|
+
error?: Error;
|
|
548
|
+
}
|
|
549
|
+
declare type Props = PropsWithChildren<{
|
|
550
|
+
resetKey?: any;
|
|
551
|
+
}>;
|
|
552
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
553
|
+
constructor(props: Props);
|
|
554
|
+
static getDerivedStateFromError(): {
|
|
555
|
+
hasError: boolean;
|
|
556
|
+
};
|
|
557
|
+
private readonly reload;
|
|
558
|
+
componentDidCatch(error: Error): void;
|
|
559
|
+
componentDidUpdate(prevProps: Props, prevState: State): void;
|
|
560
|
+
render(): react.ReactNode;
|
|
561
|
+
}
|
|
426
562
|
|
|
427
563
|
/**
|
|
428
564
|
* Register the Yaml type with the component used to render this Yaml node.
|
|
@@ -516,4 +652,4 @@ declare namespace HardwareObject_d {
|
|
|
516
652
|
*/
|
|
517
653
|
declare function registerHardwareComponent(name: string, component: React.ComponentType<any>): void;
|
|
518
654
|
|
|
519
|
-
export { formatting_d as Formatting, Frontend, FullSizer, HardwareObject_d as HWObject, HardwareInputNumber, HardwareNumericStep, schema_d as HardwareSchema, State_d as HardwareState, HardwareTemplate, types_d as HardwareTypes, HardwareVariant, Info, KeyError, MissingKeysError, MotorDefault, type MotorDefaultOptions, Multiposition, NoObject, NumericStep, Property, ShutterDefault, TypeIcon, Main as YAMLLayout, asserts_d as YamlAsserts, type YamlComponent, type YamlNode, registerHardwareComponent, registerComponent as registerYamlComponent, registerYamlType, renderYamlNode };
|
|
655
|
+
export { formatting_d as Formatting, Frontend, FullSizer, HardwareObject_d as HWObject, HardwareInputNumber, HardwareNumericStep, schema_d as HardwareSchema, State_d as HardwareState, HardwareTemplate, types_d as HardwareTypes, HardwareVariant, Info, type InfoOptions, KeyError, MissingKeysError, MotorDefault, type MotorDefaultOptions, Multiposition, NoObject, NumericStep, Property, ShutterDefault, TypeIcon, type Props$b as TypeIconOptions, ErrorBoundary as YAMLErrorBoundary, Main as YAMLLayout, asserts_d as YamlAsserts, type YamlComponent$1 as YamlComponent, type YamlNode, registerHardwareComponent, registerComponent as registerYamlComponent, registerYamlType, renderYamlNode, yamlMap };
|
package/dist/index.esm.js
CHANGED
|
@@ -1555,11 +1555,13 @@ export {
|
|
|
1555
1555
|
Dt as Property,
|
|
1556
1556
|
$t as ShutterDefault,
|
|
1557
1557
|
I as TypeIcon,
|
|
1558
|
+
ze as YAMLErrorBoundary,
|
|
1558
1559
|
Ht as YAMLLayout,
|
|
1559
1560
|
Tt as YamlAsserts,
|
|
1560
1561
|
Pt as registerHardwareComponent,
|
|
1561
1562
|
Vt as registerYamlComponent,
|
|
1562
1563
|
Ve as registerYamlType,
|
|
1563
|
-
O as renderYamlNode
|
|
1564
|
+
O as renderYamlNode,
|
|
1565
|
+
gt as yamlMap
|
|
1564
1566
|
};
|
|
1565
1567
|
//# sourceMappingURL=index.esm.js.map
|