@colijnit/sharedcomponents 1.0.23 → 1.0.25
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/.browserslistrc +16 -0
- package/.editorconfig +16 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +11 -8
- package/Sharedcomponents.iml +11 -0
- package/angular.json +133 -0
- package/karma.conf.js +44 -0
- package/move-assets.js +14 -0
- package/package.json +74 -26
- package/projects/sharedcomponents/.browserslistrc +16 -0
- package/projects/sharedcomponents/README.md +24 -0
- package/projects/sharedcomponents/karma.conf.js +44 -0
- package/projects/sharedcomponents/ng-package.json +17 -0
- package/projects/sharedcomponents/package.json +18 -0
- package/projects/sharedcomponents/src/lib/assets/dictionary/text.properties.ts +8 -0
- package/projects/sharedcomponents/src/lib/assets/icons/angle_left_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/angle_right_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_fat_right.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_left.svg +8 -0
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_right.svg +4 -0
- package/projects/sharedcomponents/src/lib/assets/icons/bring_forward_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/check_round.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/delete_left_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/delivery_truck.svg +12 -0
- package/projects/sharedcomponents/src/lib/assets/icons/email.svg +5 -0
- package/projects/sharedcomponents/src/lib/assets/icons/pdf.svg +15 -0
- package/projects/sharedcomponents/src/lib/assets/icons/print.svg +10 -0
- package/projects/sharedcomponents/src/lib/assets/icons/signature_field.svg +9 -0
- package/projects/sharedcomponents/src/lib/assets/icons/xml.svg +9 -0
- package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.component.ts +139 -0
- package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.module.ts +19 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-base-view.component.ts +68 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-day-view.component.ts +31 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-event.component.ts +67 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-events.component.ts +48 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.ts +81 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-header.component.ts +265 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-cell.component.ts +38 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.ts +50 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view.component.ts +46 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-month-view.component.ts +65 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-view.component.ts +38 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-select-view.component.ts +63 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-view.component.ts +46 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/style/_layout.scss +443 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/style/_material-definition.scss +11 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/style/_theme.scss +7 -0
- package/{lib/components/layout-switcher → projects/sharedcomponents/src/lib/components/date-planning/component/agenda}/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-months.component.ts +37 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-years.component.ts +52 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-header.component.ts +124 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-view.component.ts +201 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar.component.ts +35 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/style/_layout.scss +167 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/style/_material-definition.scss +7 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/style/_theme.scss +7 -0
- package/{lib/components/linear-gauge → projects/sharedcomponents/src/lib/components/date-planning/component/calendar}/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.component.ts +133 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.module.ts +56 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/style/_layout.scss +47 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/style/_material-definition.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/style/_theme.scss +7 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/style/material.scss +5 -0
- package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +82 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +50 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +252 -0
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +22 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.component.ts +205 -0
- package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.module.ts +19 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.component.ts +98 -0
- package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.module.ts +21 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_theme.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/layout-switcher/style/material.scss +5 -0
- package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.component.ts +56 -0
- package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.module.ts +17 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_theme.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/linear-gauge/style/material.scss +5 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/enums/send-option.ts +6 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +342 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +33 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.component.ts +97 -0
- package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.module.ts +21 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/material.scss +0 -0
- 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 +64 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +384 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +84 -0
- package/{lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts → projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts} +2 -2
- package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-change-amount.component.ts +73 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +153 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +165 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +51 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/enum/calendar-view.enum.ts +6 -0
- package/{lib/enum/icon.enum.d.ts → projects/sharedcomponents/src/lib/enum/icon.enum.ts} +5 -2
- package/projects/sharedcomponents/src/lib/enum/keyboard-code.enum.ts +30 -0
- package/projects/sharedcomponents/src/lib/enum/language-code.enum.ts +6 -0
- package/projects/sharedcomponents/src/lib/enum/month.enum.ts +15 -0
- package/projects/sharedcomponents/src/lib/enum/time-period.enum.ts +9 -0
- package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +120 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +113 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +61 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +63 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +41 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +48 -0
- package/projects/sharedcomponents/src/lib/model/agenda-event-per-day.model.ts +6 -0
- package/projects/sharedcomponents/src/lib/model/agenda-event.model.ts +17 -0
- package/projects/sharedcomponents/src/lib/model/agenda-null-objects.ts +11 -0
- package/projects/sharedcomponents/src/lib/model/business-object.ts +85 -0
- package/projects/sharedcomponents/src/lib/model/constant/all-months.ts +17 -0
- package/projects/sharedcomponents/src/lib/model/date-range.ts +10 -0
- package/projects/sharedcomponents/src/lib/model/day.model.ts +9 -0
- package/projects/sharedcomponents/src/lib/model/icon-svg.ts +18 -0
- package/projects/sharedcomponents/src/lib/model/month.model.ts +11 -0
- package/projects/sharedcomponents/src/lib/model/time-window.bo.ts +21 -0
- package/projects/sharedcomponents/src/lib/model/week.model.ts +5 -0
- package/projects/sharedcomponents/src/lib/model/weekday.model.ts +17 -0
- package/projects/sharedcomponents/src/lib/pipe/array-number.pipe.ts +14 -0
- package/projects/sharedcomponents/src/lib/pipe/master-pipes.ts +7 -0
- package/projects/sharedcomponents/src/lib/pipe/ucfirst.pipe.ts +14 -0
- package/projects/sharedcomponents/src/lib/service/dictionary.service.ts +86 -0
- package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +51 -0
- package/projects/sharedcomponents/src/lib/service/options.service.ts +66 -0
- package/projects/sharedcomponents/src/lib/service/shared-connector.service.ts +258 -0
- package/projects/sharedcomponents/src/lib/service/shared-initializer.service.ts +29 -0
- package/projects/sharedcomponents/src/lib/service/shared.service.ts +21 -0
- package/projects/sharedcomponents/src/lib/service/stock.service.ts +95 -0
- package/{lib → projects/sharedcomponents/src/lib}/style/_mixin.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/style/_variables.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/style/sharedcomponents-globals.scss +0 -0
- package/projects/sharedcomponents/src/lib/utils/array-utils.ts +202 -0
- package/projects/sharedcomponents/src/lib/utils/calendar.utils.ts +75 -0
- package/projects/sharedcomponents/src/lib/utils/date-utils.ts +302 -0
- package/projects/sharedcomponents/src/lib/utils/function/not-nill.function.ts +4 -0
- package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +4 -0
- package/projects/sharedcomponents/src/lib/utils/string-utils.ts +67 -0
- package/{public-api.d.ts → projects/sharedcomponents/src/public-api.ts} +5 -0
- package/projects/sharedcomponents/src/test.ts +27 -0
- package/projects/sharedcomponents/tsconfig.lib.json +18 -0
- package/projects/sharedcomponents/tsconfig.lib.prod.json +10 -0
- package/projects/sharedcomponents/tsconfig.spec.json +17 -0
- package/script/merge-icons.js +39 -0
- package/src/app/app.component.scss +9 -0
- package/src/app/app.component.spec.ts +31 -0
- package/src/app/app.component.ts +156 -0
- package/src/app/app.module.ts +60 -0
- package/src/assets/.gitkeep +0 -0
- package/src/environments/environment.prod.ts +3 -0
- package/src/environments/environment.ts +16 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +13 -0
- package/src/main.ts +12 -0
- package/src/polyfills.ts +53 -0
- package/src/styles.scss +40 -0
- package/src/test.ts +26 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +65 -0
- package/tsconfig.spec.json +18 -0
- package/bundles/colijnit-sharedcomponents.umd.js +0 -3701
- package/bundles/colijnit-sharedcomponents.umd.js.map +0 -1
- package/colijnit-sharedcomponents-1.0.23.tgz +0 -0
- package/colijnit-sharedcomponents.d.ts +0 -16
- package/colijnit-sharedcomponents.metadata.json +0 -1
- package/esm2015/colijnit-sharedcomponents.js +0 -17
- package/esm2015/lib/assets/dictionary/text.properties.js +0 -11
- package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +0 -125
- package/esm2015/lib/components/circular-gauge/co-circular-gauge.module.js +0 -21
- package/esm2015/lib/components/docsign/component/signature/signature.component.js +0 -75
- package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +0 -44
- package/esm2015/lib/components/docsign/docsign.component.js +0 -225
- package/esm2015/lib/components/docsign/docsign.module.js +0 -23
- package/esm2015/lib/components/key-pad/key-pad.component.js +0 -191
- package/esm2015/lib/components/key-pad/key-pad.module.js +0 -21
- package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +0 -74
- package/esm2015/lib/components/layout-switcher/layout-switcher.module.js +0 -21
- package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +0 -55
- package/esm2015/lib/components/linear-gauge/co-linear-gauge.module.js +0 -19
- package/esm2015/lib/components/send-method-dialog/enums/send-option.js +0 -8
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +0 -309
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +0 -31
- package/esm2015/lib/components/statusbar/statusbar.component.js +0 -81
- package/esm2015/lib/components/statusbar/statusbar.module.js +0 -23
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +0 -54
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +0 -350
- package/esm2015/lib/components/stock/stock-location/stock-location.component.js +0 -62
- package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +0 -2
- package/esm2015/lib/components/stock/stock-transfer/stock-change-amount.component.js +0 -68
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +0 -130
- package/esm2015/lib/components/stock/stock.component.js +0 -140
- package/esm2015/lib/components/stock/stock.module.js +0 -48
- package/esm2015/lib/enum/icon.enum.js +0 -17
- package/esm2015/lib/enum/keyboard-code.enum.js +0 -32
- package/esm2015/lib/enum/language-code.enum.js +0 -8
- package/esm2015/lib/factory/business-object-factory.js +0 -120
- package/esm2015/lib/factory/decorators/boolean.decorator.js +0 -102
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +0 -55
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +0 -57
- package/esm2015/lib/factory/decorators/date-field.decorator.js +0 -36
- package/esm2015/lib/factory/decorators/string-number.decorator.js +0 -43
- package/esm2015/lib/model/business-object.js +0 -81
- package/esm2015/lib/model/icon-svg.js +0 -16
- package/esm2015/lib/service/dictionary.service.js +0 -76
- package/esm2015/lib/service/icon-cache.service.js +0 -51
- package/esm2015/lib/service/options.service.js +0 -71
- package/esm2015/lib/service/shared-connector.service.js +0 -278
- package/esm2015/lib/service/shared.service.js +0 -30
- package/esm2015/lib/service/stock.service.js +0 -95
- package/esm2015/lib/utils/array-utils.js +0 -183
- package/esm2015/lib/utils/is-nill.function.js +0 -5
- package/esm2015/lib/utils/string-utils.js +0 -64
- package/esm2015/public-api.js +0 -21
- package/fesm2015/colijnit-sharedcomponents.js +0 -3511
- package/fesm2015/colijnit-sharedcomponents.js.map +0 -1
- package/lib/assets/dictionary/text.properties.d.ts +0 -3
- package/lib/components/circular-gauge/co-circular-gauge.component.d.ts +0 -20
- package/lib/components/circular-gauge/co-circular-gauge.module.d.ts +0 -2
- package/lib/components/docsign/component/signature/signature.component.d.ts +0 -16
- package/lib/components/docsign/component/signatures/signatures.component.d.ts +0 -12
- package/lib/components/docsign/docsign.component.d.ts +0 -92
- package/lib/components/docsign/docsign.module.d.ts +0 -2
- package/lib/components/key-pad/key-pad.component.d.ts +0 -36
- package/lib/components/key-pad/key-pad.module.d.ts +0 -2
- package/lib/components/layout-switcher/layout-switcher.component.d.ts +0 -16
- package/lib/components/layout-switcher/layout-switcher.module.d.ts +0 -2
- package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +0 -16
- package/lib/components/linear-gauge/co-linear-gauge.module.d.ts +0 -2
- package/lib/components/send-method-dialog/enums/send-option.d.ts +0 -6
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +0 -62
- package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +0 -2
- package/lib/components/statusbar/statusbar.component.d.ts +0 -23
- package/lib/components/statusbar/statusbar.module.d.ts +0 -2
- package/lib/components/stock/stock-information/stock-information.component.d.ts +0 -10
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +0 -60
- package/lib/components/stock/stock-location/stock-location.component.d.ts +0 -15
- package/lib/components/stock/stock-transfer/stock-change-amount.component.d.ts +0 -18
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +0 -36
- package/lib/components/stock/stock.component.d.ts +0 -42
- package/lib/components/stock/stock.module.d.ts +0 -2
- package/lib/enum/keyboard-code.enum.d.ts +0 -30
- package/lib/enum/language-code.enum.d.ts +0 -6
- package/lib/factory/business-object-factory.d.ts +0 -23
- package/lib/factory/decorators/boolean.decorator.d.ts +0 -43
- package/lib/factory/decorators/complex-array.decorator.d.ts +0 -25
- package/lib/factory/decorators/complex-field.decorator.d.ts +0 -25
- package/lib/factory/decorators/date-field.decorator.d.ts +0 -17
- package/lib/factory/decorators/string-number.decorator.d.ts +0 -22
- package/lib/model/business-object.d.ts +0 -7
- package/lib/model/icon-svg.d.ts +0 -4
- package/lib/service/dictionary.service.d.ts +0 -21
- package/lib/service/icon-cache.service.d.ts +0 -18
- package/lib/service/options.service.d.ts +0 -13
- package/lib/service/shared-connector.service.d.ts +0 -43
- package/lib/service/shared.service.d.ts +0 -8
- package/lib/service/stock.service.d.ts +0 -38
- package/lib/utils/array-utils.d.ts +0 -57
- package/lib/utils/is-nill.function.d.ts +0 -1
- package/lib/utils/string-utils.d.ts +0 -22
|
@@ -0,0 +1,265 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
}
|