@colijnit/sharedcomponents 1.0.26 → 1.0.28

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.
Files changed (132) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +2710 -72
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents.d.ts +24 -0
  4. package/colijnit-sharedcomponents.metadata.json +1 -1
  5. package/esm2015/colijnit-sharedcomponents.js +25 -1
  6. package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +3 -4
  7. package/esm2015/lib/components/date-planning/component/agenda/agenda-base-view.component.js +61 -0
  8. package/esm2015/lib/components/date-planning/component/agenda/agenda-day-view.component.js +32 -0
  9. package/esm2015/lib/components/date-planning/component/agenda/agenda-event.component.js +54 -0
  10. package/esm2015/lib/components/date-planning/component/agenda/agenda-events.component.js +43 -0
  11. package/esm2015/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.js +68 -0
  12. package/esm2015/lib/components/date-planning/component/agenda/agenda-header.component.js +232 -0
  13. package/esm2015/lib/components/date-planning/component/agenda/agenda-hour-cell.component.js +36 -0
  14. package/esm2015/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.js +50 -0
  15. package/esm2015/lib/components/date-planning/component/agenda/agenda-hour-view.component.js +46 -0
  16. package/esm2015/lib/components/date-planning/component/agenda/agenda-month-view.component.js +61 -0
  17. package/esm2015/lib/components/date-planning/component/agenda/agenda-select-event.component.js +39 -0
  18. package/esm2015/lib/components/date-planning/component/agenda/agenda-view.component.js +35 -0
  19. package/esm2015/lib/components/date-planning/component/agenda/agenda-week-select-view.component.js +64 -0
  20. package/esm2015/lib/components/date-planning/component/agenda/agenda-week-view.component.js +48 -0
  21. package/esm2015/lib/components/date-planning/component/agenda/view-select.component.js +42 -0
  22. package/esm2015/lib/components/date-planning/component/calendar/calendar-all-months.component.js +34 -0
  23. package/esm2015/lib/components/date-planning/component/calendar/calendar-all-years.component.js +48 -0
  24. package/esm2015/lib/components/date-planning/component/calendar/calendar-header.component.js +107 -0
  25. package/esm2015/lib/components/date-planning/component/calendar/calendar-view.component.js +178 -0
  26. package/esm2015/lib/components/date-planning/component/calendar/calendar.component.js +34 -0
  27. package/esm2015/lib/components/date-planning/date-planning.component.js +106 -0
  28. package/esm2015/lib/components/date-planning/date-planning.module.js +63 -0
  29. package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +83 -54
  30. package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +6 -3
  31. package/esm2015/lib/components/send-method-dialog/send-method-params.interface.js +2 -0
  32. package/esm2015/lib/components/statusbar/statusbar.component.js +2 -2
  33. package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +7 -4
  34. package/esm2015/lib/enum/calendar-view.enum.js +8 -0
  35. package/esm2015/lib/enum/icon.enum.js +6 -1
  36. package/esm2015/lib/enum/month.enum.js +17 -0
  37. package/esm2015/lib/enum/thumb-three-way-state.js +19 -0
  38. package/esm2015/lib/enum/time-period.enum.js +11 -0
  39. package/esm2015/lib/model/agenda-event-per-day.model.js +6 -0
  40. package/esm2015/lib/model/agenda-event.model.js +8 -0
  41. package/esm2015/lib/model/agenda-null-objects.js +11 -0
  42. package/esm2015/lib/model/constant/all-months.js +17 -0
  43. package/esm2015/lib/model/date-range.js +5 -0
  44. package/esm2015/lib/model/day.model.js +7 -0
  45. package/esm2015/lib/model/icon-svg.js +6 -1
  46. package/esm2015/lib/model/month.model.js +11 -0
  47. package/esm2015/lib/model/time-window.bo.js +26 -0
  48. package/esm2015/lib/model/week.model.js +6 -0
  49. package/esm2015/lib/model/weekday.model.js +10 -0
  50. package/esm2015/lib/pipe/array-number.pipe.js +15 -0
  51. package/esm2015/lib/pipe/master-pipes.js +7 -0
  52. package/esm2015/lib/pipe/ucfirst.pipe.js +16 -0
  53. package/esm2015/lib/service/shared-connector.service.js +49 -1
  54. package/esm2015/lib/service/stock.service.js +16 -5
  55. package/esm2015/lib/utils/array-utils.js +24 -5
  56. package/esm2015/lib/utils/calendar.utils.js +69 -0
  57. package/esm2015/lib/utils/check-precision-and-scale-result.js +2 -0
  58. package/esm2015/lib/utils/check-within-stepped-bounds-result.js +2 -0
  59. package/esm2015/lib/utils/date-utils.js +264 -0
  60. package/esm2015/lib/utils/function/not-nill.function.js +5 -0
  61. package/esm2015/lib/utils/map-utils.js +41 -0
  62. package/esm2015/lib/utils/number-utils.js +390 -0
  63. package/esm2015/lib/utils/object-utils.js +278 -0
  64. package/esm2015/public-api.js +3 -1
  65. package/fesm2015/colijnit-sharedcomponents.js +2789 -98
  66. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  67. package/lib/components/date-planning/component/agenda/agenda-base-view.component.d.ts +21 -0
  68. package/lib/components/date-planning/component/agenda/agenda-day-view.component.d.ts +6 -0
  69. package/lib/components/date-planning/component/agenda/agenda-event.component.d.ts +17 -0
  70. package/lib/components/date-planning/component/agenda/agenda-events.component.d.ts +12 -0
  71. package/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.d.ts +18 -0
  72. package/lib/components/date-planning/component/agenda/agenda-header.component.d.ts +47 -0
  73. package/lib/components/date-planning/component/agenda/agenda-hour-cell.component.d.ts +9 -0
  74. package/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.d.ts +8 -0
  75. package/lib/components/date-planning/component/agenda/agenda-hour-view.component.d.ts +7 -0
  76. package/lib/components/date-planning/component/agenda/agenda-month-view.component.d.ts +10 -0
  77. package/lib/components/date-planning/component/agenda/agenda-select-event.component.d.ts +12 -0
  78. package/lib/components/date-planning/component/agenda/agenda-view.component.d.ts +11 -0
  79. package/lib/components/date-planning/component/agenda/agenda-week-select-view.component.d.ts +10 -0
  80. package/lib/components/date-planning/component/agenda/agenda-week-view.component.d.ts +8 -0
  81. package/lib/components/date-planning/component/agenda/view-select.component.d.ts +11 -0
  82. package/lib/components/date-planning/component/calendar/calendar-all-months.component.d.ts +9 -0
  83. package/lib/components/date-planning/component/calendar/calendar-all-years.component.d.ts +9 -0
  84. package/lib/components/date-planning/component/calendar/calendar-header.component.d.ts +23 -0
  85. package/lib/components/date-planning/component/calendar/calendar-view.component.d.ts +31 -0
  86. package/lib/components/date-planning/component/calendar/calendar.component.d.ts +10 -0
  87. package/lib/components/date-planning/date-planning.component.d.ts +25 -0
  88. package/lib/components/date-planning/date-planning.module.d.ts +2 -0
  89. package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +24 -7
  90. package/lib/components/send-method-dialog/send-method-params.interface.d.ts +13 -0
  91. package/lib/components/send-method-dialog/style/_layout.scss +5 -0
  92. package/lib/components/statusbar/statusbar.component.d.ts +1 -0
  93. package/lib/components/tags/component/style/_layout.scss +67 -0
  94. package/lib/components/tags/component/style/_material-definition.scss +1 -0
  95. package/lib/components/tags/component/style/_theme.scss +8 -0
  96. package/lib/components/tags/component/style/material.scss +3 -0
  97. package/lib/components/tags/component/tag-join-label/style/_layout.scss +97 -0
  98. package/lib/components/tags/component/tag-join-label/style/_material-definition.scss +4 -0
  99. package/lib/components/tags/component/tag-join-label/style/_theme.scss +8 -0
  100. package/lib/components/tags/component/tag-join-label/style/material.scss +3 -0
  101. package/lib/enum/calendar-view.enum.d.ts +6 -0
  102. package/lib/enum/icon.enum.d.ts +5 -0
  103. package/lib/enum/month.enum.d.ts +14 -0
  104. package/lib/enum/thumb-three-way-state.d.ts +6 -0
  105. package/lib/enum/time-period.enum.d.ts +8 -0
  106. package/lib/model/agenda-event-per-day.model.d.ts +5 -0
  107. package/lib/model/agenda-event.model.d.ts +16 -0
  108. package/lib/model/agenda-null-objects.d.ts +10 -0
  109. package/lib/model/constant/all-months.d.ts +2 -0
  110. package/lib/model/date-range.d.ts +7 -0
  111. package/lib/model/day.model.d.ts +8 -0
  112. package/lib/model/month.model.d.ts +5 -0
  113. package/lib/model/time-window.bo.d.ts +13 -0
  114. package/lib/model/week.model.d.ts +4 -0
  115. package/lib/model/weekday.model.d.ts +16 -0
  116. package/lib/pipe/array-number.pipe.d.ts +4 -0
  117. package/lib/pipe/master-pipes.d.ts +1 -0
  118. package/lib/pipe/ucfirst.pipe.d.ts +4 -0
  119. package/lib/service/shared-connector.service.d.ts +4 -0
  120. package/lib/service/stock.service.d.ts +6 -2
  121. package/lib/style/_mixin.scss +5 -0
  122. package/lib/utils/array-utils.d.ts +6 -0
  123. package/lib/utils/calendar.utils.d.ts +10 -0
  124. package/lib/utils/check-precision-and-scale-result.d.ts +4 -0
  125. package/lib/utils/check-within-stepped-bounds-result.d.ts +8 -0
  126. package/lib/utils/date-utils.d.ts +44 -0
  127. package/lib/utils/function/not-nill.function.d.ts +1 -0
  128. package/lib/utils/map-utils.d.ts +16 -0
  129. package/lib/utils/number-utils.d.ts +125 -0
  130. package/lib/utils/object-utils.d.ts +40 -0
  131. package/package.json +1 -1
  132. package/public-api.d.ts +2 -0
