maritime-ui 0.1.88 → 0.1.90

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 ADDED
@@ -0,0 +1,18 @@
1
+ # maritime-ui
2
+
3
+ Common UI components and util functions.
4
+
5
+ ## Licenses of bundled assets
6
+
7
+ ### Twemoji Country Flags
8
+
9
+ `CountryFlag` bundles the **Twemoji Country Flags** font so that country flag emojis
10
+ render in Chromium-based browsers on Windows, where the system emoji font does not
11
+ contain flags.
12
+
13
+ The emoji art comes from [Twemoji](https://twemoji.twitter.com) and is used and
14
+ redistributed under the [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
15
+ license terms offered by the Twemoji project. The art is unmodified; it is only
16
+ repackaged as a web font, as built by
17
+ [talkjs/country-flag-emoji-polyfill](https://github.com/talkjs/country-flag-emoji-polyfill)
18
+ (font build tooling under MIT, Copyright (c) 2022 TalkJS).
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { ForwardRefExoticComponent } from 'react';
4
4
  import { JSX } from 'react';
5
5
  import { JSXElementConstructor } from 'react';
6
6
  import { MouseEvent as MouseEvent_2 } from 'react';
7
- import { Props as Props_11 } from 'react-select';
7
+ import { Props as Props_12 } from 'react-select';
8
8
  import { ReactElement } from 'react';
9
9
  import { ReactNode } from 'react';
10
10
  import { ReactPortal } from 'react';
@@ -76,9 +76,11 @@ export declare const CloudUploadIcon: () => JSX.Element;
76
76
 
77
77
  export declare const ConfirmedIcon: () => JSX.Element;
78
78
 
79
+ export declare const CountryFlag: ({ country }: Props_3) => JSX.Element | null;
80
+
79
81
  export declare const CsvIcon: () => JSX.Element;
80
82
 
81
- export declare const DateSeparator: ({ date, noIcon }: Props_3) => JSX.Element;
83
+ export declare const DateSeparator: ({ date, noIcon }: Props_4) => JSX.Element;
82
84
 
83
85
  export declare const DeleteSlotIcon: FC;
84
86
 
@@ -107,7 +109,7 @@ export declare const EditIcon: FC;
107
109
 
108
110
  export declare const EditPenIcon: FC;
109
111
 
110
- export declare class ErrorBoundary extends Component<Props_19, State> {
112
+ export declare class ErrorBoundary extends Component<Props_20, State> {
111
113
  state: State;
112
114
  static getDerivedStateFromError(error: Error): State;
113
115
  render(): string | number | bigint | boolean | JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
@@ -158,15 +160,15 @@ export declare const formatDateDots: (value?: string | Date) => string;
158
160
 
159
161
  export declare const formatPrice: (price: number) => string;
160
162
 
161
- export declare const FormFieldCheckbox: ({ controlKey, options, labelText, inline, required, disabled, exclusive, }: Props_9) => JSX.Element;
163
+ export declare const FormFieldCheckbox: ({ controlKey, options, labelText, inline, required, disabled, exclusive, }: Props_10) => JSX.Element;
162
164
 
163
- export declare const FormFieldDatepicker: ({ controlKey, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, onAfterChange, errorText, }: Props_12) => JSX.Element;
165
+ export declare const FormFieldDatepicker: ({ controlKey, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, openToDate, onAfterChange, errorText, }: Props_13) => JSX.Element;
164
166
 
165
- export declare const FormFieldDatepickerRange: ({ controlKeyStart, controlKeyEnd, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, onAfterChange, errorText, }: Props_13) => JSX.Element;
167
+ export declare const FormFieldDatepickerRange: ({ controlKeyStart, controlKeyEnd, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, onAfterChange, errorText, }: Props_14) => JSX.Element;
166
168
 
167
- export declare const FormFieldInput: ({ controlKey, labelText, type, required, disabled, numeric, digitsOnly, decimalPlaces, onAfterChange, errorText, prefixIcon, suffixIcon, onSuffixIconClick, autoFocus, }: Props_8) => JSX.Element;
169
+ export declare const FormFieldInput: ({ controlKey, labelText, type, required, disabled, numeric, digitsOnly, decimalPlaces, onAfterChange, errorText, prefixIcon, suffixIcon, onSuffixIconClick, autoFocus, }: Props_9) => JSX.Element;
168
170
 
169
- export declare const FormFieldMultiSelect: ForwardRefExoticComponent<Omit<Props_11<DropdownOption, true>, "options" | "isMulti" | "noOptionsMessage"> & {
171
+ export declare const FormFieldMultiSelect: ForwardRefExoticComponent<Omit<Props_12<DropdownOption, true>, "options" | "isMulti" | "noOptionsMessage"> & {
170
172
  controlKey: string;
171
173
  options: DropdownOption[];
172
174
  labelText?: string;
@@ -179,9 +181,9 @@ errorText?: string;
179
181
  optimize?: boolean;
180
182
  } & RefAttributes<SelectInstance<DropdownOption, true>>>;
181
183
 
182
- export declare const FormFieldRadio: ({ controlKey, options, label, tooltipText, required, disabled, }: Props_14) => JSX.Element;
184
+ export declare const FormFieldRadio: ({ controlKey, options, label, tooltipText, required, disabled, }: Props_15) => JSX.Element;
183
185
 
184
- export declare const FormFieldSelect: ForwardRefExoticComponent<Omit<Props_11<DropdownOption, false>, "options" | "noOptionsMessage"> & {
186
+ export declare const FormFieldSelect: ForwardRefExoticComponent<Omit<Props_12<DropdownOption, false>, "options" | "noOptionsMessage"> & {
185
187
  controlKey: string;
186
188
  options: DropdownOption[];
187
189
  labelText?: string;
@@ -195,9 +197,9 @@ optimize?: boolean;
195
197
  inline?: boolean;
196
198
  } & RefAttributes<SelectInstance<DropdownOption, false>>>;
197
199
 
198
- export declare const FormFieldTextarea: ({ controlKey, labelText, required, disabled, rows, errorText, }: Props_10) => JSX.Element;
200
+ export declare const FormFieldTextarea: ({ controlKey, labelText, required, disabled, rows, errorText, }: Props_11) => JSX.Element;
199
201
 
200
- export declare const FormFieldTimepicker: FC<Props_15>;
202
+ export declare const FormFieldTimepicker: FC<Props_16>;
201
203
 
202
204
  export declare const getBadgeTitle: (status: string) => string;
203
205
 
@@ -233,7 +235,7 @@ export declare const JpgIcon: () => JSX.Element;
233
235
 
234
236
  export declare const LinkIcon: () => JSX.Element;
235
237
 
236
- export declare const Loader: ({ size }: Props_16) => JSX.Element;
238
+ export declare const Loader: ({ size }: Props_17) => JSX.Element;
237
239
 
238
240
  export declare const LoadingSpinnerIcon: FC;
239
241
 
@@ -245,7 +247,7 @@ export declare const MagnifierPlusIcon: FC;
245
247
 
246
248
  export declare const MailboxIcon: () => JSX.Element;
247
249
 
248
- export declare const MessageBoxError: ({ errorTag, error }: Props_18) => JSX.Element;
250
+ export declare const MessageBoxError: ({ errorTag, error }: Props_19) => JSX.Element;
249
251
 
250
252
  export declare const MoreActionsDropdown: FC<MoreActionsDropdownProps>;
251
253
 
@@ -263,9 +265,9 @@ declare type PageLoaderProps = {
263
265
  text?: ReactNode;
264
266
  };
265
267
 
266
- export declare const PageWrapper: ({ children, additionalClassName }: Props_17) => JSX.Element;
268
+ export declare const PageWrapper: ({ children, additionalClassName }: Props_18) => JSX.Element;
267
269
 
268
- export declare const Pagination: FC<Props_5>;
270
+ export declare const Pagination: FC<Props_6>;
269
271
 
270
272
  export declare const PdfIcon: () => JSX.Element;
271
273
 
@@ -286,6 +288,16 @@ declare type Props = {
286
288
  };
287
289
 
288
290
  declare type Props_10 = {
291
+ controlKey: string;
292
+ options?: DropdownOption[];
293
+ labelText?: string;
294
+ inline?: boolean;
295
+ required?: boolean;
296
+ disabled?: boolean;
297
+ exclusive?: boolean;
298
+ };
299
+
300
+ declare type Props_11 = {
289
301
  controlKey: string;
290
302
  labelText?: string;
291
303
  required?: boolean;
@@ -294,7 +306,7 @@ declare type Props_10 = {
294
306
  errorText?: string;
295
307
  };
296
308
 
297
- declare type Props_12 = {
309
+ declare type Props_13 = {
298
310
  controlKey: string;
299
311
  labelText?: string;
300
312
  placeholder?: string;
@@ -304,11 +316,12 @@ declare type Props_12 = {
304
316
  dateFormat?: string;
305
317
  minDate?: Date;
306
318
  maxDate?: Date;
319
+ openToDate?: Date;
307
320
  onAfterChange?: (value: string) => void;
308
321
  errorText?: string;
309
322
  };
310
323
 
311
- declare type Props_13 = {
324
+ declare type Props_14 = {
312
325
  controlKeyStart: string;
313
326
  controlKeyEnd: string;
314
327
  labelText?: string;
@@ -323,7 +336,7 @@ declare type Props_13 = {
323
336
  errorText?: string;
324
337
  };
325
338
 
326
- declare type Props_14 = {
339
+ declare type Props_15 = {
327
340
  controlKey: string;
328
341
  options: RadioOption[];
329
342
  label?: string;
@@ -332,7 +345,7 @@ declare type Props_14 = {
332
345
  disabled?: boolean;
333
346
  };
334
347
 
335
- declare type Props_15 = {
348
+ declare type Props_16 = {
336
349
  controlKey: string;
337
350
  labelText: string;
338
351
  required?: boolean;
@@ -341,24 +354,20 @@ declare type Props_15 = {
341
354
  errorText?: string;
342
355
  };
343
356
 
344
- declare type Props_16 = {
357
+ declare type Props_17 = {
345
358
  size?: number;
346
359
  };
347
360
 
348
- declare type Props_17 = {
361
+ declare type Props_18 = {
349
362
  children: ReactNode;
350
363
  additionalClassName?: string | undefined;
351
364
  };
352
365
 
353
- declare type Props_18 = {
366
+ declare type Props_19 = {
354
367
  errorTag?: string;
355
368
  error?: string;
356
369
  };
357
370
 
358
- declare type Props_19 = {
359
- children: ReactNode;
360
- };
361
-
362
371
  declare type Props_2 = {
363
372
  checked: boolean;
364
373
  onChange: (checked: boolean) => void;
@@ -368,18 +377,26 @@ declare type Props_2 = {
368
377
  name?: string;
369
378
  };
370
379
 
380
+ declare type Props_20 = {
381
+ children: ReactNode;
382
+ };
383
+
371
384
  declare type Props_3 = {
385
+ country: string;
386
+ };
387
+
388
+ declare type Props_4 = {
372
389
  date: string;
373
390
  noIcon?: boolean;
374
391
  };
375
392
 
376
- declare type Props_4 = {
393
+ declare type Props_5 = {
377
394
  icon?: ReactNode;
378
395
  illustration?: ReactNode;
379
396
  text: string;
380
397
  };
381
398
 
382
- declare type Props_5 = {
399
+ declare type Props_6 = {
383
400
  additionalClassName?: string;
384
401
  handleClick?: (pageNumber: number) => void;
385
402
  page: number;
@@ -390,7 +407,7 @@ declare type Props_5 = {
390
407
  showResultCount?: boolean;
391
408
  };
392
409
 
393
- declare type Props_6 = {
410
+ declare type Props_7 = {
394
411
  options: DropdownOption[];
395
412
  value?: DropdownOption | null | undefined;
396
413
  defaultValue?: DropdownOption | undefined;
@@ -403,7 +420,7 @@ declare type Props_6 = {
403
420
  additionalClassName?: string | undefined;
404
421
  };
405
422
 
406
- declare type Props_7 = {
423
+ declare type Props_8 = {
407
424
  tooltipText?: string;
408
425
  content?: string;
409
426
  html?: string;
@@ -416,7 +433,7 @@ declare type Props_7 = {
416
433
  ariaLabel?: string;
417
434
  };
418
435
 
419
- declare type Props_8 = {
436
+ declare type Props_9 = {
420
437
  controlKey: string;
421
438
  labelText?: string;
422
439
  type?: string;
@@ -433,16 +450,6 @@ declare type Props_8 = {
433
450
  autoFocus?: boolean;
434
451
  };
435
452
 
436
- declare type Props_9 = {
437
- controlKey: string;
438
- options?: DropdownOption[];
439
- labelText?: string;
440
- inline?: boolean;
441
- required?: boolean;
442
- disabled?: boolean;
443
- exclusive?: boolean;
444
- };
445
-
446
453
  export declare type RadioOption = {
447
454
  label: string;
448
455
  value: string;
@@ -464,7 +471,7 @@ export declare const RotatePersonIcon: FC;
464
471
 
465
472
  export declare const SearchIcon: FC;
466
473
 
467
- export declare const Select: FC<Props_6>;
474
+ export declare const Select: FC<Props_7>;
468
475
 
469
476
  export declare const SendIcon: FC;
470
477
 
@@ -518,7 +525,7 @@ export declare type TableSortState = {
518
525
  direction: 'asc' | 'desc';
519
526
  } | null;
520
527
 
521
- export declare const TableZeroStateRow: ({ icon, illustration, text }: Props_4) => JSX.Element;
528
+ export declare const TableZeroStateRow: ({ icon, illustration, text }: Props_5) => JSX.Element;
522
529
 
523
530
  export declare const TiffIcon: () => JSX.Element;
524
531
 
@@ -541,7 +548,7 @@ declare type ToggleViewProps = {
541
548
  disabled?: boolean;
542
549
  };
543
550
 
544
- export declare const Tooltip: ({ tooltipText, content, html, children, place, position, delay, className, wrapperClassName, ariaLabel, }: Props_7) => JSX.Element | null;
551
+ export declare const Tooltip: ({ tooltipText, content, html, children, place, position, delay, className, wrapperClassName, ariaLabel, }: Props_8) => JSX.Element | null;
545
552
 
546
553
  declare type TooltipPlace = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
547
554