@axinom/mosaic-ui 0.32.0-rc.9 → 0.33.0-rc.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/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +2 -0
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/dist/components/Actions/Actions.d.ts.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts.map +1 -1
- package/dist/components/Explorer/Explorer.model.d.ts +5 -0
- package/dist/components/Explorer/Explorer.model.d.ts.map +1 -1
- package/dist/components/Explorer/SelectionExplorer/SelectionExplorer.d.ts.map +1 -1
- package/dist/components/Filters/Filter/Filter.d.ts.map +1 -1
- package/dist/components/Filters/Filters.model.d.ts +7 -2
- package/dist/components/Filters/Filters.model.d.ts.map +1 -1
- package/dist/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.d.ts +13 -0
- package/dist/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.d.ts.map +1 -0
- package/dist/components/FormElements/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/components/FormStation/FormStation.d.ts.map +1 -1
- package/dist/components/InfoPanel/Section/Section.d.ts +3 -1
- package/dist/components/InfoPanel/Section/Section.d.ts.map +1 -1
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.d.ts.map +1 -1
- package/dist/hooks/useBusy/useBusy.d.ts +4 -0
- package/dist/hooks/useBusy/useBusy.d.ts.map +1 -0
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/initialize.d.ts +11 -1
- package/dist/initialize.d.ts.map +1 -1
- package/dist/types/ui-config.d.ts +7 -0
- package/dist/types/ui-config.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Accordion/AccordionItem/AccordionItem.spec.tsx +11 -0
- package/src/components/Accordion/AccordionItem/AccordionItem.tsx +5 -1
- package/src/components/Actions/Action/Action.spec.tsx +2 -2
- package/src/components/Actions/Action/Action.tsx +1 -1
- package/src/components/Actions/Actions.spec.tsx +19 -0
- package/src/components/Actions/Actions.tsx +8 -1
- package/src/components/Explorer/Explorer.model.ts +5 -0
- package/src/components/Explorer/Explorer.spec.tsx +37 -5
- package/src/components/Explorer/Explorer.tsx +5 -3
- package/src/components/Explorer/SelectionExplorer/SelectionExplorer.spec.tsx +30 -0
- package/src/components/Explorer/SelectionExplorer/SelectionExplorer.tsx +1 -0
- package/src/components/Filters/Filter/Filter.tsx +24 -0
- package/src/components/Filters/Filters.model.ts +7 -1
- package/src/components/Filters/Filters.stories.tsx +20 -0
- package/src/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.scss +40 -0
- package/src/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.tsx +71 -0
- package/src/components/FormElements/ToggleButton/ToggleButton.tsx +1 -1
- package/src/components/FormStation/FormStation.scss +29 -0
- package/src/components/FormStation/FormStation.spec.tsx +66 -8
- package/src/components/FormStation/FormStation.tsx +5 -1
- package/src/components/InfoPanel/Paragraph/Paragraph.scss +1 -1
- package/src/components/InfoPanel/Section/Section.scss +34 -2
- package/src/components/InfoPanel/Section/Section.spec.tsx +117 -0
- package/src/components/InfoPanel/Section/Section.tsx +32 -9
- package/src/components/LandingPageTiles/TileLarge/TileLarge.scss +3 -3
- package/src/components/LandingPageTiles/TileSmall/TileSmall.scss +3 -3
- package/src/components/List/List.spec.tsx +23 -0
- package/src/components/List/List.stories.tsx +8 -0
- package/src/components/List/List.tsx +15 -3
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.spec.tsx +1 -1
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.tsx +1 -1
- package/src/components/PageHeader/PageHeaderBulkActions/PageHeaderBulkActions.tsx +1 -1
- package/src/hooks/useBusy/useBusy.spec.tsx +34 -0
- package/src/hooks/useBusy/useBusy.tsx +14 -0
- package/src/initialize.ts +30 -2
- package/src/styles/variables.scss +3 -0
- package/src/types/ui-config.ts +15 -0
package/src/initialize.ts
CHANGED
|
@@ -1,18 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AddIndicator,
|
|
3
|
+
CustomEventEmitter,
|
|
4
|
+
RemoveIndicator,
|
|
5
|
+
ShowNotification,
|
|
6
|
+
} from './types/ui-config';
|
|
2
7
|
|
|
3
8
|
export let showNotification: ShowNotification | (() => void) =
|
|
4
9
|
polyfill('showNotification');
|
|
5
10
|
|
|
11
|
+
export let addIndicator: AddIndicator | (() => void) = polyfill('addIndicator');
|
|
12
|
+
|
|
13
|
+
export let removeIndicator: RemoveIndicator | (() => void) =
|
|
14
|
+
polyfill('removeIndicator');
|
|
15
|
+
|
|
16
|
+
export let on: CustomEventEmitter['on'] | (() => void) = polyfill('on');
|
|
17
|
+
|
|
18
|
+
export let showSaveIndicator: () => void = polyfill('showSaveIndicator');
|
|
19
|
+
|
|
20
|
+
export let hideSaveIndicator: () => void = polyfill('hideSaveIndicator');
|
|
21
|
+
|
|
6
22
|
/**
|
|
7
23
|
* Passes the PiralApi methods to the UI library.
|
|
8
24
|
* @param app {UiConfig} object containing PiralApi methods for use in UI library.
|
|
9
25
|
*/
|
|
10
26
|
export function initializeUi(app: UiConfig): void {
|
|
11
|
-
({
|
|
27
|
+
({
|
|
28
|
+
showNotification,
|
|
29
|
+
addIndicator,
|
|
30
|
+
removeIndicator,
|
|
31
|
+
on,
|
|
32
|
+
showSaveIndicator,
|
|
33
|
+
hideSaveIndicator,
|
|
34
|
+
} = app);
|
|
12
35
|
}
|
|
13
36
|
|
|
14
37
|
export interface UiConfig {
|
|
15
38
|
showNotification: ShowNotification;
|
|
39
|
+
addIndicator: AddIndicator;
|
|
40
|
+
removeIndicator: RemoveIndicator;
|
|
41
|
+
on: CustomEventEmitter['on'];
|
|
42
|
+
showSaveIndicator: () => void;
|
|
43
|
+
hideSaveIndicator: () => void;
|
|
16
44
|
}
|
|
17
45
|
|
|
18
46
|
function polyfill(methodName: string): () => void {
|
|
@@ -71,6 +71,8 @@ $filter-font-size: 16px;
|
|
|
71
71
|
$filter-width: 360px;
|
|
72
72
|
$filter-controller-background-color: $light-gray-2;
|
|
73
73
|
$filter-border-color: $blue;
|
|
74
|
+
$multi-option-checbox-border: $blue;
|
|
75
|
+
$multi-option-label-color: $dark-gray;
|
|
74
76
|
|
|
75
77
|
/* Details vars */
|
|
76
78
|
$details-background-color: #ffffff;
|
|
@@ -195,6 +197,7 @@ $date-picker-max-width: $width-small;
|
|
|
195
197
|
$form-element-min-height: 50px;
|
|
196
198
|
$read-only-text-background-color: $light-gray-2;
|
|
197
199
|
$select-background-color: white;
|
|
200
|
+
$form-indicator-color: $green;
|
|
198
201
|
|
|
199
202
|
/* Dynamic Data List */
|
|
200
203
|
$dynamic-list-row-bg-color: white;
|
package/src/types/ui-config.ts
CHANGED
|
@@ -28,3 +28,18 @@ export type NotificationId = string | number;
|
|
|
28
28
|
export type NotificationBody = string | ReactNode | Component;
|
|
29
29
|
|
|
30
30
|
export type NotificationType = 'success' | 'error' | 'info' | 'warning';
|
|
31
|
+
|
|
32
|
+
export type IndicatorId = number;
|
|
33
|
+
|
|
34
|
+
export type AddIndicator = (content: React.ReactNode) => IndicatorId;
|
|
35
|
+
|
|
36
|
+
export type RemoveIndicator = (id: IndicatorId) => void;
|
|
37
|
+
|
|
38
|
+
export type UpdateIndicator = (
|
|
39
|
+
id: IndicatorId,
|
|
40
|
+
content: React.ReactNode,
|
|
41
|
+
) => void;
|
|
42
|
+
|
|
43
|
+
export interface CustomEventEmitter {
|
|
44
|
+
on(eventName: string, listener: (...args: unknown[]) => void): void;
|
|
45
|
+
}
|