@@ -0,0 +1,3 @@
1
+ @import "./material-definition";
2
+ @import "./layout";
3
+ @import "./theme";
@@ -0,0 +1,6 @@
1
+ export declare enum CalendarView {
2
+ DayView = "DAY",
3
+ WeekView = "WEEK",
4
+ WeekSelectView = "WEEK_SELECT",
5
+ MonthView = "MONTH"
6
+ }
@@ -10,8 +10,13 @@ export declare enum Icon {
10
10
  DeleteLeftRegular = "delete_left_regular",
11
11
  DeliveryTruck = "delivery_truck",
12
12
  Email = "email",
13
+ EnvelopeRegular = "envelope_regular",
14
+ FilePdfRegular = "file_pdf_regular",
15
+ FilePdfSolid = "file_pdf_solid",
13
16
  Pdf = "pdf",
14
17
  Print = "print",
18
+ PrintRegular = "print_regular",
19
+ PrintSolid = "print_solid",
15
20
  SignatureField = "signature_field",
16
21
  Xml = "xml"
17
22
  }
@@ -0,0 +1,14 @@
1
+ export declare enum Month {
2
+ January = "JANUARY",
3
+ Februrary = "FEBRUARY",
4
+ March = "MARCH",
5
+ April = "APRIL",
6
+ May = "MAY",
7
+ June = "JUNE",
8
+ July = "JULY",
9
+ August = "AUGUST",
10
+ September = "SEPTEMBER",
11
+ October = "OCTOBER",
12
+ November = "NOVEMBER",
13
+ December = "DECEMBER"
14
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum ThumbThreeWayState {
2
+ Left = 0,
3
+ Middle = 1,
4
+ Right = 2
5
+ }
6
+ export declare function NextStateOfThumbThreeWay(state: ThumbThreeWayState): ThumbThreeWayState;
@@ -0,0 +1,8 @@
1
+ export declare enum TimePeriod {
2
+ LastSevenDays = "LW",
3
+ LastMonth = "LM",
4
+ LastYear = "LY",
5
+ LastCalendarYear = "LCY",
6
+ CurrentCalendarYear = "CCY",
7
+ Custom = "C"
8
+ }
@@ -0,0 +1,5 @@
1
+ import { AgendaEvent } from "./agenda-event.model";
2
+ export declare class AgendaEventPerDay {
3
+ date: Date;
4
+ events: AgendaEvent[];
5
+ }
@@ -0,0 +1,16 @@
1
+ import { TimeWindow } from "./time-window.bo";
2
+ export declare class AgendaEvent {
3
+ id: number;
4
+ description: string;
5
+ checked: boolean;
6
+ showCheckbox: boolean;
7
+ draggable: boolean;
8
+ from: Date;
9
+ to: Date;
10
+ date: Date;
11
+ dayPartNo: number;
12
+ fromString: string;
13
+ toString: string;
14
+ fromToRepresentation: string;
15
+ timeWindow: TimeWindow;
16
+ }
@@ -0,0 +1,10 @@
1
+ import { AgendaEvent } from "./agenda-event.model";
2
+ import { AgendaEventPerDay } from "./agenda-event-per-day.model";
3
+ import { Month } from "./month.model";
4
+ import { Week } from "./week.model";
5
+ import { Day } from "./day.model";
6
+ export declare const NULL_AGENDA_EVENT: AgendaEvent;
7
+ export declare const NULL_AGENDA_EVENT_PER_DAY: AgendaEventPerDay;
8
+ export declare const NULL_MONTH: Month;
9
+ export declare const NULL_WEEK: Week;
10
+ export declare const NULL_DAY: Day;
@@ -0,0 +1,2 @@
1
+ import { Month } from "../../enum/month.enum";
2
+ export declare const ALL_MONTHS: Month[];
@@ -0,0 +1,7 @@
1
+ import { TimePeriod } from "../enum/time-period.enum";
2
+ export declare class DateRange {
3
+ startDate: Date;
4
+ endDate: Date;
5
+ selectedTimePeriod: TimePeriod;
6
+ constructor();
7
+ }
@@ -0,0 +1,8 @@
1
+ import { AgendaEvent } from "./agenda-event.model";
2
+ export declare class Day {
3
+ day: number;
4
+ date: Date;
5
+ description: string;
6
+ datesByTheHour: Date[];
7
+ events: AgendaEvent[];
8
+ }
@@ -0,0 +1,5 @@
1
+ import { Week } from "./week.model";
2
+ export declare class Month {
3
+ weeks: Week[];
4
+ get firstWeek(): Week;
5
+ }
@@ -0,0 +1,13 @@
1
+ import { BusinessObject } from "./business-object";
2
+ export declare class TimeWindow extends BusinessObject {
3
+ id: string;
4
+ key: string;
5
+ dateTimeFrom: Date;
6
+ dateTimeTo: Date;
7
+ proposedPlanDateTimeFrom: Date;
8
+ proposedPlanDateTimeTo: Date;
9
+ proposedDriver: any;
10
+ impact: string;
11
+ followUpTimeSlots: TimeWindow[];
12
+ additionalProperties: any;
13
+ }
@@ -0,0 +1,4 @@
1
+ import { Weekday } from "./weekday.model";
2
+ export declare class Week {
3
+ weekDays: Weekday[];
4
+ }
@@ -0,0 +1,16 @@
1
+ import { AgendaEvent } from "./agenda-event.model";
2
+ export declare class Weekday {
3
+ inView: boolean;
4
+ weekdayDay: number;
5
+ weekdayMonthShort: string;
6
+ weekdayMonthLong: string;
7
+ weekdayYear: number;
8
+ date: Date;
9
+ weekdayShort: string;
10
+ weekdayLong: string;
11
+ description: string;
12
+ newMonth: boolean;
13
+ weekdaySelected: boolean;
14
+ datesByTheHour: Date[];
15
+ events: AgendaEvent[];
16
+ }
@@ -0,0 +1,4 @@
1
+ import { PipeTransform } from "@angular/core";
2
+ export declare class ArrayNumberPipe implements PipeTransform {
3
+ transform(length: number, offset?: number): number[];
4
+ }
@@ -0,0 +1 @@
1
+ export declare const MASTER_PIPES: any[];
@@ -0,0 +1,4 @@
1
+ import { PipeTransform } from "@angular/core";
2
+ export declare class UCfirstPipe implements PipeTransform {
3
+ transform(value: string): string;
4
+ }
@@ -18,6 +18,7 @@ import { ArticleTransaction } from "@colijnit/articleapi/build/model/article-tra
18
18
  import { ArticleTransaction as ArticleTransactionBo } from "@colijnit/articleapi/build/model/article-transaction.bo";
19
19
  import { OptionsService } from "./options.service";
20
20
  import { PrintPriceStickers } from "@colijnit/sharedapi/build/model/print-price-stickers.bo";
21
+ import { StockStickersEmailLayouts } from "@colijnit/sharedapi/build/model/report/stock-stickers-email-layouts.bo";
21
22
  export declare class SharedConnectorService {
22
23
  private _optionsService;
23
24
  articleConnector: Articles;
@@ -33,6 +34,9 @@ export declare class SharedConnectorService {
33
34
  getStockInformation(data: ArticleStock): Promise<ArticleStockBo[]>;
34
35
  getStockManagementWarehouses(): Promise<StockManagementWarehouses[]>;
35
36
  getStockManagementLocations(warehouseNo: number): Promise<StockLocation[]>;
37
+ getOrderConfirmationDefaultSendMethod(relationId: number): Promise<number>;
38
+ getDefaultEmailAddressListForOrderConfirmation(transactionUUID: string): Promise<string[]>;
39
+ getPurchaseOrderEmailLayouts(transactionUUID: string): Promise<StockStickersEmailLayouts[]>;
36
40
  getArticleDetails(data: ArticleStockManagement): Promise<ArticleDetailsBo[]>;
37
41
  updateArticleDetails(data: ArticleDetailsBo): Promise<boolean>;
38
42
  lockArticleDetails(data: ArticleStockManagement): Promise<boolean>;
@@ -15,11 +15,12 @@ import { ArticleTransaction } from "@colijnit/articleapi/build/model/article-tra
15
15
  import { ArticleTransaction as ArticleTransactionBo } from "@colijnit/articleapi/build/model/article-transaction.bo";
16
16
  import { PrintPriceStickers } from "@colijnit/sharedapi/build/model/print-price-stickers.bo";
17
17
  import { SharedConnectorService } from "./shared-connector.service";
18
+ import { StockStickersEmailLayouts } from "@colijnit/sharedapi/build/model/report/stock-stickers-email-layouts.bo";
19
+ import { SendMethodParams } from "../components/send-method-dialog/send-method-params.interface";
18
20
  export declare class StockService {
19
21
  private _sharedService;
20
22
  stockStickers: PrintStockStickers;
21
- printSticker: PrintStockStickers;
22
- printPriceSticker: PrintPriceStickers;
23
+ printLayoutParams: SendMethodParams;
23
24
  constructor(_sharedService: SharedConnectorService);
24
25
  getPrintStockStickers(data: PrintStockStickers): Promise<void>;
25
26
  getPrintPriceStickers(data: PrintPriceStickers): Promise<void>;
@@ -32,6 +33,9 @@ export declare class StockService {
32
33
  getStockStickerTemplates(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]>;
33
34
  getStockManagementWarehouses(): Promise<StockManagementWarehouses[]>;
34
35
  getStockManagementLocations(warehouseNo: number): Promise<StockLocation[]>;
36
+ getOrderConfirmationDefaultSendMethod(relationId: number): Promise<number>;
37
+ getDefaultEmailAddressListForOrderConfirmation(transactionUUID: string): Promise<string[]>;
38
+ getPurchaseOrderEmailLayouts(transactionUUID: string): Promise<StockStickersEmailLayouts[]>;
35
39
  getArticleTransaction(data: ArticleTransaction): Promise<ArticleTransactionBo[]>;
36
40
  lockArticleDetails(data: ArticleStockManagement): Promise<boolean>;
37
41
  commit(): Promise<DataServiceResponseData>;
@@ -7,3 +7,8 @@ $imported-modules: () !default;
7
7
  @content;
8
8
  }
9
9
  }
10
+
11
+ @mixin square($size) {
12
+ width: $size;
13
+ height: $size;
14
+ }
@@ -54,4 +54,10 @@ export declare class ArrayUtils {
54
54
  static RemoveElementsByFilter(array: any[], filterFunction: (item: any) => boolean): boolean;
55
55
  static MoveElement<T>(element: T, toIndex: number, array: T[]): boolean;
56
56
  static PlaceElementAfterOther(array: any[], elementToPlace: any, afterThisElement: any): void;
57
+ /**
58
+ * Returns max value from all resulting values from applying given itemValueFunction to all items of given array.
59
+ * @param array
60
+ * @param itemValueFunction The function applied to each array item that gives it a numerical value. The max num val found is returned.
61
+ */
62
+ static GetMaxCalculatedValue<T>(array: T[], itemValueFunction: (item: T) => number): number;
57
63
  }
@@ -0,0 +1,10 @@
1
+ import { LanguageCode } from "../enum/language-code.enum";
2
+ import { Week } from "../model/week.model";
3
+ export declare class CalendarUtils {
4
+ private readonly _locale;
5
+ static Locale: LanguageCode;
6
+ static Now: Date;
7
+ constructor(_locale: LanguageCode);
8
+ static GetDayHours(day: Date): Date[];
9
+ static GetDaysOfWeek(date: Date): Week;
10
+ }
@@ -0,0 +1,4 @@
1
+ export interface CheckPrecisionAndScaleResult {
2
+ isOk: boolean;
3
+ nearestOkNr?: number;
4
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Output object shape for NumberUtils.CheckWithinSteppedBounds(). For efficiency, this method also returns the found remainder if the given
3
+ * number was NOT within the specified stepped bounds.
4
+ */
5
+ export interface CheckWithinSteppedBoundsResult {
6
+ isOk: boolean;
7
+ remainder?: number;
8
+ }
@@ -0,0 +1,44 @@
1
+ import { Month } from "../enum/month.enum";
2
+ import { Moment } from "moment";
3
+ import { DatePipe } from "@angular/common";
4
+ import { DateRange } from "../model/date-range";
5
+ export declare class DateUtils {
6
+ static readonly BACKEND_DATE_FORMAT: string;
7
+ static datePipe: DatePipe;
8
+ static NowAsString(): string;
9
+ static ParseDate(date: Date, format?: string): string;
10
+ static GetWeekNumber(date: Date): number;
11
+ static GetDaysFromNow(date: Date): number;
12
+ static StringAsDate(str: string, format?: string): Date;
13
+ static MomentToDate(time: Moment): Date;
14
+ static GetCurrentMonth(): Month;
15
+ static Get12MonthsArrayWithFirstMonthIsCurrentMonth(): Month[];
16
+ static GetFirstDayOfWeek(date: Date): Date;
17
+ static GetLastDayOfWeek(date: Date): Date;
18
+ static GetFirstDayOfMonth(date: Date): Date;
19
+ static GetLastDayOfMonth(date: Date): Date;
20
+ static DatesEqual(date1: Date, date2: Date): boolean;
21
+ static DateRangeEqual(dates1: DateRange, dates2: DateRange): boolean;
22
+ static AddMinutes(date: Date, minutes: number): Date;
23
+ static AddDays(date: Date, days: number): Date;
24
+ static AddMonths(date: Date, months: number): Date;
25
+ static DetermineDSTBreakpoints(): {
26
+ start: string;
27
+ end: string;
28
+ };
29
+ private static _ValidDate;
30
+ /**
31
+ * Returns the difference between the two given days as the number of days, in float precision (date to - date from).
32
+ * Returns negative values of the 'from' date is later than in time than the 'to' date.
33
+ */
34
+ static GetDayDifference(from: Date, to: Date): number;
35
+ static IsSameDay(dateOne: Date, dateTwo: Date): boolean;
36
+ static IsInBetween(date: Date, startDate: Date, endDate: Date, withTime?: boolean): boolean;
37
+ static IsMonday(date: Date): boolean;
38
+ static IsSunday(date: Date): boolean;
39
+ static IsToday(date: Date): boolean;
40
+ static ParseDateInShortDateFormat(date: Date, locale: string): string;
41
+ static getFormattedDateRangeString(dateRangeString: string, separator?: string): string;
42
+ static SetDateOrDateRangeObjectHoursZero(date: Date | DateRange): void;
43
+ private static _DateToTimeStringWithDateFormat;
44
+ }
@@ -0,0 +1 @@
1
+ export declare function notNill(value: any): boolean;
@@ -0,0 +1,16 @@
1
+ export declare class MapUtils {
2
+ /**
3
+ * Returns the first key from given map, for which the value filter holds true. Basically a reverse Map.get(key) function.
4
+ * @param map
5
+ * @param valueFilter For the first value that returns true for this filter functions, its key will be returned.
6
+ */
7
+ static FindKeyByValue<K, V>(map: Map<K, V>, valueFilter: (value: V) => boolean): K;
8
+ /**
9
+ * Inserts given arrayEntry into given map, under given mapKey. What's special here, is that a NEW map entry is created with an array
10
+ * containing the single [arrayEntry] item, if no entry yet existed.
11
+ * @param map
12
+ * @param mapKey
13
+ * @param arrayEntry
14
+ */
15
+ static InsertArrayItemIntoMap(map: Map<any, any>, mapKey: any, arrayEntry: any): void;
16
+ }
@@ -0,0 +1,125 @@
1
+ import { CheckWithinSteppedBoundsResult } from "./check-within-stepped-bounds-result";
2
+ import { CheckPrecisionAndScaleResult } from "./check-precision-and-scale-result";
3
+ export declare class NumberUtils {
4
+ static ParseIntNumberInput(arg: any): number;
5
+ static ParseInt(arg: any): number;
6
+ static ParseFloatNumberInput(arg: any, decimalPrecision?: number): number;
7
+ static ParseFloatNumberInputKeepPrecision(arg: any): number;
8
+ /**
9
+ * Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
10
+ *
11
+ * @param {any} arg The argument to parse to a float
12
+ * @param {number} decimalPrecision The number of decimals, or the precision, the parsed return float should have
13
+ * @returns {number} NaN if not possible, else the parsed float value
14
+ */
15
+ static ParseFloat(arg: any, decimalPrecision?: number): number;
16
+ /**
17
+ * Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
18
+ *
19
+ * @param arg The argument to parse to a float
20
+ * @returns {number} The argument as a float with its original decimal precision intact
21
+ */
22
+ static ParseFloatKeepPrecision(arg: any): number;
23
+ /**
24
+ * Returns the given argument as a number. Returns given defaultValue if conversion of argument was impossible.
25
+ * @param arg
26
+ * @param {number} [defaultValue = 0]
27
+ * @returns {number}
28
+ */
29
+ static ParseNumberOrDefault(arg: any, defaultValue?: number): number;
30
+ static IsInteger(arg: any): boolean;
31
+ static GetDecimalPlaces(arg: any, maxAnswer?: number): number;
32
+ static ParseNumberInputOrDefault(numberInput: any, defaultValue?: number): number;
33
+ static IsNumber(arg: any): boolean;
34
+ /**
35
+ * Returns whether given arg is indeed not a number (it's NaN or it has another type than 'number')
36
+ * Our exact copy of AS Flex'es isNaN(arg) function. Always use this method for copying Flex isNaN(..) occurences into TypeScript.
37
+ * @param arg
38
+ * @returns {boolean}
39
+ * @constructor
40
+ */
41
+ static IsNaN(arg: any): boolean;
42
+ static NaN(number: any, substitute?: number): number;
43
+ static IsParsableNumber(arg: any): boolean;
44
+ static IsParsableNumberInput(numberInput: any): boolean;
45
+ /**
46
+ * Returns whether given arg is parseable as a number, and whether the lengts of its number parse result is equal to its original length.
47
+ * I.e. this function returns FALSE with given number-parsable strings, but that have non-numeric appendices, eg '2233ff'. That arg
48
+ * IS number-parseable, but not a strict 'string number', the latter being what this method actually checks for.
49
+ */
50
+ static IsStringNumber(arg: string): boolean;
51
+ static IsListOfNumbers(arg: string, separator?: string): boolean;
52
+ static ParseStringNumber(arg: string): number;
53
+ static ParseStringNumberDefault(arg: string | any, defaultValue?: number): number;
54
+ /**
55
+ * Returns a random integer in range [lowerBound .. upperBound], an inclusive range. Returns NaN if not possible.
56
+ * Given bounds are truncated first, before serving as the true lower- and upper bounds for the random int.
57
+ */
58
+ static RandomInt(lowerBoundInt: number, upperBoundInt: number): number;
59
+ static AddThousandsCommasTo(value: any): string;
60
+ /**
61
+ * Function used to check wether a given number is composed of another number, power-of-two wise.
62
+ * Example usage: NumberUtils.NumIsComposedOf(articleListObject.publication, ArticlePublication.Selector).
63
+ * This would return whether or not that articleListObject was publicated for selector or not, where articleListObject.publication
64
+ * was possibly a 'COMPOSITE that was made out of (including)' ArticlePublication.Selector.
65
+ */
66
+ static NumIsComposedOfOtherPowTwoNum(bigNrToCheck: number, powTwoNumItShouldBeComposedOf: number): boolean;
67
+ /**
68
+ * Returns given nr, or the given default number (default 0) if the nr number was undefined or otherwise not a number.
69
+ * Same as CoMath.NaN from AS code (used as its substitute in transaction logic)
70
+ * @param nr
71
+ * @param defaultNr
72
+ * @returns {number}
73
+ */
74
+ static NrOrDefault(nr: number, defaultNr?: number): number;
75
+ /**
76
+ * Returns whether given nrToCheck is within the given precision and scale limits. Precision and scale, here, are Oracle DB terms.
77
+ * This function can thus be used to check whether the given number is safe to send to the 'database' beforehand, if we know the
78
+ * precision and scale of the number in the db declaration.
79
+ *
80
+ * I.e. A number declared in the Oracle DB as number(5, 2) has a precision of 5 and a scale of 2.
81
+ *
82
+ * @param {number} nrToCheck
83
+ * @param {number} precision The number of significant digits, including possibly negative scale. E.g. 3 in '123' and 5 in '51.123'
84
+ * @param {number} [scale = 0] The number of significant digits AFTER the decimal point. E.g. 1 in 5432.1 and 3 in 54000.003
85
+ * @returns {CheckPrecisionAndScaleResult} Whether given nrToCheck is ok for given precision and scale, and if not, the
86
+ * nearest number that IS ok for those constraints.
87
+ */
88
+ static CheckPrecisionAndScale(nrToCheck: number, precision: number, scale?: number): CheckPrecisionAndScaleResult;
89
+ /**
90
+ * Returns whether given x is OK within the given min, max and step boundaries, where it should hold that nrToCheck = min + N * step,
91
+ * with N integer or 0.
92
+ * @param {number} nrToCheck Number to check whether it's within the given bounds
93
+ * @param min Inclusive
94
+ * @param max Inclusive
95
+ * @param stepSize
96
+ * @returns {CheckWithinSteppedBounds} Returns remainder of undefined when nrToCheck was OUTSIDE [min, max], else full result object.
97
+ */
98
+ static CheckWithinSteppedBounds(nrToCheck: number, min: number, max: number, stepSize?: number): CheckWithinSteppedBoundsResult;
99
+ /**
100
+ * Finds the number closest to the originalNumber, that adheres to the given bounds. That is, for which it holds that
101
+ * nr = min + N * step with N integer or 0.
102
+ * @param {number} originalNr Find closest answer to this number
103
+ * @param min Inclusive
104
+ * @param max Inclusive
105
+ * @param stepSize
106
+ * @returns {boolean} The closest OK number for bounds.
107
+ */
108
+ static GetNearestNumberWithinSteppedBounds(originalNr: number, min: number, max: number, stepSize?: number): number;
109
+ /**
110
+ * Returns the true maximum allowed value for the given "stepped bounds": min, stepSize and max, for which it holds that each allowed
111
+ * value Y = min + stepSize * N, for any INTEGER or 0 N where it also holds, of course, that Y <= max.
112
+ * @param min
113
+ * @param max
114
+ * @param stepSize
115
+ */
116
+ static GetTrueSteppedBoundsMax(min: number, max: number, stepSize?: number): number;
117
+ static GetNearestNumberWithinBounds(originalNr: number, min: number, max: number): number;
118
+ static ToString(nr: number): string;
119
+ static DecimalsToStepIncrement(numberOfDecimals: number): number;
120
+ static Round(value: number, decimals: number): number;
121
+ static PrecisionScaleToMaxValue(precision: number, scale: number): number;
122
+ static DifferenceBetweenNumbers(numberA: number, numberB: number): number;
123
+ private static _GetLargestDecimalPrecisionOf;
124
+ private static _NumberInputToNumberStr;
125
+ }
@@ -0,0 +1,40 @@
1
+ export declare class ObjectUtils {
2
+ /**
3
+ * Returns whether all given values exist: for all values it holds that they are not null nor undefined. Short-circuit check.
4
+ * @param {any} values Rest parameters with all objects to check existence for.
5
+ * @returns {boolean} True if ALL given values are not null nor undefined, otherwise false (if at least one value was null or undefined)
6
+ */
7
+ static AllExist(...values: any[]): boolean;
8
+ /**
9
+ * Copies all properties from object 'from' to object 'to'. Overwrites properties on object 'to' if property already exists.
10
+ * Does not copy functions, only properties.
11
+ * @param {Object} from The source object from which to copy all properties of to the 'to' object.
12
+ * @param {Object} to The object to which the properties of the 'from' object will be copied.
13
+ * @param {boolean} [allowUndefined = true] wether the 'to' object may be assigned null or undefined values to any of its properties.
14
+ */
15
+ static CopyPropertiesFrom<T>(from: Object, to: T, allowUndefined?: boolean): T;
16
+ static DeepEquals(actual: any, expected: any): boolean;
17
+ static ForOwnProperty(plainObject: any, callback: (propVal: any, key: string) => any): void;
18
+ static GetClassName(objectOrClass: any): string;
19
+ static GetShallowClone(originalObject: any, objectClass?: any): any;
20
+ static GetDeepClone(originalObject: any, circular?: boolean): any;
21
+ static IsEmpty(obj: any): boolean;
22
+ static IsPlainObject(object: any): boolean;
23
+ /**
24
+ * Returns an instance of given class with data of given dataObject. Only works if that class has a default constructor without args.
25
+ * Does not actually create a new object if it alread is an instance of that class.
26
+ * @param {any} clazz A class that has a default constructor
27
+ * @param {any} [dataObject] The object with data to copy to the new instance of the class
28
+ * @returns {any} An object that is an instance of given class, with given data applied to it.
29
+ */
30
+ static MakeInstanceOf(clazz: any, dataObject?: any): any;
31
+ static PickRandomPropertyValue(object: any): any;
32
+ static ValueOrDefault(value: any, defaultReturnVal?: any): any;
33
+ private static _isArguments;
34
+ private static _isArgumentsWhenArgsClassNotSupported;
35
+ private static _isArgumentsWhenArgsClassSupported;
36
+ private static _isBuffer;
37
+ private static _isUndefinedOrNull;
38
+ private static _objEquiv;
39
+ private static _supportsArgumentsClass;
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/sharedcomponents",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "@colijnit/sharedapi": "^1.0.1",
package/public-api.d.ts CHANGED
@@ -14,4 +14,6 @@ export * from './lib/components/linear-gauge/co-linear-gauge.component';
14
14
  export * from './lib/components/linear-gauge/co-linear-gauge.module';
15
15
  export * from './lib/components/statusbar/statusbar.component';
16
16
  export * from './lib/components/statusbar/statusbar.module';
17
+ export * from './lib/components/date-planning/date-planning.component';
18
+ export * from './lib/components/date-planning/date-planning.module';
17
19
  export * from './lib/service/shared.service';