@colijnit/sharedcomponents 1.0.25 → 1.0.27
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 +8 -11
- package/bundles/colijnit-sharedcomponents.umd.js +3704 -0
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -0
- package/colijnit-sharedcomponents.d.ts +16 -0
- package/colijnit-sharedcomponents.metadata.json +1 -0
- package/esm2015/colijnit-sharedcomponents.js +17 -0
- package/esm2015/lib/assets/dictionary/text.properties.js +11 -0
- package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +124 -0
- package/esm2015/lib/components/circular-gauge/co-circular-gauge.module.js +21 -0
- package/esm2015/lib/components/docsign/component/signature/signature.component.js +75 -0
- package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +44 -0
- package/esm2015/lib/components/docsign/docsign.component.js +225 -0
- package/esm2015/lib/components/docsign/docsign.module.js +23 -0
- package/esm2015/lib/components/key-pad/key-pad.component.js +191 -0
- package/esm2015/lib/components/key-pad/key-pad.module.js +21 -0
- package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +74 -0
- package/esm2015/lib/components/layout-switcher/layout-switcher.module.js +21 -0
- package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +55 -0
- package/esm2015/lib/components/linear-gauge/co-linear-gauge.module.js +19 -0
- package/esm2015/lib/components/send-method-dialog/enums/send-option.js +8 -0
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +309 -0
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +31 -0
- package/esm2015/lib/components/statusbar/statusbar.component.js +81 -0
- package/esm2015/lib/components/statusbar/statusbar.module.js +23 -0
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +54 -0
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +350 -0
- package/esm2015/lib/components/stock/stock-location/stock-location.component.js +62 -0
- package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +2 -0
- package/esm2015/lib/components/stock/stock-transfer/stock-change-amount.component.js +68 -0
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +130 -0
- package/esm2015/lib/components/stock/stock.component.js +140 -0
- package/esm2015/lib/components/stock/stock.module.js +48 -0
- package/esm2015/lib/enum/icon.enum.js +19 -0
- package/esm2015/lib/enum/keyboard-code.enum.js +32 -0
- package/esm2015/lib/enum/language-code.enum.js +8 -0
- package/esm2015/lib/factory/business-object-factory.js +120 -0
- package/esm2015/lib/factory/decorators/boolean.decorator.js +102 -0
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +55 -0
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +57 -0
- package/esm2015/lib/factory/decorators/date-field.decorator.js +36 -0
- package/esm2015/lib/factory/decorators/string-number.decorator.js +43 -0
- package/esm2015/lib/model/business-object.js +81 -0
- package/esm2015/lib/model/icon-svg.js +18 -0
- package/esm2015/lib/service/dictionary.service.js +76 -0
- package/esm2015/lib/service/icon-cache.service.js +51 -0
- package/esm2015/lib/service/options.service.js +71 -0
- package/esm2015/lib/service/shared-connector.service.js +278 -0
- package/esm2015/lib/service/shared.service.js +30 -0
- package/esm2015/lib/service/stock.service.js +95 -0
- package/esm2015/lib/utils/array-utils.js +183 -0
- package/esm2015/lib/utils/is-nill.function.js +5 -0
- package/esm2015/lib/utils/string-utils.js +64 -0
- package/esm2015/public-api.js +21 -0
- package/fesm2015/colijnit-sharedcomponents.js +3514 -0
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -0
- package/lib/assets/dictionary/text.properties.d.ts +3 -0
- package/lib/components/circular-gauge/co-circular-gauge.component.d.ts +20 -0
- package/lib/components/circular-gauge/co-circular-gauge.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_layout.scss +6 -3
- package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/material.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/material.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/material.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/material.scss +0 -0
- package/lib/components/docsign/component/signature/signature.component.d.ts +16 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/material.scss +0 -0
- package/lib/components/docsign/component/signatures/signatures.component.d.ts +12 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/material.scss +0 -0
- package/lib/components/docsign/docsign.component.d.ts +92 -0
- package/lib/components/docsign/docsign.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/material.scss +0 -0
- package/lib/components/key-pad/key-pad.component.d.ts +36 -0
- package/lib/components/key-pad/key-pad.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/material.scss +0 -0
- package/lib/components/layout-switcher/layout-switcher.component.d.ts +16 -0
- package/lib/components/layout-switcher/layout-switcher.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/material.scss +0 -0
- package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +16 -0
- package/lib/components/linear-gauge/co-linear-gauge.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/material.scss +0 -0
- package/lib/components/send-method-dialog/enums/send-option.d.ts +6 -0
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +62 -0
- package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/material.scss +0 -0
- package/lib/components/statusbar/statusbar.component.d.ts +22 -0
- package/lib/components/statusbar/statusbar.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/material.scss +0 -0
- package/lib/components/stock/stock-information/stock-information.component.d.ts +10 -0
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +60 -0
- package/lib/components/stock/stock-location/stock-location.component.d.ts +15 -0
- package/{projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts → lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts} +2 -2
- package/lib/components/stock/stock-transfer/stock-change-amount.component.d.ts +18 -0
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +36 -0
- package/lib/components/stock/stock.component.d.ts +42 -0
- package/lib/components/stock/stock.module.d.ts +2 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_layout.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_material-definition.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_theme.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/material.scss +0 -0
- package/{projects/sharedcomponents/src/lib/enum/icon.enum.ts → lib/enum/icon.enum.d.ts} +2 -3
- package/lib/enum/keyboard-code.enum.d.ts +30 -0
- package/lib/enum/language-code.enum.d.ts +6 -0
- package/lib/factory/business-object-factory.d.ts +23 -0
- package/lib/factory/decorators/boolean.decorator.d.ts +43 -0
- package/lib/factory/decorators/complex-array.decorator.d.ts +25 -0
- package/lib/factory/decorators/complex-field.decorator.d.ts +25 -0
- package/lib/factory/decorators/date-field.decorator.d.ts +17 -0
- package/lib/factory/decorators/string-number.decorator.d.ts +22 -0
- package/lib/model/business-object.d.ts +7 -0
- package/lib/model/icon-svg.d.ts +4 -0
- package/lib/service/dictionary.service.d.ts +21 -0
- package/lib/service/icon-cache.service.d.ts +18 -0
- package/lib/service/options.service.d.ts +13 -0
- package/lib/service/shared-connector.service.d.ts +43 -0
- package/lib/service/shared.service.d.ts +8 -0
- package/lib/service/stock.service.d.ts +38 -0
- package/{projects/sharedcomponents/src/lib → lib}/style/_mixin.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/style/_variables.scss +0 -0
- package/{projects/sharedcomponents/src/lib → lib}/style/sharedcomponents-globals.scss +0 -0
- package/lib/utils/array-utils.d.ts +57 -0
- package/lib/utils/is-nill.function.d.ts +1 -0
- package/lib/utils/string-utils.d.ts +22 -0
- package/package.json +26 -74
- package/{projects/sharedcomponents/src/public-api.ts → public-api.d.ts} +0 -5
- package/.browserslistrc +0 -16
- package/.editorconfig +0 -16
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/tasks.json +0 -42
- package/Sharedcomponents.iml +0 -11
- package/angular.json +0 -133
- package/karma.conf.js +0 -44
- package/move-assets.js +0 -14
- package/projects/sharedcomponents/.browserslistrc +0 -16
- package/projects/sharedcomponents/README.md +0 -24
- package/projects/sharedcomponents/karma.conf.js +0 -44
- package/projects/sharedcomponents/ng-package.json +0 -17
- package/projects/sharedcomponents/package.json +0 -18
- package/projects/sharedcomponents/src/lib/assets/dictionary/text.properties.ts +0 -8
- package/projects/sharedcomponents/src/lib/assets/icons/angle_left_solid.svg +0 -1
- package/projects/sharedcomponents/src/lib/assets/icons/angle_right_solid.svg +0 -1
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_fat_right.svg +0 -1
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_left.svg +0 -8
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_right.svg +0 -4
- package/projects/sharedcomponents/src/lib/assets/icons/bring_forward_regular.svg +0 -1
- package/projects/sharedcomponents/src/lib/assets/icons/check_round.svg +0 -1
- package/projects/sharedcomponents/src/lib/assets/icons/delete_left_regular.svg +0 -1
- package/projects/sharedcomponents/src/lib/assets/icons/delivery_truck.svg +0 -12
- package/projects/sharedcomponents/src/lib/assets/icons/email.svg +0 -5
- package/projects/sharedcomponents/src/lib/assets/icons/pdf.svg +0 -15
- package/projects/sharedcomponents/src/lib/assets/icons/print.svg +0 -10
- package/projects/sharedcomponents/src/lib/assets/icons/signature_field.svg +0 -9
- package/projects/sharedcomponents/src/lib/assets/icons/xml.svg +0 -9
- package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.component.ts +0 -139
- package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.module.ts +0 -19
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-base-view.component.ts +0 -68
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-day-view.component.ts +0 -31
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-event.component.ts +0 -67
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-events.component.ts +0 -48
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.ts +0 -81
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-header.component.ts +0 -265
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-cell.component.ts +0 -38
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.ts +0 -50
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view.component.ts +0 -46
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-month-view.component.ts +0 -65
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-view.component.ts +0 -38
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-select-view.component.ts +0 -63
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-view.component.ts +0 -46
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-months.component.ts +0 -37
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-years.component.ts +0 -52
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-header.component.ts +0 -124
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-view.component.ts +0 -201
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar.component.ts +0 -35
- package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.component.ts +0 -133
- package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.module.ts +0 -56
- package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +0 -82
- package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +0 -50
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +0 -252
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +0 -22
- package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.component.ts +0 -205
- package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.module.ts +0 -19
- package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.component.ts +0 -98
- package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.module.ts +0 -21
- package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.component.ts +0 -56
- package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.module.ts +0 -17
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/enums/send-option.ts +0 -6
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +0 -342
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +0 -33
- package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.component.ts +0 -97
- package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.module.ts +0 -21
- package/projects/sharedcomponents/src/lib/components/stock/stock-in-order/stock-in-order.component.ts +0 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +0 -64
- package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +0 -384
- package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +0 -84
- package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-change-amount.component.ts +0 -73
- package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +0 -153
- package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +0 -165
- package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +0 -51
- package/projects/sharedcomponents/src/lib/enum/calendar-view.enum.ts +0 -6
- package/projects/sharedcomponents/src/lib/enum/keyboard-code.enum.ts +0 -30
- package/projects/sharedcomponents/src/lib/enum/language-code.enum.ts +0 -6
- package/projects/sharedcomponents/src/lib/enum/month.enum.ts +0 -15
- package/projects/sharedcomponents/src/lib/enum/time-period.enum.ts +0 -9
- package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +0 -120
- package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +0 -113
- package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +0 -61
- package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +0 -63
- package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +0 -41
- package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +0 -48
- package/projects/sharedcomponents/src/lib/model/agenda-event-per-day.model.ts +0 -6
- package/projects/sharedcomponents/src/lib/model/agenda-event.model.ts +0 -17
- package/projects/sharedcomponents/src/lib/model/agenda-null-objects.ts +0 -11
- package/projects/sharedcomponents/src/lib/model/business-object.ts +0 -85
- package/projects/sharedcomponents/src/lib/model/constant/all-months.ts +0 -17
- package/projects/sharedcomponents/src/lib/model/date-range.ts +0 -10
- package/projects/sharedcomponents/src/lib/model/day.model.ts +0 -9
- package/projects/sharedcomponents/src/lib/model/icon-svg.ts +0 -18
- package/projects/sharedcomponents/src/lib/model/month.model.ts +0 -11
- package/projects/sharedcomponents/src/lib/model/time-window.bo.ts +0 -21
- package/projects/sharedcomponents/src/lib/model/week.model.ts +0 -5
- package/projects/sharedcomponents/src/lib/model/weekday.model.ts +0 -17
- package/projects/sharedcomponents/src/lib/pipe/array-number.pipe.ts +0 -14
- package/projects/sharedcomponents/src/lib/pipe/master-pipes.ts +0 -7
- package/projects/sharedcomponents/src/lib/pipe/ucfirst.pipe.ts +0 -14
- package/projects/sharedcomponents/src/lib/service/dictionary.service.ts +0 -86
- package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +0 -51
- package/projects/sharedcomponents/src/lib/service/options.service.ts +0 -66
- package/projects/sharedcomponents/src/lib/service/shared-connector.service.ts +0 -258
- package/projects/sharedcomponents/src/lib/service/shared-initializer.service.ts +0 -29
- package/projects/sharedcomponents/src/lib/service/shared.service.ts +0 -21
- package/projects/sharedcomponents/src/lib/service/stock.service.ts +0 -95
- package/projects/sharedcomponents/src/lib/utils/array-utils.ts +0 -202
- package/projects/sharedcomponents/src/lib/utils/calendar.utils.ts +0 -75
- package/projects/sharedcomponents/src/lib/utils/date-utils.ts +0 -302
- package/projects/sharedcomponents/src/lib/utils/function/not-nill.function.ts +0 -4
- package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +0 -4
- package/projects/sharedcomponents/src/lib/utils/string-utils.ts +0 -67
- package/projects/sharedcomponents/src/test.ts +0 -27
- package/projects/sharedcomponents/tsconfig.lib.json +0 -18
- package/projects/sharedcomponents/tsconfig.lib.prod.json +0 -10
- package/projects/sharedcomponents/tsconfig.spec.json +0 -17
- package/script/merge-icons.js +0 -39
- package/src/app/app.component.scss +0 -9
- package/src/app/app.component.spec.ts +0 -31
- package/src/app/app.component.ts +0 -156
- package/src/app/app.module.ts +0 -60
- package/src/assets/.gitkeep +0 -0
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -16
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -13
- package/src/main.ts +0 -12
- package/src/polyfills.ts +0 -53
- package/src/styles.scss +0 -40
- package/src/test.ts +0 -26
- package/tsconfig.app.json +0 -15
- package/tsconfig.json +0 -65
- package/tsconfig.spec.json +0 -18
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterContentChecked,
|
|
3
|
-
Component,
|
|
4
|
-
ElementRef,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Inject,
|
|
7
|
-
Input,
|
|
8
|
-
LOCALE_ID,
|
|
9
|
-
NgZone,
|
|
10
|
-
OnDestroy,
|
|
11
|
-
OnInit,
|
|
12
|
-
Output,
|
|
13
|
-
Renderer2, ViewEncapsulation
|
|
14
|
-
} from "@angular/core";
|
|
15
|
-
import {CalendarView} from "../../../../enum/calendar-view.enum";
|
|
16
|
-
import {LanguageCode} from "../../../../enum/language-code.enum";
|
|
17
|
-
import {Weekday} from "../../../../model/weekday.model";
|
|
18
|
-
import {Week} from "../../../../model/week.model";
|
|
19
|
-
import {CalendarUtils} from "../../../../utils/calendar.utils";
|
|
20
|
-
import {NULL_DAY} from "../../../../model/agenda-null-objects";
|
|
21
|
-
import {Day} from "../../../../model/day.model"
|
|
22
|
-
import {Icon} from "../../../../enum/icon.enum";
|
|
23
|
-
import {AgendaEventPerDay} from "../../../../model/agenda-event-per-day.model";
|
|
24
|
-
import {DateUtils} from "../../../../utils/date-utils";
|
|
25
|
-
import {IconCacheService} from "../../../../service/icon-cache.service";
|
|
26
|
-
|
|
27
|
-
@Component({
|
|
28
|
-
selector: "agenda-header",
|
|
29
|
-
template: `
|
|
30
|
-
<div class="agenda-header-wrapper" *ngIf="view === viewTypes.DayView">
|
|
31
|
-
<div class="hour-label-placeholder">
|
|
32
|
-
<view-select [selectedView]="view" (selectedViewChange)="changeTheView($event)"></view-select>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="week-day-label">
|
|
35
|
-
<co-icon class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
|
|
36
|
-
<div class="day-description" [textContent]="day.description"></div>
|
|
37
|
-
<co-icon class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="agenda-header-wrapper" *ngIf="view === viewTypes.WeekView">
|
|
41
|
-
<div class="hour-label-placeholder">
|
|
42
|
-
<view-select [selectedView]="view" (selectedViewChange)="changeTheView($event)"></view-select>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="week-day-label" *ngFor="let weekDay of weekDays; let index = index" [class.selected]="weekDay.weekdaySelected" (click)="setUnit(weekDay)">
|
|
45
|
-
<co-icon *ngIf="index === 0 && showBackButton" class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
|
|
46
|
-
<div *ngIf="weekDay.newMonth" [textContent]="weekDay.weekdayMonthLong + ' ' + weekDay.weekdayYear" class="month-description"></div>
|
|
47
|
-
<div class="weekday-value" [textContent]="weekDay.weekdayDay"></div>
|
|
48
|
-
<div class="weekday-description" [textContent]="weekDay.weekdayShort"></div>
|
|
49
|
-
<co-icon *ngIf="index === 6" class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="agenda-header-wrapper" *ngIf="view === viewTypes.WeekSelectView">
|
|
53
|
-
<div class="week-day-label" *ngFor="let weekDay of weekDays; let index = index"
|
|
54
|
-
[class.selected]="weekDay.weekdaySelected"
|
|
55
|
-
[class.selectable]="weekDay.events && weekDay.events.length > 0"
|
|
56
|
-
(click)="setUnit(weekDay)">
|
|
57
|
-
<co-icon *ngIf="index === 0 && showBackButton" class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
|
|
58
|
-
<div class="weekday-description" [textContent]="weekDay.weekdayShort"></div>
|
|
59
|
-
<div class="weekday-value" [textContent]="weekDay.weekdayDay + ' ' + weekDay.weekdayMonthShort"></div>
|
|
60
|
-
<co-icon *ngIf="index === 6" class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="agenda-header-wrapper" *ngIf="view === viewTypes.MonthView">
|
|
64
|
-
<div class="hour-label-placeholder">
|
|
65
|
-
<view-select [selectedView]="view" (selectedViewChange)="changeTheView($event)"></view-select>
|
|
66
|
-
</div>
|
|
67
|
-
<div class="week-day-label" *ngFor="let weekDay of weekDays; let index = index">
|
|
68
|
-
<co-icon *ngIf="index === 0 && showBackButton" class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
|
|
69
|
-
<div class="weekday-description" [textContent]="weekDay.weekdayShort"></div>
|
|
70
|
-
<co-icon *ngIf="index === 6" class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
`,
|
|
74
|
-
encapsulation: ViewEncapsulation.None
|
|
75
|
-
})
|
|
76
|
-
export class AgendaHeaderComponent implements OnInit, OnDestroy, AfterContentChecked {
|
|
77
|
-
public readonly icons: typeof Icon = Icon;
|
|
78
|
-
public readonly viewTypes: typeof CalendarView = CalendarView;
|
|
79
|
-
|
|
80
|
-
private readonly scrollbarWidth: number = 15;
|
|
81
|
-
|
|
82
|
-
@Input()
|
|
83
|
-
public set selectedDate(value: Date) {
|
|
84
|
-
this._selectedDate = new Date(value);
|
|
85
|
-
this._prepareHeaderData();
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
public get selectedDate(): Date {
|
|
89
|
-
return this._selectedDate;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@Input()
|
|
93
|
-
public view: CalendarView = CalendarView.WeekSelectView;
|
|
94
|
-
|
|
95
|
-
@Input()
|
|
96
|
-
public set firstAvailableDate(value: Date) {
|
|
97
|
-
if (value) {
|
|
98
|
-
this._firstAvailableDate = new Date(value);
|
|
99
|
-
this._prepareHeaderData();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
public get firstAvailableDate(): Date {
|
|
104
|
-
return this._firstAvailableDate;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@Input()
|
|
108
|
-
public set eventsPerDay(value: AgendaEventPerDay[]) {
|
|
109
|
-
this._eventsPerDay = value;
|
|
110
|
-
this._prepareHeaderData();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@Output()
|
|
114
|
-
public viewChange: EventEmitter<CalendarView> = new EventEmitter<CalendarView>();
|
|
115
|
-
|
|
116
|
-
@Output()
|
|
117
|
-
public selectedDateChange: EventEmitter<Date> = new EventEmitter<Date>();
|
|
118
|
-
|
|
119
|
-
@Output()
|
|
120
|
-
public rangeChange: EventEmitter<Date> = new EventEmitter<Date>();
|
|
121
|
-
|
|
122
|
-
public weekDays: Weekday[] = [];
|
|
123
|
-
public day: Day = NULL_DAY;
|
|
124
|
-
public showBackButton: boolean = true;
|
|
125
|
-
|
|
126
|
-
private _selectedDate: Date;
|
|
127
|
-
private _firstAvailableDate: Date;
|
|
128
|
-
private _eventsPerDay: AgendaEventPerDay[] = [];
|
|
129
|
-
|
|
130
|
-
constructor(
|
|
131
|
-
@Inject(LOCALE_ID) private readonly _locale: LanguageCode,
|
|
132
|
-
private _elementRef: ElementRef,
|
|
133
|
-
private _renderer: Renderer2,
|
|
134
|
-
private _ngZone: NgZone,
|
|
135
|
-
public iconCacheService: IconCacheService
|
|
136
|
-
) {
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
ngOnDestroy(): void {
|
|
140
|
-
window.removeEventListener("resize", this._onResize);
|
|
141
|
-
this._elementRef = undefined;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
ngOnInit(): void {
|
|
145
|
-
this._ngZone.runOutsideAngular(() => {
|
|
146
|
-
window.addEventListener("resize", this._onResize);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
ngAfterContentChecked(): void {
|
|
151
|
-
this._resizeHost();
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
public subUnit(): void {
|
|
155
|
-
if (this.selectedDate) {
|
|
156
|
-
const newDate: Date = new Date(this.selectedDate);
|
|
157
|
-
switch (this.view) {
|
|
158
|
-
case CalendarView.DayView:
|
|
159
|
-
newDate.setDate(this.selectedDate.getDate() - 1);
|
|
160
|
-
break;
|
|
161
|
-
case CalendarView.WeekView:
|
|
162
|
-
newDate.setDate(this.selectedDate.getDate() - 7);
|
|
163
|
-
break;
|
|
164
|
-
case CalendarView.WeekSelectView:
|
|
165
|
-
newDate.setDate(this.selectedDate.getDate() - 7);
|
|
166
|
-
break;
|
|
167
|
-
case CalendarView.MonthView:
|
|
168
|
-
newDate.setMonth(this.selectedDate.getMonth() - 1);
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
this.selectedDate = newDate;
|
|
172
|
-
this.rangeChange.emit(this.selectedDate);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
public addUnit(): void {
|
|
177
|
-
if (this.selectedDate) {
|
|
178
|
-
const newDate: Date = new Date(this.selectedDate);
|
|
179
|
-
switch (this.view) {
|
|
180
|
-
case CalendarView.DayView:
|
|
181
|
-
newDate.setDate(this.selectedDate.getDate() + 1);
|
|
182
|
-
break;
|
|
183
|
-
case CalendarView.WeekView:
|
|
184
|
-
newDate.setDate(this.selectedDate.getDate() + 7);
|
|
185
|
-
break;
|
|
186
|
-
case CalendarView.WeekSelectView:
|
|
187
|
-
newDate.setDate(this.selectedDate.getDate() + 7);
|
|
188
|
-
break;
|
|
189
|
-
case CalendarView.MonthView:
|
|
190
|
-
newDate.setMonth(this.selectedDate.getMonth() + 1);
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
this.selectedDate = newDate;
|
|
194
|
-
this.rangeChange.emit(this.selectedDate);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
public setUnit(weekDay: Weekday): void {
|
|
199
|
-
this.selectedDate = weekDay.date;
|
|
200
|
-
this.selectedDateChange.emit(this.selectedDate);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
public changeTheView(view: CalendarView): void {
|
|
204
|
-
this.view = view;
|
|
205
|
-
this.viewChange.emit(view);
|
|
206
|
-
this._prepareHeaderData();
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
private _onResize: EventListener = async (): Promise<void> => {
|
|
210
|
-
this._resizeHost();
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Need to resize the host component to size it's fixed positioned child through css
|
|
215
|
-
*/
|
|
216
|
-
private _resizeHost(): void {
|
|
217
|
-
if (this._elementRef) {
|
|
218
|
-
this._renderer.setStyle(
|
|
219
|
-
this._elementRef.nativeElement, "width", this._elementRef.nativeElement.parentElement.clientWidth - this.scrollbarWidth + "px");
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
private _prepareHeaderData(): void {
|
|
224
|
-
if (this.selectedDate) {
|
|
225
|
-
switch (this.view) {
|
|
226
|
-
case CalendarView.DayView:
|
|
227
|
-
const day: Day = new Day();
|
|
228
|
-
day.date = new Date(this.selectedDate);
|
|
229
|
-
const options: any = { year: "numeric", month: "long", day: "numeric" };
|
|
230
|
-
day.description = this.selectedDate.toLocaleDateString(this._locale, options);
|
|
231
|
-
this.day = day;
|
|
232
|
-
break;
|
|
233
|
-
case CalendarView.WeekView:
|
|
234
|
-
const weekView: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
|
|
235
|
-
this.weekDays = weekView.weekDays;
|
|
236
|
-
if (this.firstAvailableDate) {
|
|
237
|
-
this.showBackButton = this.weekDays.find(wd => DateUtils.DatesEqual(this.firstAvailableDate, wd.date)) === undefined;
|
|
238
|
-
}
|
|
239
|
-
break;
|
|
240
|
-
case CalendarView.WeekSelectView:
|
|
241
|
-
const weekSelectView: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
|
|
242
|
-
this.weekDays = weekSelectView.weekDays;
|
|
243
|
-
this.weekDays.forEach((wd: Weekday) => {
|
|
244
|
-
const evPerDay: AgendaEventPerDay = this._eventsPerDay && this._eventsPerDay.length > 0 ? this._eventsPerDay.find(e => DateUtils.DatesEqual(e.date, wd.date)) : null;
|
|
245
|
-
if (evPerDay) {
|
|
246
|
-
wd.events = evPerDay.events;
|
|
247
|
-
} else {
|
|
248
|
-
wd.weekdaySelected = false;
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
if (this.firstAvailableDate) {
|
|
252
|
-
this.showBackButton = this.weekDays.find(wd => DateUtils.DatesEqual(this.firstAvailableDate, wd.date)) === undefined;
|
|
253
|
-
}
|
|
254
|
-
break;
|
|
255
|
-
case CalendarView.MonthView:
|
|
256
|
-
const weekOfMonth: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
|
|
257
|
-
this.weekDays = weekOfMonth.weekDays;
|
|
258
|
-
if (this.firstAvailableDate) {
|
|
259
|
-
this.showBackButton = this.weekDays.find(wd => DateUtils.DatesEqual(this.firstAvailableDate, wd.date)) === undefined;
|
|
260
|
-
}
|
|
261
|
-
break;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {Component, Input, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: "agenda-hour-cell",
|
|
5
|
-
template: `
|
|
6
|
-
<div class="row-per-half-hour">
|
|
7
|
-
<agenda-half-hour-cell [date]="date" [showLabel]="onlyLabels && !noLabels"></agenda-half-hour-cell>
|
|
8
|
-
<agenda-half-hour-cell [date]="datePlushalfHour"></agenda-half-hour-cell>
|
|
9
|
-
</div>
|
|
10
|
-
`,
|
|
11
|
-
encapsulation: ViewEncapsulation.None
|
|
12
|
-
})
|
|
13
|
-
export class AgendaHourCellComponent {
|
|
14
|
-
@Input()
|
|
15
|
-
public onlyLabels: boolean = false;
|
|
16
|
-
|
|
17
|
-
@Input()
|
|
18
|
-
public noLabels: boolean = false;
|
|
19
|
-
|
|
20
|
-
@Input()
|
|
21
|
-
public set date(value: Date) {
|
|
22
|
-
this._date = value;
|
|
23
|
-
this._setNextHalfHour();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public get date(): Date {
|
|
27
|
-
return this._date;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public datePlushalfHour: Date;
|
|
31
|
-
|
|
32
|
-
private _date: Date;
|
|
33
|
-
|
|
34
|
-
private _setNextHalfHour(): void {
|
|
35
|
-
this.datePlushalfHour = new Date(this._date);
|
|
36
|
-
this.datePlushalfHour.setMinutes(this.datePlushalfHour.getMinutes() + 30);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {Component, Input, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: "agenda-hour-view-labels",
|
|
5
|
-
template: `
|
|
6
|
-
<div class="row-per-hour" *ngFor="let dateByTheHour of datesByTheHour">
|
|
7
|
-
<div>
|
|
8
|
-
<agenda-hour-cell [date]="dateByTheHour" onlyLabels [noLabels]="noLabels"></agenda-hour-cell>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
`,
|
|
12
|
-
encapsulation: ViewEncapsulation.None
|
|
13
|
-
})
|
|
14
|
-
export class AgendaHourViewLabelsComponent {
|
|
15
|
-
|
|
16
|
-
@Input()
|
|
17
|
-
public set date(value: Date) {
|
|
18
|
-
this._date = new Date(value);
|
|
19
|
-
this._date.setDate(1);
|
|
20
|
-
this._date.setMonth(1);
|
|
21
|
-
this._date.setFullYear(1);
|
|
22
|
-
this._prepareViewData();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@Input()
|
|
26
|
-
public noLabels: boolean = false;
|
|
27
|
-
|
|
28
|
-
public readonly datesByTheHour: Date[] = [];
|
|
29
|
-
|
|
30
|
-
public get date(): Date {
|
|
31
|
-
return this._date;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private _date: Date = new Date();
|
|
35
|
-
|
|
36
|
-
// fixme remove ctrl + c, ctrl + v code duplication with AgendaHourViewComponent._prepareViewData()
|
|
37
|
-
private _prepareViewData(): void {
|
|
38
|
-
this.datesByTheHour.length = 0;
|
|
39
|
-
if (this.date) {
|
|
40
|
-
let newDate: Date = new Date(this.date);
|
|
41
|
-
newDate.setHours(0, 0, 0, 0);
|
|
42
|
-
this.datesByTheHour.push(newDate);
|
|
43
|
-
for (let i: number = 0; i < 23; i++) {
|
|
44
|
-
newDate = new Date(newDate);
|
|
45
|
-
newDate.setHours(newDate.getHours() + 1);
|
|
46
|
-
this.datesByTheHour.push(newDate);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {Component, Input, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: "agenda-hour-view",
|
|
5
|
-
template: `
|
|
6
|
-
<div class="row-per-hour" *ngFor="let dateByTheHour of datesByTheHour">
|
|
7
|
-
<div fxLayout="row">
|
|
8
|
-
<agenda-hour-cell [date]="dateByTheHour"></agenda-hour-cell>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
<ng-content></ng-content>
|
|
12
|
-
`,
|
|
13
|
-
encapsulation: ViewEncapsulation.None
|
|
14
|
-
})
|
|
15
|
-
export class AgendaHourViewComponent {
|
|
16
|
-
|
|
17
|
-
@Input()
|
|
18
|
-
public set date(value: Date) {
|
|
19
|
-
this._date = new Date(value);
|
|
20
|
-
this._prepareViewData();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
public readonly datesByTheHour: Date[] = [];
|
|
24
|
-
|
|
25
|
-
public get date(): Date {
|
|
26
|
-
return this._date;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private _date: Date = new Date();
|
|
30
|
-
|
|
31
|
-
// fixme remove ctrl + c, ctrl + v code duplication with AgendaHourViewLabelsComponent._prepareViewData()
|
|
32
|
-
private _prepareViewData(): void {
|
|
33
|
-
this.datesByTheHour.length = 0;
|
|
34
|
-
if (this.date) {
|
|
35
|
-
let newDate: Date = new Date(this.date);
|
|
36
|
-
newDate.setHours(0, 0, 0, 0);
|
|
37
|
-
this.datesByTheHour.push(newDate);
|
|
38
|
-
for (let i: number = 0; i < 23; i++) {
|
|
39
|
-
newDate = new Date(newDate);
|
|
40
|
-
newDate.setHours(newDate.getHours() + 1);
|
|
41
|
-
this.datesByTheHour.push(newDate);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import {Component, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
import { AgendaBaseViewComponent } from "./agenda-base-view.component";
|
|
3
|
-
import {NULL_MONTH} from "../../../../model/agenda-null-objects";
|
|
4
|
-
import {Month} from "../../../../model/month.model";
|
|
5
|
-
import {Weekday} from "../../../../model/weekday.model";
|
|
6
|
-
import {Week} from "../../../../model/week.model";
|
|
7
|
-
import {DateUtils} from "../../../../utils/date-utils";
|
|
8
|
-
import {CalendarUtils} from "../../../../utils/calendar.utils";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "agenda-month-view",
|
|
13
|
-
template: `
|
|
14
|
-
<div class="view-wrapper">
|
|
15
|
-
<div class="hour-view-labels-wrapper"></div>
|
|
16
|
-
<div class="weeks">
|
|
17
|
-
<div class="week" *ngFor="let week of weeks" fxLayout="row">
|
|
18
|
-
<div class="week-day" *ngFor="let weekDay of week.weekDays" [class.not-in-month]="!weekDay.inView">
|
|
19
|
-
<div class="day" [textContent]="weekDay.weekdayDay"></div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
`,
|
|
25
|
-
encapsulation: ViewEncapsulation.None
|
|
26
|
-
})
|
|
27
|
-
export class AgendaMonthViewComponent extends AgendaBaseViewComponent {
|
|
28
|
-
|
|
29
|
-
public month: Month = NULL_MONTH;
|
|
30
|
-
|
|
31
|
-
public firstWeekDays: Weekday[] = [];
|
|
32
|
-
|
|
33
|
-
public weeks: Week[] = [];
|
|
34
|
-
|
|
35
|
-
protected prepareViewData(): void {
|
|
36
|
-
const month: Month = new Month();
|
|
37
|
-
if (this.selectedDate) {
|
|
38
|
-
const day: Date = DateUtils.GetFirstDayOfMonth(this.selectedDate);
|
|
39
|
-
const endOfMonth: Date = DateUtils.GetLastDayOfMonth(this.selectedDate);
|
|
40
|
-
let oneMoreIteration: boolean = false;
|
|
41
|
-
let continueLoop: boolean = true;
|
|
42
|
-
|
|
43
|
-
while (continueLoop) {
|
|
44
|
-
if (oneMoreIteration) {
|
|
45
|
-
continueLoop = false;
|
|
46
|
-
}
|
|
47
|
-
const week: Week = CalendarUtils.GetDaysOfWeek(day);
|
|
48
|
-
const len: number = week.weekDays.length;
|
|
49
|
-
for (let i: number = 0; i < len; i++) {
|
|
50
|
-
week.weekDays[i].events = this.getEventsFromDate(week.weekDays[i].date);
|
|
51
|
-
week.weekDays[i].inView = week.weekDays[i].date.getMonth() === this.selectedDate.getMonth();
|
|
52
|
-
}
|
|
53
|
-
month.weeks.push(week);
|
|
54
|
-
day.setDate(day.getDate() + 7);
|
|
55
|
-
if (day.getTime() >= endOfMonth.getTime()) {
|
|
56
|
-
oneMoreIteration = true;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
this.month = month;
|
|
60
|
-
this.firstWeekDays = this.month.firstWeek.weekDays;
|
|
61
|
-
this.weeks = month.weeks;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, Input, Output, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
import {CalendarView} from "../../../../enum/calendar-view.enum";
|
|
3
|
-
import {AgendaEvent} from "../../../../model/agenda-event.model";
|
|
4
|
-
import {AgendaEventPerDay} from "../../../../model/agenda-event-per-day.model";
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: "agenda-view",
|
|
8
|
-
template: `
|
|
9
|
-
<div class="view-wrapper mini-scrollbar" [ngSwitch]="view">
|
|
10
|
-
<agenda-day-view *ngSwitchCase="viewTypes.DayView"
|
|
11
|
-
[selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-day-view>
|
|
12
|
-
<agenda-week-view *ngSwitchCase="viewTypes.WeekView"
|
|
13
|
-
[view]="view" [selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-week-view>
|
|
14
|
-
<agenda-week-select-view *ngSwitchCase="viewTypes.WeekSelectView"
|
|
15
|
-
[view]="view" [selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-week-select-view>
|
|
16
|
-
<agenda-month-view *ngSwitchCase="viewTypes.MonthView"
|
|
17
|
-
[selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-month-view>
|
|
18
|
-
</div>
|
|
19
|
-
`,
|
|
20
|
-
encapsulation: ViewEncapsulation.None
|
|
21
|
-
})
|
|
22
|
-
export class AgendaViewComponent {
|
|
23
|
-
|
|
24
|
-
@Input()
|
|
25
|
-
public view: CalendarView = CalendarView.WeekView;
|
|
26
|
-
|
|
27
|
-
@Input()
|
|
28
|
-
public selectedDate: Date;
|
|
29
|
-
|
|
30
|
-
@Input()
|
|
31
|
-
public eventsPerDay: AgendaEventPerDay[] = [];
|
|
32
|
-
|
|
33
|
-
@Output()
|
|
34
|
-
public readonly eventChecked: EventEmitter<AgendaEvent> = new EventEmitter<AgendaEvent>();
|
|
35
|
-
|
|
36
|
-
public readonly viewTypes: typeof CalendarView = CalendarView;
|
|
37
|
-
|
|
38
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {Component, Input, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
import {AgendaBaseViewComponent} from "./agenda-base-view.component";
|
|
3
|
-
import {NULL_WEEK} from "../../../../model/agenda-null-objects";
|
|
4
|
-
import {CalendarUtils} from "../../../../utils/calendar.utils";
|
|
5
|
-
import {Icon} from "../../../../enum/icon.enum";
|
|
6
|
-
import {CalendarView} from "../../../../enum/calendar-view.enum";
|
|
7
|
-
import {Week} from "../../../../model/week.model";
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: "agenda-week-select-view",
|
|
11
|
-
template: `
|
|
12
|
-
<div class="view-wrapper week-select-view">
|
|
13
|
-
<div class="week-day" *ngFor="let weekDay of week.weekDays">
|
|
14
|
-
<div class="week-select-container" *ngIf="weekDay.weekdaySelected">
|
|
15
|
-
<div class="week-select-left">
|
|
16
|
-
<h3 [textContent]="'AGENDA_CHOOSE_DELIVERY_PERIOD'"></h3>
|
|
17
|
-
<div class="week-select-list mini-scrollbar">
|
|
18
|
-
<agenda-events
|
|
19
|
-
[halfHourHeight]="40"
|
|
20
|
-
[events]="weekDay.events"
|
|
21
|
-
(eventChecked)="eventChecked.emit($event)"
|
|
22
|
-
[view]="view"
|
|
23
|
-
></agenda-events>
|
|
24
|
-
<div class="no-events-banner" *ngIf="weekDay.events.length === 0">
|
|
25
|
-
<p [textContent]="'AGENDA_NO_PERIODS_AVAILABLE'"></p>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="week-select-right">
|
|
30
|
-
<h3 [textContent]="'AGENDA_FOR_EVERY_PERIOD'"></h3>
|
|
31
|
-
<ul>
|
|
32
|
-
<li><co-icon [iconData]="iconCacheService.getIcon(icons.CheckRound)" class="small action-color moment-icon"></co-icon><span [textContent]="'AGENDA_FOR_EVERY_PERIOD_REASON1'"></span></li>
|
|
33
|
-
<li><co-icon [iconData]="iconCacheService.getIcon(icons.CheckRound)" class="small action-color moment-icon"></co-icon><span [textContent]="'AGENDA_FOR_EVERY_PERIOD_REASON2'"></span></li>
|
|
34
|
-
</ul>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
`,
|
|
40
|
-
encapsulation: ViewEncapsulation.None
|
|
41
|
-
})
|
|
42
|
-
export class AgendaWeekSelectViewComponent extends AgendaBaseViewComponent {
|
|
43
|
-
|
|
44
|
-
@Input()
|
|
45
|
-
public view: CalendarView = CalendarView.WeekSelectView;
|
|
46
|
-
|
|
47
|
-
public week: Week = NULL_WEEK;
|
|
48
|
-
|
|
49
|
-
public readonly icons: typeof Icon = Icon;
|
|
50
|
-
|
|
51
|
-
protected prepareViewData(): void {
|
|
52
|
-
if (this.selectedDate) {
|
|
53
|
-
// get the events
|
|
54
|
-
const week: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
|
|
55
|
-
const len: number = week.weekDays.length;
|
|
56
|
-
for (let i: number = 0; i < len; i++) {
|
|
57
|
-
week.weekDays[i].events = this.getEventsFromDate(week.weekDays[i].date);
|
|
58
|
-
}
|
|
59
|
-
this.week = week;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {Component, Input, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
import {NULL_WEEK} from "../../../../model/agenda-null-objects";
|
|
3
|
-
import {CalendarUtils} from "../../../../utils/calendar.utils";
|
|
4
|
-
import {CalendarView} from "../../../../enum/calendar-view.enum";
|
|
5
|
-
import {Week} from "../../../../model/week.model";
|
|
6
|
-
import {AgendaBaseViewComponent} from "./agenda-base-view.component";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: "agenda-week-view",
|
|
11
|
-
template: `
|
|
12
|
-
<div class="view-wrapper">
|
|
13
|
-
<agenda-hour-view-labels [date]="selectedDate"></agenda-hour-view-labels>
|
|
14
|
-
<div class="week-day" *ngFor="let weekDay of week.weekDays">
|
|
15
|
-
<agenda-hour-view [date]="weekDay.date">
|
|
16
|
-
<agenda-events
|
|
17
|
-
[halfHourHeight]="40"
|
|
18
|
-
[events]="weekDay.events"
|
|
19
|
-
(eventChecked)="eventChecked.emit($event)"
|
|
20
|
-
[view]="view"
|
|
21
|
-
></agenda-events>
|
|
22
|
-
</agenda-hour-view>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
`,
|
|
26
|
-
encapsulation: ViewEncapsulation.None
|
|
27
|
-
})
|
|
28
|
-
export class AgendaWeekViewComponent extends AgendaBaseViewComponent /*implements OnInit, OnDestroy*/ {
|
|
29
|
-
|
|
30
|
-
@Input()
|
|
31
|
-
public view: CalendarView = CalendarView.WeekView;
|
|
32
|
-
|
|
33
|
-
public week: Week = NULL_WEEK;
|
|
34
|
-
|
|
35
|
-
protected prepareViewData(): void {
|
|
36
|
-
if (this.selectedDate) {
|
|
37
|
-
// get the events
|
|
38
|
-
const week: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
|
|
39
|
-
const len: number = week.weekDays.length;
|
|
40
|
-
for (let i: number = 0; i < len; i++) {
|
|
41
|
-
week.weekDays[i].events = this.getEventsFromDate(week.weekDays[i].date);
|
|
42
|
-
}
|
|
43
|
-
this.week = week;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
import {ALL_MONTHS} from "../../../../model/constant/all-months";
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: "calendar-all-months",
|
|
6
|
-
template: `
|
|
7
|
-
<div *ngFor="let currentMonth of months; let index = index"
|
|
8
|
-
[class.selected-month]="month === index"
|
|
9
|
-
[textContent]="currentMonth"
|
|
10
|
-
class="pointer-hover"
|
|
11
|
-
(click)="month = index; monthChange.emit(month)"
|
|
12
|
-
></div>
|
|
13
|
-
`,
|
|
14
|
-
encapsulation: ViewEncapsulation.None
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
export class CalendarAllMonthsComponent implements OnInit {
|
|
18
|
-
|
|
19
|
-
@Input()
|
|
20
|
-
public month: number;
|
|
21
|
-
|
|
22
|
-
@Input()
|
|
23
|
-
public shortDescriptions: boolean = false;
|
|
24
|
-
|
|
25
|
-
@Output()
|
|
26
|
-
public monthChange: EventEmitter<number> = new EventEmitter<number>();
|
|
27
|
-
|
|
28
|
-
public months: string[] = [];
|
|
29
|
-
|
|
30
|
-
constructor() {
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ngOnInit(): void {
|
|
34
|
-
this.months.length = 0;
|
|
35
|
-
this.months = ALL_MONTHS;
|
|
36
|
-
}
|
|
37
|
-
}
|