@bizdoc/core 1.9.13 → 1.10.0-next.3
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/assets/dayjs/locale/af.js +1 -0
- package/assets/dayjs/locale/am.js +1 -0
- package/assets/dayjs/locale/ar-dz.js +1 -0
- package/assets/dayjs/locale/ar-iq.js +1 -0
- package/assets/dayjs/locale/ar-kw.js +1 -0
- package/assets/dayjs/locale/ar-ly.js +1 -0
- package/assets/dayjs/locale/ar-ma.js +1 -0
- package/assets/dayjs/locale/ar-sa.js +1 -0
- package/assets/dayjs/locale/ar-tn.js +1 -0
- package/assets/dayjs/locale/ar.js +1 -0
- package/assets/dayjs/locale/az.js +1 -0
- package/assets/dayjs/locale/be.js +1 -0
- package/assets/dayjs/locale/bg.js +1 -0
- package/assets/dayjs/locale/bi.js +1 -0
- package/assets/dayjs/locale/bm.js +1 -0
- package/assets/dayjs/locale/bn.js +1 -0
- package/assets/dayjs/locale/bo.js +1 -0
- package/assets/dayjs/locale/br.js +1 -0
- package/assets/dayjs/locale/bs.js +1 -0
- package/assets/dayjs/locale/ca.js +1 -0
- package/assets/dayjs/locale/cs.js +1 -0
- package/assets/dayjs/locale/cv.js +1 -0
- package/assets/dayjs/locale/cy.js +1 -0
- package/assets/dayjs/locale/da.js +1 -0
- package/assets/dayjs/locale/de-at.js +1 -0
- package/assets/dayjs/locale/de-ch.js +1 -0
- package/assets/dayjs/locale/de.js +1 -0
- package/assets/dayjs/locale/dv.js +1 -0
- package/assets/dayjs/locale/el.js +1 -0
- package/assets/dayjs/locale/en-au.js +1 -0
- package/assets/dayjs/locale/en-ca.js +1 -0
- package/assets/dayjs/locale/en-gb.js +1 -0
- package/assets/dayjs/locale/en-ie.js +1 -0
- package/assets/dayjs/locale/en-il.js +1 -0
- package/assets/dayjs/locale/en-in.js +1 -0
- package/assets/dayjs/locale/en-nz.js +1 -0
- package/assets/dayjs/locale/en-sg.js +1 -0
- package/assets/dayjs/locale/en-tt.js +1 -0
- package/assets/dayjs/locale/en.js +1 -0
- package/assets/dayjs/locale/eo.js +1 -0
- package/assets/dayjs/locale/es-do.js +1 -0
- package/assets/dayjs/locale/es-mx.js +1 -0
- package/assets/dayjs/locale/es-pr.js +1 -0
- package/assets/dayjs/locale/es-us.js +1 -0
- package/assets/dayjs/locale/es.js +1 -0
- package/assets/dayjs/locale/et.js +1 -0
- package/assets/dayjs/locale/eu.js +1 -0
- package/assets/dayjs/locale/fa.js +1 -0
- package/assets/dayjs/locale/fi.js +1 -0
- package/assets/dayjs/locale/fo.js +1 -0
- package/assets/dayjs/locale/fr-ca.js +1 -0
- package/assets/dayjs/locale/fr-ch.js +1 -0
- package/assets/dayjs/locale/fr.js +1 -0
- package/assets/dayjs/locale/fy.js +1 -0
- package/assets/dayjs/locale/ga.js +1 -0
- package/assets/dayjs/locale/gd.js +1 -0
- package/assets/dayjs/locale/gl.js +1 -0
- package/assets/dayjs/locale/gom-latn.js +1 -0
- package/assets/dayjs/locale/gu.js +1 -0
- package/assets/dayjs/locale/he.js +1 -0
- package/assets/dayjs/locale/hi.js +1 -0
- package/assets/dayjs/locale/hr.js +1 -0
- package/assets/dayjs/locale/ht.js +1 -0
- package/assets/dayjs/locale/hu.js +1 -0
- package/assets/dayjs/locale/hy-am.js +1 -0
- package/assets/dayjs/locale/id.js +1 -0
- package/assets/dayjs/locale/index.d.ts +11 -0
- package/assets/dayjs/locale/is.js +1 -0
- package/assets/dayjs/locale/it-ch.js +1 -0
- package/assets/dayjs/locale/it.js +1 -0
- package/assets/dayjs/locale/ja.js +1 -0
- package/assets/dayjs/locale/jv.js +1 -0
- package/assets/dayjs/locale/ka.js +1 -0
- package/assets/dayjs/locale/kk.js +1 -0
- package/assets/dayjs/locale/km.js +1 -0
- package/assets/dayjs/locale/kn.js +1 -0
- package/assets/dayjs/locale/ko.js +1 -0
- package/assets/dayjs/locale/ku.js +1 -0
- package/assets/dayjs/locale/ky.js +1 -0
- package/assets/dayjs/locale/lb.js +1 -0
- package/assets/dayjs/locale/lo.js +1 -0
- package/assets/dayjs/locale/lt.js +1 -0
- package/assets/dayjs/locale/lv.js +1 -0
- package/assets/dayjs/locale/me.js +1 -0
- package/assets/dayjs/locale/mi.js +1 -0
- package/assets/dayjs/locale/mk.js +1 -0
- package/assets/dayjs/locale/ml.js +1 -0
- package/assets/dayjs/locale/mn.js +1 -0
- package/assets/dayjs/locale/mr.js +1 -0
- package/assets/dayjs/locale/ms-my.js +1 -0
- package/assets/dayjs/locale/ms.js +1 -0
- package/assets/dayjs/locale/mt.js +1 -0
- package/assets/dayjs/locale/my.js +1 -0
- package/assets/dayjs/locale/nb.js +1 -0
- package/assets/dayjs/locale/ne.js +1 -0
- package/assets/dayjs/locale/nl-be.js +1 -0
- package/assets/dayjs/locale/nl.js +1 -0
- package/assets/dayjs/locale/nn.js +1 -0
- package/assets/dayjs/locale/oc-lnc.js +1 -0
- package/assets/dayjs/locale/pa-in.js +1 -0
- package/assets/dayjs/locale/pl.js +1 -0
- package/assets/dayjs/locale/pt-br.js +1 -0
- package/assets/dayjs/locale/pt.js +1 -0
- package/assets/dayjs/locale/ro.js +1 -0
- package/assets/dayjs/locale/ru.js +1 -0
- package/assets/dayjs/locale/rw.js +1 -0
- package/assets/dayjs/locale/sd.js +1 -0
- package/assets/dayjs/locale/se.js +1 -0
- package/assets/dayjs/locale/si.js +1 -0
- package/assets/dayjs/locale/sk.js +1 -0
- package/assets/dayjs/locale/sl.js +1 -0
- package/assets/dayjs/locale/sq.js +1 -0
- package/assets/dayjs/locale/sr-cyrl.js +1 -0
- package/assets/dayjs/locale/sr.js +1 -0
- package/assets/dayjs/locale/ss.js +1 -0
- package/assets/dayjs/locale/sv-fi.js +1 -0
- package/assets/dayjs/locale/sv.js +1 -0
- package/assets/dayjs/locale/sw.js +1 -0
- package/assets/dayjs/locale/ta.js +1 -0
- package/assets/dayjs/locale/te.js +1 -0
- package/assets/dayjs/locale/tet.js +1 -0
- package/assets/dayjs/locale/tg.js +1 -0
- package/assets/dayjs/locale/th.js +1 -0
- package/assets/dayjs/locale/tk.js +1 -0
- package/assets/dayjs/locale/tl-ph.js +1 -0
- package/assets/dayjs/locale/tlh.js +1 -0
- package/assets/dayjs/locale/tr.js +1 -0
- package/assets/dayjs/locale/types.d.ts +33 -0
- package/assets/dayjs/locale/tzl.js +1 -0
- package/assets/dayjs/locale/tzm-latn.js +1 -0
- package/assets/dayjs/locale/tzm.js +1 -0
- package/assets/dayjs/locale/ug-cn.js +1 -0
- package/assets/dayjs/locale/uk.js +1 -0
- package/assets/dayjs/locale/ur.js +1 -0
- package/assets/dayjs/locale/uz-latn.js +1 -0
- package/assets/dayjs/locale/uz.js +1 -0
- package/assets/dayjs/locale/vi.js +1 -0
- package/assets/dayjs/locale/x-pseudo.js +1 -0
- package/assets/dayjs/locale/yo.js +1 -0
- package/assets/dayjs/locale/zh-cn.js +1 -0
- package/assets/dayjs/locale/zh-hk.js +1 -0
- package/assets/dayjs/locale/zh-tw.js +1 -0
- package/assets/dayjs/locale/zh.js +1 -0
- package/assets/themes/brown.min.css +1 -1
- package/assets/themes/dark.min.css +1 -1
- package/assets/themes/deep-purple-light-blue.min.css +3 -3
- package/assets/themes/default.min.css +1 -1
- package/assets/themes/green.min.css +1 -1
- package/assets/themes/indigo.min.css +1 -1
- package/esm2020/lib/admin/admin-dismiss.service.mjs +3 -3
- package/esm2020/lib/admin/admin-menu.component.mjs +3 -3
- package/esm2020/lib/admin/core/ace.input.mjs +3 -3
- package/esm2020/lib/admin/core/color-picker.input.mjs +3 -3
- package/esm2020/lib/admin/core/search.input.mjs +3 -3
- package/esm2020/lib/admin/diff/configuration-diff.component.mjs +5 -5
- package/esm2020/lib/admin/document-trace/document-trace.component.mjs +9 -10
- package/esm2020/lib/admin/document-trace/reassign.dialog.mjs +3 -3
- package/esm2020/lib/admin/document-trace/trace-element.component.mjs +4 -4
- package/esm2020/lib/admin/form/form.resolve.service.mjs +3 -3
- package/esm2020/lib/admin/form/form.service.mjs +3 -3
- package/esm2020/lib/admin/form/workflow/node.component.mjs +3 -3
- package/esm2020/lib/admin/form/workflow/role-node.component.mjs +3 -3
- package/esm2020/lib/admin/form/workflow/workflow.component.mjs +6 -5
- package/esm2020/lib/admin/indices/manage-cube-index.component.mjs +3 -3
- package/esm2020/lib/admin/patterns/patterns.component.mjs +3 -3
- package/esm2020/lib/admin/permissions/permissions.component.mjs +3 -3
- package/esm2020/lib/admin/positions/positions-popup.component.mjs +3 -3
- package/esm2020/lib/admin/positions/positions.component.mjs +3 -3
- package/esm2020/lib/admin/profiler/profiler.component.mjs +10 -10
- package/esm2020/lib/admin/utility-wrapper.component.mjs +3 -3
- package/esm2020/lib/admin/utility.pane.component.mjs +3 -3
- package/esm2020/lib/app.component.mjs +6 -6
- package/esm2020/lib/bizdoc.module.mjs +8 -20
- package/esm2020/lib/browse/browse-items.component.mjs +13 -8
- package/esm2020/lib/browse/browse.mobile.component.mjs +3 -3
- package/esm2020/lib/browse/browse.pane.component.mjs +6 -4
- package/esm2020/lib/browse/expanded-item/expanded-item.component.mjs +12 -12
- package/esm2020/lib/browse/filter/filter.component.mjs +3 -3
- package/esm2020/lib/browse/folders-menu.component.mjs +3 -3
- package/esm2020/lib/chat/chat-info.mjs +3 -3
- package/esm2020/lib/chat/chat.mobile.component.mjs +3 -3
- package/esm2020/lib/chat/chat.service.mjs +3 -3
- package/esm2020/lib/chat/contacts.component.mjs +9 -8
- package/esm2020/lib/chat/contacts.pane.component.mjs +3 -3
- package/esm2020/lib/chat/conversation.component.mjs +8 -6
- package/esm2020/lib/chat/conversation.pane.component.mjs +3 -3
- package/esm2020/lib/compose/action/action-picker.component.mjs +3 -3
- package/esm2020/lib/compose/action/action.dialog.mjs +3 -3
- package/esm2020/lib/compose/action/action.pane.dialog.mjs +3 -3
- package/esm2020/lib/compose/action/assign-action.component.mjs +3 -3
- package/esm2020/lib/compose/action/return-action.component.mjs +3 -3
- package/esm2020/lib/compose/attachments/attachments.component.mjs +4 -4
- package/esm2020/lib/compose/attachments/preview/attachment-preview.component.mjs +3 -3
- package/esm2020/lib/compose/attachments/progress-button.directive.mjs +3 -3
- package/esm2020/lib/compose/can-deactivate-changes.service.mjs +3 -3
- package/esm2020/lib/compose/comments/Comments.pane.component.mjs +3 -3
- package/esm2020/lib/compose/comments/comment.component.mjs +6 -5
- package/esm2020/lib/compose/comments/comments.component.mjs +3 -3
- package/esm2020/lib/compose/comments/edit-comment.component.mjs +3 -3
- package/esm2020/lib/compose/comments/edits.component.mjs +4 -4
- package/esm2020/lib/compose/comments/quick-comment.component.exp.mjs +3 -3
- package/esm2020/lib/compose/comments/votes.component.mjs +6 -5
- package/esm2020/lib/compose/compose-resolve.service.mjs +6 -6
- package/esm2020/lib/compose/compose.mobile.component.mjs +3 -3
- package/esm2020/lib/compose/compose.pane.component.mjs +6 -4
- package/esm2020/lib/compose/copy/copy.dialog.mjs +3 -3
- package/esm2020/lib/compose/dismiss.service.mjs +3 -3
- package/esm2020/lib/compose/document-resolver.service.mjs +3 -3
- package/esm2020/lib/compose/document.component.mjs +3 -3
- package/esm2020/lib/compose/document.mobile.component.mjs +3 -3
- package/esm2020/lib/compose/document.pane.component.mjs +3 -3
- package/esm2020/lib/compose/events/events.component.mjs +4 -4
- package/esm2020/lib/compose/form-selector/form-selector.sheet.mjs +3 -3
- package/esm2020/lib/compose/form.component.mjs +3 -3
- package/esm2020/lib/compose/new-menu.component.mjs +3 -3
- package/esm2020/lib/compose/privilage.directive.mjs +6 -6
- package/esm2020/lib/compose/recipient-resolver.service.mjs +3 -3
- package/esm2020/lib/compose/save-changes.dialog.mjs +3 -3
- package/esm2020/lib/compose/state.component.mjs +3 -3
- package/esm2020/lib/compose/tag/tags.component.mjs +3 -3
- package/esm2020/lib/compose/trace/flow.component.mjs +39 -31
- package/esm2020/lib/compose/trace/people.component.mjs +3 -3
- package/esm2020/lib/compose/trace/trace.base.mjs +6 -7
- package/esm2020/lib/compose/trace/trace.component.mjs +10 -10
- package/esm2020/lib/compose/trace/trace.pane.component.mjs +3 -3
- package/esm2020/lib/compose/version-compare/version-compare.component.mjs +3 -3
- package/esm2020/lib/compose/version-compare/version-compare.directive.mjs +9 -9
- package/esm2020/lib/compose/version-compare/version.pane.component.mjs +5 -5
- package/esm2020/lib/core/NgComponentOutlet.mjs +3 -3
- package/esm2020/lib/core/account.service.mjs +3 -3
- package/esm2020/lib/core/animated-icon/animated-icon.directive.mjs +3 -3
- package/esm2020/lib/core/avatar/avatar.component.mjs +3 -3
- package/esm2020/lib/core/component-factory-resolver.mjs +3 -3
- package/esm2020/lib/core/controls/address.input.mjs +3 -3
- package/esm2020/lib/core/controls/auto-complete.input.mjs +3 -3
- package/esm2020/lib/core/controls/combination-picker-body.mjs +3 -3
- package/esm2020/lib/core/controls/combination-picker.mjs +3 -3
- package/esm2020/lib/core/controls/combination-pool.mjs +3 -3
- package/esm2020/lib/core/controls/select.input.mjs +3 -3
- package/esm2020/lib/core/controls/time-picker.mjs +3 -3
- package/esm2020/lib/core/controls/timespan.input.mjs +3 -3
- package/esm2020/lib/core/datasource.service.mjs +3 -3
- package/esm2020/lib/core/guide/guide.component.mjs +3 -3
- package/esm2020/lib/core/guide/guide.service.mjs +3 -3
- package/esm2020/lib/core/http.interceptor.mjs +3 -3
- package/esm2020/lib/core/hub.service.mjs +3 -3
- package/esm2020/lib/core/identity/identity.component.mjs +3 -3
- package/esm2020/lib/core/info/attachment-info.service.mjs +3 -3
- package/esm2020/lib/core/info/document-info.service.mjs +3 -3
- package/esm2020/lib/core/info/location-info.component.mjs +3 -3
- package/esm2020/lib/core/info/map-info.mjs +3 -3
- package/esm2020/lib/core/layout/autocomplete.field.mjs +3 -3
- package/esm2020/lib/core/layout/checkbox.field.mjs +3 -3
- package/esm2020/lib/core/layout/checkbox.mjs +3 -3
- package/esm2020/lib/core/layout/date-range.field.mjs +3 -3
- package/esm2020/lib/core/layout/date.field.mjs +3 -3
- package/esm2020/lib/core/layout/expression.field.mjs +3 -3
- package/esm2020/lib/core/layout/html.field.mjs +3 -3
- package/esm2020/lib/core/layout/input.base.mjs +3 -3
- package/esm2020/lib/core/layout/input.field.mjs +3 -3
- package/esm2020/lib/core/layout/layout.component.mjs +3 -3
- package/esm2020/lib/core/layout/numeric.field.mjs +3 -3
- package/esm2020/lib/core/layout/select.field.mjs +3 -3
- package/esm2020/lib/core/layout/switch.field.mjs +3 -3
- package/esm2020/lib/core/layout/textarea.field.mjs +3 -3
- package/esm2020/lib/core/layout/timespan.field.mjs +3 -3
- package/esm2020/lib/core/lottie-animation.mjs +3 -3
- package/esm2020/lib/core/mailbox.service.mjs +3 -3
- package/esm2020/lib/core/none.component.mjs +3 -3
- package/esm2020/lib/core/pipes/action.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/calendar.pipe.mjs +72 -0
- package/esm2020/lib/core/pipes/date-format.pipe.mjs +19 -0
- package/esm2020/lib/core/pipes/daterange.pipe.mjs +13 -14
- package/esm2020/lib/core/pipes/difference.pipe.mjs +15 -0
- package/esm2020/lib/core/pipes/duration-format.pipe.mjs +48 -0
- package/esm2020/lib/core/pipes/duration.pipe.mjs +13 -42
- package/esm2020/lib/core/pipes/form.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/join.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/role.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/sanitize-html.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/sort.pipe.mjs +6 -6
- package/esm2020/lib/core/pipes/state.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/time-ago.pipe.mjs +66 -0
- package/esm2020/lib/core/pipes/translate.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/type-value.pipe.mjs +3 -3
- package/esm2020/lib/core/pipes/user-name.pipe.mjs +3 -3
- package/esm2020/lib/core/popup/popup.component.mjs +3 -3
- package/esm2020/lib/core/popup/popup.service.mjs +3 -3
- package/esm2020/lib/core/popup/tooltip.directive.mjs +6 -6
- package/esm2020/lib/core/prompt/ask/ask.dialog.mjs +3 -3
- package/esm2020/lib/core/prompt/mask/mask.component.mjs +3 -3
- package/esm2020/lib/core/prompt.service.mjs +3 -3
- package/esm2020/lib/core/router.mjs +6 -6
- package/esm2020/lib/core/session.service.mjs +9 -9
- package/esm2020/lib/core/slots/router.directive.mjs +3 -3
- package/esm2020/lib/core/slots/router.service.mjs +3 -3
- package/esm2020/lib/core/slots/slots.component.mjs +12 -11
- package/esm2020/lib/core/tagging/documents.component.mjs +3 -3
- package/esm2020/lib/core/tagging/edit-input.component.mjs +9 -8
- package/esm2020/lib/core/tagging/emoji.component.mjs +3 -3
- package/esm2020/lib/core/tagging/tagging-item.directive.mjs +3 -3
- package/esm2020/lib/core/tagging/tagging.component-base.mjs +3 -3
- package/esm2020/lib/core/tagging/tagging.directive.mjs +3 -3
- package/esm2020/lib/core/tagging/tagging.pipe.mjs +3 -3
- package/esm2020/lib/core/tagging/users.component.mjs +3 -3
- package/esm2020/lib/core/translate.service.mjs +28 -103
- package/esm2020/lib/core/translations.mjs +4 -4
- package/esm2020/lib/core/window-title.service.mjs +3 -3
- package/esm2020/lib/cube/accum/accum.component.mjs +10 -6
- package/esm2020/lib/cube/chart/chart.component.mjs +14 -6
- package/esm2020/lib/cube/cube-info.service.mjs +3 -3
- package/esm2020/lib/cube/cube-menu.component.mjs +3 -3
- package/esm2020/lib/cube/cube-view.component.mjs +24 -18
- package/esm2020/lib/cube/cube.service.mjs +5 -5
- package/esm2020/lib/cube/declarations.mjs +1 -1
- package/esm2020/lib/cube/explore/document-item.component.mjs +3 -3
- package/esm2020/lib/cube/explore/explore-item.component.mjs +3 -3
- package/esm2020/lib/cube/explore/explore-items.component.mjs +4 -4
- package/esm2020/lib/cube/explore/explore.pane.component.mjs +3 -3
- package/esm2020/lib/cube/explore/item-resolver.service.mjs +6 -6
- package/esm2020/lib/cube/explore/item.pane.component.mjs +3 -3
- package/esm2020/lib/cube/filter/filter-tags.component.exp.mjs +3 -3
- package/esm2020/lib/cube/filter/filter.component.mjs +3 -3
- package/esm2020/lib/cube/grid/grid.component.mjs +6 -7
- package/esm2020/lib/cube/grid/spreadsheet.component.mjs +15 -16
- package/esm2020/lib/cube/matrix/matrix.base.mjs +3 -3
- package/esm2020/lib/cube/matrix/matrix.component.mjs +3 -3
- package/esm2020/lib/cube/matrix/matrix.mobile.component.mjs +3 -3
- package/esm2020/lib/cube/matrix/matrix.pane.component.mjs +3 -3
- package/esm2020/lib/cube/matrix/table.component.mjs +17 -18
- package/esm2020/lib/cube/parallel/item.mjs +2 -1
- package/esm2020/lib/cube/parallel/parallel.component.mjs +3 -3
- package/esm2020/lib/cube/pivot/pivot.component.mjs +19 -14
- package/esm2020/lib/cube/sum/sum.component.mjs +5 -5
- package/esm2020/lib/cube/view-base.mjs +4 -4
- package/esm2020/lib/cube/view.mobile.component.mjs +3 -3
- package/esm2020/lib/cube/view.pane.component.mjs +10 -7
- package/esm2020/lib/dashboard/actions/actions.widget.mjs +3 -3
- package/esm2020/lib/dashboard/cube/accum-cube.widget.mjs +3 -3
- package/esm2020/lib/dashboard/cube/cube-analysis.base.mjs +3 -3
- package/esm2020/lib/dashboard/cube/cube-analysis.widget.mjs +3 -3
- package/esm2020/lib/dashboard/cube/cube-chart.widget.mjs +5 -4
- package/esm2020/lib/dashboard/cube/documents.widget.mjs +3 -3
- package/esm2020/lib/dashboard/cube/filter/filter.component.mjs +3 -3
- package/esm2020/lib/dashboard/dashboard.component.mjs +3 -3
- package/esm2020/lib/dashboard/dashboard.pane.component.mjs +3 -3
- package/esm2020/lib/dashboard/recents/recents.widget.mjs +3 -3
- package/esm2020/lib/dashboard/score/activity.widget.mjs +6 -7
- package/esm2020/lib/dashboard/score/compare-departments.widget.mjs +7 -8
- package/esm2020/lib/dashboard/score/peers-performance.widget.mjs +7 -8
- package/esm2020/lib/dashboard/score/pending-results.widget.mjs +7 -8
- package/esm2020/lib/dashboard/score/personal-score.widget.mjs +5 -5
- package/esm2020/lib/dashboard/widget-item.component.mjs +3 -3
- package/esm2020/lib/desktop.module.mjs +5 -9
- package/esm2020/lib/home/about/about.dialog.mjs +8 -9
- package/esm2020/lib/home/home-base.component.mjs +3 -3
- package/esm2020/lib/home/home.desktop.component.mjs +3 -3
- package/esm2020/lib/home/home.mobile.component.mjs +3 -3
- package/esm2020/lib/home/notifications/notifications.component.mjs +7 -6
- package/esm2020/lib/home/options/options.component.mjs +3 -3
- package/esm2020/lib/home/outofoffice/outofoffice.component.mjs +3 -3
- package/esm2020/lib/home/search.service.mjs +11 -8
- package/esm2020/lib/home/sign/sign.component.mjs +3 -3
- package/esm2020/lib/home/tools.component.mjs +3 -3
- package/esm2020/lib/impersonate/impersonate.component.mjs +3 -3
- package/esm2020/lib/mobile.module.mjs +5 -9
- package/esm2020/lib/modules/chart.module.mjs +9 -9
- package/esm2020/lib/modules/circular-gauge.module.mjs +4 -4
- package/esm2020/lib/modules/date.adapter.mjs +30 -0
- package/esm2020/lib/modules/datepicker.intl.mjs +39 -0
- package/esm2020/lib/modules/diagram.module.mjs +4 -4
- package/esm2020/lib/modules/gantt.module.mjs +17 -0
- package/esm2020/lib/modules/grid.module.mjs +4 -4
- package/esm2020/lib/modules/material.module.mjs +15 -9
- package/esm2020/lib/modules/paginator.intl.mjs +21 -0
- package/esm2020/lib/modules/pivot.module.mjs +4 -4
- package/esm2020/lib/modules/schedule.module.mjs +4 -4
- package/esm2020/lib/modules/spreadsheet.module.mjs +4 -4
- package/esm2020/lib/modules/stepper.intl.mjs +17 -0
- package/esm2020/lib/modules/texteditor.module.mjs +27 -0
- package/esm2020/lib/notifications/filter.component.mjs +3 -3
- package/esm2020/lib/notifications/notifications-table.component.mjs +6 -5
- package/esm2020/lib/notifications/notifications.mobile.component.mjs +3 -3
- package/esm2020/lib/notifications/notifications.pane.component.mjs +3 -3
- package/esm2020/lib/notifications/notifications.service.mjs +3 -3
- package/esm2020/lib/notifications/types/commented.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/cube-anomaly.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/escalated.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/liked.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/long-running-task.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/notification-base.mjs +3 -3
- package/esm2020/lib/notifications/types/nudge.notification.mjs +6 -7
- package/esm2020/lib/notifications/types/state-changed.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/tagged.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/text.notification.mjs +3 -3
- package/esm2020/lib/notifications/types/upcoming-event.notification.mjs +7 -8
- package/esm2020/lib/options/options.component.mjs +3 -3
- package/esm2020/lib/options/options.service.mjs +3 -3
- package/esm2020/lib/reports/arguments-component.mjs +3 -3
- package/esm2020/lib/reports/cube/grid-documents.component.mjs +4 -4
- package/esm2020/lib/reports/cube/table-documents.component.mjs +3 -3
- package/esm2020/lib/reports/cube/usage-args.component.mjs +3 -3
- package/esm2020/lib/reports/cube/usage-base.mjs +3 -3
- package/esm2020/lib/reports/cube/usage-chart.component.mjs +3 -3
- package/esm2020/lib/reports/cube/usage-pivot.component.mjs +3 -3
- package/esm2020/lib/reports/report-viewer.component.mjs +3 -3
- package/esm2020/lib/reports/report.mobile.component.mjs +3 -3
- package/esm2020/lib/reports/report.pane.component.mjs +3 -3
- package/esm2020/lib/reports/reports-menu.component.mjs +3 -3
- package/esm2020/lib/reports/substitution/substitution.component.mjs +4 -4
- package/esm2020/lib/reports/table/table-view.component.mjs +3 -3
- package/esm2020/lib/reports/tasks/tasks.component.mjs +3 -3
- package/esm2020/lib/routes.mobile.mjs +1 -1
- package/esm2020/lib/scheduler/schedule.component.mjs +8 -9
- package/esm2020/lib/scheduler/scheduler.mobile.component.mjs +7 -8
- package/esm2020/lib/scheduler/scheduler.pane.component.mjs +7 -8
- package/esm2020/lib/shared.module.mjs +38 -28
- package/esm2020/lib/system.module.mjs +5 -9
- package/esm2020/lib/views/cube/chart.component.mjs +3 -3
- package/esm2020/lib/views/cube/cube-base.mjs +3 -3
- package/esm2020/lib/views/cube/explore.component.mjs +3 -3
- package/esm2020/lib/views/cube/matrix.component.mjs +5 -5
- package/esm2020/lib/views/cube/parallel.component.mjs +5 -5
- package/esm2020/lib/views/cube/pivot.component.mjs +3 -3
- package/esm2020/lib/views/cube/sum.component.mjs +5 -5
- package/esm2020/lib/views/cube/view.component.mjs +3 -3
- package/esm2020/lib/views/timeline/timeline.component.exp.mjs +6 -7
- package/esm2020/lib/views/view-item.component.mjs +3 -3
- package/esm2020/lib/views/views.component.mjs +3 -3
- package/esm2020/lib/views/views.mobile.component.mjs +3 -3
- package/esm2020/lib/views/views.pane.component.mjs +3 -3
- package/esm2020/public-api.mjs +7 -2
- package/fesm2015/bizdoc-core.mjs +1444 -1200
- package/fesm2015/bizdoc-core.mjs.map +1 -1
- package/fesm2020/bizdoc-core.mjs +1444 -1198
- package/fesm2020/bizdoc-core.mjs.map +1 -1
- package/lib/admin/diff/configuration-diff.component.d.ts +1 -1
- package/lib/bizdoc.module.d.ts +6 -7
- package/lib/browse/browse-items.component.d.ts +1 -1
- package/lib/chat/conversation.component.d.ts +1 -1
- package/lib/compose/trace/flow.component.d.ts +1 -1
- package/lib/compose/trace/trace.component.d.ts +1 -1
- package/lib/compose/version-compare/version.pane.component.d.ts +1 -1
- package/lib/core/pipes/calendar.pipe.d.ts +27 -0
- package/lib/core/pipes/date-format.pipe.d.ts +8 -0
- package/lib/core/pipes/daterange.pipe.d.ts +1 -1
- package/lib/core/pipes/difference.pipe.d.ts +7 -0
- package/lib/core/pipes/duration-format.pipe.d.ts +11 -0
- package/lib/core/pipes/duration.pipe.d.ts +5 -8
- package/lib/core/pipes/time-ago.pipe.d.ts +16 -0
- package/lib/core/session.service.d.ts +2 -1
- package/lib/core/translate.service.d.ts +2 -56
- package/lib/cube/accum/accum.component.d.ts +1 -0
- package/lib/cube/chart/chart.component.d.ts +4 -2
- package/lib/cube/cube-view.component.d.ts +4 -5
- package/lib/cube/declarations.d.ts +1 -0
- package/lib/cube/grid/grid.component.d.ts +2 -3
- package/lib/cube/grid/spreadsheet.component.d.ts +1 -0
- package/lib/cube/matrix/table.component.d.ts +2 -2
- package/lib/cube/parallel/item.d.ts +2 -2
- package/lib/cube/pivot/pivot.component.d.ts +3 -5
- package/lib/cube/sum/sum.component.d.ts +1 -1
- package/lib/dashboard/score/peers-performance.widget.d.ts +1 -1
- package/lib/dashboard/score/personal-score.widget.d.ts +1 -1
- package/lib/desktop.module.d.ts +2 -3
- package/lib/home/about/about.dialog.d.ts +2 -1
- package/lib/mobile.module.d.ts +2 -3
- package/lib/modules/chart.module.d.ts +1 -1
- package/lib/modules/date.adapter.d.ts +13 -0
- package/lib/modules/datepicker.intl.d.ts +30 -0
- package/lib/modules/gantt.module.d.ts +7 -0
- package/lib/modules/paginator.intl.d.ts +14 -0
- package/lib/modules/stepper.intl.d.ts +10 -0
- package/lib/modules/texteditor.module.d.ts +8 -0
- package/lib/notifications/types/nudge.notification.d.ts +2 -1
- package/lib/notifications/types/upcoming-event.notification.d.ts +2 -1
- package/lib/shared.module.d.ts +175 -172
- package/lib/system.module.d.ts +4 -5
- package/lib/views/cube/matrix.component.d.ts +2 -2
- package/package.json +3 -6
- package/public-api.d.ts +6 -1
@@ -34,8 +34,8 @@ export class InputField extends FieldBase {
|
|
34
34
|
}
|
35
35
|
focus() { this.input.focus(); }
|
36
36
|
}
|
37
|
-
InputField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
38
|
-
InputField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
37
|
+
InputField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: InputField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
38
|
+
InputField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: InputField, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true }], usesInheritance: true, ngImport: i0, template: `<mat-form-field>
|
39
39
|
<mat-label *ngIf="field.placeholder">{{field.label || field.name}}</mat-label>
|
40
40
|
<input matInput [type]="type" autocomplete="off" [formControl]=control [placeholder]="field.placeholder || field.label || field.name"
|
41
41
|
[required]="field.required" [minlength]="field.min" [maxlength]="field.max" [pattern]="field.pattern"/>
|
@@ -44,7 +44,7 @@ InputField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "1
|
|
44
44
|
<mat-error *ngFor="let v of field.validations" [style.display]="control.hasError(v.type) ? '': 'none'"> {{ v.message }} </mat-error>
|
45
45
|
</ng-container>
|
46
46
|
</mat-form-field>`, isInline: true, components: [{ type: i1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatLabel, selector: "mat-label" }, { type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.MatError, selector: "mat-error", inputs: ["id"] }] });
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: InputField, decorators: [{
|
48
48
|
type: Component,
|
49
49
|
args: [{
|
50
50
|
template: `<mat-form-field>
|
@@ -164,9 +164,9 @@ export class LayoutComponent {
|
|
164
164
|
this._cmpRef && this._cmpRef.destroy();
|
165
165
|
}
|
166
166
|
}
|
167
|
-
LayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
168
|
-
LayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
167
|
+
LayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: LayoutComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
168
|
+
LayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: LayoutComponent, selector: "bizdoc-layout", inputs: { fields: "fields", model: "model", dirty: "dirty", params: "params", valid: "valid" }, outputs: { modelChange: "modelChange", dirtyChange: "dirtyChange", validChange: "validChange" }, host: { classAttribute: "layout" }, viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: '<ng-container #container></ng-container>', isInline: true, styles: [":host{display:flex;flex-direction:column;padding:8px}::ng-deep .layout>*{display:contents}\n"] });
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: LayoutComponent, decorators: [{
|
170
170
|
type: Component,
|
171
171
|
args: [{ selector: 'bizdoc-layout', template: '<ng-container #container></ng-container>', host: { class: 'layout' }, styles: [":host{display:flex;flex-direction:column;padding:8px}::ng-deep .layout>*{display:contents}\n"] }]
|
172
172
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.NgZone }]; }, propDecorators: { fields: [{
|
@@ -15,8 +15,8 @@ export class NumericField extends FieldBase {
|
|
15
15
|
}
|
16
16
|
focus() { this.input.focus(); }
|
17
17
|
}
|
18
|
-
NumericField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
19
|
-
NumericField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
18
|
+
NumericField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NumericField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
19
|
+
NumericField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NumericField, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true }], usesInheritance: true, ngImport: i0, template: `<mat-form-field>
|
20
20
|
<mat-label *ngIf="field.placeholder">{{field.label || field.name}}</mat-label>
|
21
21
|
<input matInput autocomplete="off" type="number" [formControl]=control [placeholder]="field.placeholder || field.label || field.name"
|
22
22
|
[required]="field.required" [min]="field.min" [max]="field.max" [pattern]="field.pattern"/>
|
@@ -26,7 +26,7 @@ NumericField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
26
26
|
<mat-error *ngFor="let v of field.validations" [style.display]="control.hasError(v.type) ? '': 'none'"> {{ v.message }} </mat-error>
|
27
27
|
</ng-container>
|
28
28
|
</mat-form-field>`, isInline: true, components: [{ type: i1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatLabel, selector: "mat-label" }, { type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1.MatSuffix, selector: "[matSuffix]" }, { type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.MatError, selector: "mat-error", inputs: ["id"] }] });
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NumericField, decorators: [{
|
30
30
|
type: Component,
|
31
31
|
args: [{
|
32
32
|
template: `<mat-form-field>
|
@@ -31,8 +31,8 @@ export class SelectField extends FieldBase {
|
|
31
31
|
this.input2.focus();
|
32
32
|
}
|
33
33
|
}
|
34
|
-
SelectField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
35
|
-
SelectField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
34
|
+
SelectField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SelectField, deps: [{ token: i1.DatasourceService }], target: i0.ɵɵFactoryTarget.Component });
|
35
|
+
SelectField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SelectField, selector: "ng-component", inputs: { params: "params" }, viewQueries: [{ propertyName: "input", first: true, predicate: TypeSelect, descendants: true }, { propertyName: "input2", first: true, predicate: MatSelect, descendants: true }], usesInheritance: true, ngImport: i0, template: `<mat-form-field>
|
36
36
|
<mat-label *ngIf="field.placeholder">{{field.label || field.name}}</mat-label>
|
37
37
|
<bizdoc-select *ngIf="!field.options; else options" [type]="field.source"
|
38
38
|
[placeholder]="field.placeholder || field.label || field.name" [formControl]=control
|
@@ -49,7 +49,7 @@ SelectField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
49
49
|
</mat-select>
|
50
50
|
</ng-template>
|
51
51
|
`, isInline: true, components: [{ type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3.TypeSelect, selector: "bizdoc-select", inputs: ["type", "multiple", "placeholder", "required", "disabled", "text", "value"], outputs: ["selectionChange", "textChange"] }, { type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatLabel, selector: "mat-label" }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.MatError, selector: "mat-error", inputs: ["id"] }] });
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SelectField, decorators: [{
|
53
53
|
type: Component,
|
54
54
|
args: [{
|
55
55
|
template: `<mat-form-field>
|
@@ -15,15 +15,15 @@ export class SwitchField extends FieldBase {
|
|
15
15
|
}
|
16
16
|
focus() { this.input.focus(); }
|
17
17
|
}
|
18
|
-
SwitchField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
19
|
-
SwitchField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
18
|
+
SwitchField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SwitchField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
19
|
+
SwitchField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SwitchField, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: MatSlideToggle, descendants: true }], usesInheritance: true, ngImport: i0, template: `<div>
|
20
20
|
<mat-hint *ngIf="field.hint"> {{ field.hint }}</mat-hint>
|
21
21
|
<mat-slide-toggle [formControl]=control> {{ field.label || field.name }}</mat-slide-toggle>
|
22
22
|
<ng-container>
|
23
23
|
<mat-error *ngFor="let v of field.validations" [style.display]="control.hasError(v.type) ? '': 'none'"> {{ v.message }} </mat-error>
|
24
24
|
</ng-container>
|
25
25
|
</div>`, isInline: true, components: [{ type: i1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }] });
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SwitchField, decorators: [{
|
27
27
|
type: Component,
|
28
28
|
args: [{
|
29
29
|
template: `<div>
|
@@ -16,15 +16,15 @@ export class TextareaField extends FieldBase {
|
|
16
16
|
}
|
17
17
|
focus() { this.input.focus(); }
|
18
18
|
}
|
19
|
-
TextareaField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
20
|
-
TextareaField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
19
|
+
TextareaField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TextareaField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
20
|
+
TextareaField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TextareaField, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true }], usesInheritance: true, ngImport: i0, template: `<mat-form-field>
|
21
21
|
<mat-label *ngIf="field.placeholder">{{field.label || field.name}}</mat-label>
|
22
22
|
<textarea matInput [formControl]=control cdkTextareaAutosize [placeholder]="field.placeholder || field.label || field.name"
|
23
23
|
[required]="field.required" [minlength]="field.min" [maxlength]="field.max" [pattern]="field.pattern"></textarea>
|
24
24
|
<mat-hint *ngIf="field.hint"> {{ field.hint }}</mat-hint>
|
25
25
|
<mat-hint *ngIf="field.max" align="end">{{control.value?.length || 0}} / {{field.max}}</mat-hint>
|
26
26
|
</mat-form-field>`, isInline: true, components: [{ type: i1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatLabel, selector: "mat-label" }, { type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i4.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { type: i5.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }] });
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TextareaField, decorators: [{
|
28
28
|
type: Component,
|
29
29
|
args: [{
|
30
30
|
template: `<mat-form-field>
|
@@ -16,8 +16,8 @@ export class TimespanField extends FieldBase {
|
|
16
16
|
}
|
17
17
|
focus() { this.input.focus(); }
|
18
18
|
}
|
19
|
-
TimespanField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
20
|
-
TimespanField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
19
|
+
TimespanField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TimespanField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
20
|
+
TimespanField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TimespanField, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: TimespanInput, descendants: true }], usesInheritance: true, ngImport: i0, template: `<mat-form-field>
|
21
21
|
<mat-label *ngIf="field.placeholder">{{field.label || field.name}}</mat-label>
|
22
22
|
<bizdoc-timespan-input
|
23
23
|
[placeholder]="field.placeholder || field.label || field.name" [formControl]=control
|
@@ -28,7 +28,7 @@ TimespanField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
28
28
|
<mat-error *ngFor="let v of field.validations" [style.display]="control.hasError(v.type) ? '': 'none'"> {{ v.message }} </mat-error>
|
29
29
|
</ng-container>
|
30
30
|
</mat-form-field>`, isInline: true, components: [{ type: i1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i2.TimespanInput, selector: "bizdoc-timespan-input", inputs: ["placeholder", "required", "disabled", "value"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatLabel, selector: "mat-label" }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1.MatSuffix, selector: "[matSuffix]" }, { type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.MatError, selector: "mat-error", inputs: ["id"] }] });
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TimespanField, decorators: [{
|
32
32
|
type: Component,
|
33
33
|
args: [{
|
34
34
|
template: `<mat-form-field>
|
@@ -24,9 +24,9 @@ export class LottieAnimation {
|
|
24
24
|
}
|
25
25
|
play() { this._instance.play(); }
|
26
26
|
}
|
27
|
-
LottieAnimation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
28
|
-
LottieAnimation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
27
|
+
LottieAnimation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: LottieAnimation, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
28
|
+
LottieAnimation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: LottieAnimation, selector: "lottie", inputs: { name: "name", size: "size", autoplay: "autoplay" }, host: { properties: { "style.width": "size", "style.height": "size" }, styleAttribute: "display:block" }, ngImport: i0, template: '', isInline: true });
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: LottieAnimation, decorators: [{
|
30
30
|
type: Component,
|
31
31
|
args: [{
|
32
32
|
selector: 'lottie', template: '',
|
@@ -259,9 +259,9 @@ export class MailboxService {
|
|
259
259
|
});
|
260
260
|
}
|
261
261
|
}
|
262
|
-
MailboxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
263
|
-
MailboxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.
|
264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
262
|
+
MailboxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MailboxService, deps: [{ token: i1.SessionService }, { token: i2.HubService }, { token: i3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
263
|
+
MailboxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MailboxService, providedIn: 'root' });
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MailboxService, decorators: [{
|
265
265
|
type: Injectable,
|
266
266
|
args: [{ providedIn: 'root' }]
|
267
267
|
}], ctorParameters: function () { return [{ type: i1.SessionService }, { type: i2.HubService }, { type: i3.HttpClient }]; } });
|
@@ -17,13 +17,13 @@ export class NoneComponent {
|
|
17
17
|
this.isMobile = isMobile();
|
18
18
|
}
|
19
19
|
}
|
20
|
-
NoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
21
|
-
NoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
20
|
+
NoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
21
|
+
NoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NoneComponent, selector: "bizdoc-none", inputs: { title: "title", subtitle: "subtitle", icon: "icon" }, ngImport: i0, template: `<div class="none" @none>
|
22
22
|
<h4 class="mat-title">{{title|translate}}</h4>
|
23
23
|
<mat-icon class="icon">{{icon}}</mat-icon>
|
24
24
|
<h5 class="mat-body-2" *ngIf='subtitle' [innerHTML]='subtitle|translate|sanitizeHtml'></h5>
|
25
25
|
</div>`, isInline: true, styles: [".none{align-items:center;display:flex;flex-direction:column;opacity:.2;padding-top:2em;cursor:default}.none .icon{font-size:56px;height:auto;width:auto}.none h5{padding:0 8px}.none h5 ::ng-deep i.material-icons{vertical-align:text-bottom;font-size:initial}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe, "sanitizeHtml": i4.SanitizeHtmlPipe }, animations: [noneAnimation] });
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NoneComponent, decorators: [{
|
27
27
|
type: Component,
|
28
28
|
args: [{ selector: 'bizdoc-none', template: `<div class="none" @none>
|
29
29
|
<h4 class="mat-title">{{title|translate}}</h4>
|
@@ -16,9 +16,9 @@ export class ActionPipe {
|
|
16
16
|
return `_${value}`;
|
17
17
|
}
|
18
18
|
}
|
19
|
-
ActionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
20
|
-
ActionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
19
|
+
ActionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionPipe, deps: [{ token: i1.SessionService }], target: i0.ɵɵFactoryTarget.Pipe });
|
20
|
+
ActionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionPipe, name: "action" });
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionPipe, decorators: [{
|
22
22
|
type: Pipe,
|
23
23
|
args: [{ name: 'action' }]
|
24
24
|
}], ctorParameters: function () { return [{ type: i1.SessionService }]; } });
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { EventEmitter, Pipe } from '@angular/core';
|
2
|
+
/// <reference path="./node_modules/dayjs/plugin/calendar.d.ts" />
|
3
|
+
import dayjs from 'dayjs';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export class CalendarPipe {
|
6
|
+
constructor(cdRef, ngZone) {
|
7
|
+
this.cdRef = cdRef;
|
8
|
+
this.ngZone = ngZone;
|
9
|
+
CalendarPipe.initTimer(ngZone);
|
10
|
+
CalendarPipe.refs++;
|
11
|
+
this.midnightSub = CalendarPipe.midnight.subscribe(() => {
|
12
|
+
this.ngZone.run(() => this.cdRef.markForCheck());
|
13
|
+
});
|
14
|
+
}
|
15
|
+
transform(value, ...args) {
|
16
|
+
const [referenceTime, format] = args;
|
17
|
+
return dayjs(value).calendar(referenceTime, format);
|
18
|
+
}
|
19
|
+
static initTimer(ngZone) {
|
20
|
+
// initialize the timer
|
21
|
+
if (!CalendarPipe.midnight) {
|
22
|
+
CalendarPipe.midnight = new EventEmitter();
|
23
|
+
if (typeof window !== 'undefined') {
|
24
|
+
const timeToUpdate = getMillisecondsUntilUpdate();
|
25
|
+
CalendarPipe.timer = ngZone.runOutsideAngular(() => {
|
26
|
+
return window.setTimeout(() => {
|
27
|
+
// emit the current date
|
28
|
+
CalendarPipe.midnight.emit(new Date());
|
29
|
+
// refresh the timer
|
30
|
+
CalendarPipe.removeTimer();
|
31
|
+
CalendarPipe.initTimer(ngZone);
|
32
|
+
}, timeToUpdate);
|
33
|
+
});
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
static removeTimer() {
|
38
|
+
if (CalendarPipe.timer) {
|
39
|
+
window.clearTimeout(CalendarPipe.timer);
|
40
|
+
CalendarPipe.timer = null;
|
41
|
+
CalendarPipe.midnight = null;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
ngOnDestroy() {
|
45
|
+
if (CalendarPipe.refs > 0) {
|
46
|
+
CalendarPipe.refs--;
|
47
|
+
}
|
48
|
+
if (CalendarPipe.refs === 0) {
|
49
|
+
CalendarPipe.removeTimer();
|
50
|
+
}
|
51
|
+
this.midnightSub.unsubscribe();
|
52
|
+
}
|
53
|
+
}
|
54
|
+
CalendarPipe.refs = 0;
|
55
|
+
CalendarPipe.timer = null;
|
56
|
+
CalendarPipe.midnight = null;
|
57
|
+
CalendarPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CalendarPipe, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Pipe });
|
58
|
+
CalendarPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CalendarPipe, name: "amCalendar", pure: false });
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CalendarPipe, decorators: [{
|
60
|
+
type: Pipe,
|
61
|
+
args: [{
|
62
|
+
name: 'amCalendar',
|
63
|
+
pure: false
|
64
|
+
}]
|
65
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; } });
|
66
|
+
function getMillisecondsUntilUpdate() {
|
67
|
+
const now = dayjs();
|
68
|
+
const tomorrow = dayjs().startOf('day').add(1, 'days');
|
69
|
+
const timeToMidnight = tomorrow.valueOf() - now.valueOf();
|
70
|
+
return timeToMidnight + 1000; // 1 second after midnight
|
71
|
+
}
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXIucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4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WYWw7XHJcbiAgc2FtZUVsc2U/OiBDYWxlbmRhclNwZWNWYWw7XHJcbn1cclxuIl19
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Pipe } from '@angular/core';
|
2
|
+
import dayjs from 'dayjs';
|
3
|
+
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export class DateFormatPipe {
|
6
|
+
constructor() {
|
7
|
+
dayjs.extend(localizedFormat);
|
8
|
+
}
|
9
|
+
transform(value, ...args) {
|
10
|
+
return dayjs(value).format(args[0]);
|
11
|
+
}
|
12
|
+
}
|
13
|
+
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
14
|
+
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DateFormatPipe, name: "amDateFormat" });
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DateFormatPipe, decorators: [{
|
16
|
+
type: Pipe,
|
17
|
+
args: [{ name: 'amDateFormat' }]
|
18
|
+
}], ctorParameters: function () { return []; } });
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1mb3JtYXQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnJhcmllcy9jb3JlL3NyYy9saWIvY29yZS9waXBlcy9kYXRlLWZvcm1hdC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBQ3BELE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQztBQUMxQixPQUFPLGVB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|
+
import dayjs from 'dayjs';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
import * as i1 from "../translate.service";
|
5
|
-
const moment = moment_.default;
|
6
5
|
export class AgoPipe {
|
7
6
|
constructor(_translate) {
|
8
7
|
this._translate = _translate;
|
9
8
|
}
|
10
9
|
transform(value, ...args) {
|
11
|
-
const date =
|
10
|
+
const date = dayjs(value), now = new Date(), seconds = date.diff(now, 's');
|
12
11
|
if (seconds < 60)
|
13
12
|
return this._translate.get('JustNow');
|
14
13
|
if (seconds < 3600)
|
@@ -21,9 +20,9 @@ export class AgoPipe {
|
|
21
20
|
return this._translate.get('YearsAgo', Math.round(months / 12));
|
22
21
|
}
|
23
22
|
}
|
24
|
-
AgoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
25
|
-
AgoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
23
|
+
AgoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AgoPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
|
24
|
+
AgoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AgoPipe, name: "amMiniAgo" });
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AgoPipe, decorators: [{
|
27
26
|
type: Pipe,
|
28
27
|
args: [{ name: 'amMiniAgo' }]
|
29
28
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; } });
|
@@ -41,23 +40,23 @@ export class DateRangePipe {
|
|
41
40
|
if (date1.getFullYear() === date2.getFullYear()) {
|
42
41
|
if (date1.getMonth() === date2.getMonth()) {
|
43
42
|
if (date1.getDate() === date2.getDate())
|
44
|
-
return
|
43
|
+
return dayjs(date1).format(`${w || ''} ${m} ${d}, ${y}`);
|
45
44
|
else
|
46
|
-
return `${
|
45
|
+
return `${dayjs(date1).format(`${w || ''} ${m} ${d}`)} - ${dayjs(date2).format(`${d}, ${y}`)}`;
|
47
46
|
}
|
48
47
|
else {
|
49
|
-
return `${
|
48
|
+
return `${dayjs(date1).format(`${w || ''} ${m} ${d}`)} - ${dayjs(date2).format(`${m} ${d}, ${y}`)}`;
|
50
49
|
}
|
51
50
|
}
|
52
51
|
else {
|
53
|
-
return `${
|
52
|
+
return `${dayjs(date1).format(`${m} ${d}, ${y}`)} - ${dayjs(date2).format(`${m} ${d}, ${y}`)}`;
|
54
53
|
}
|
55
54
|
}
|
56
55
|
}
|
57
|
-
DateRangePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
58
|
-
DateRangePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
56
|
+
DateRangePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DateRangePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
57
|
+
DateRangePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DateRangePipe, name: "dateRange" });
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DateRangePipe, decorators: [{
|
60
59
|
type: Pipe,
|
61
60
|
args: [{ name: 'dateRange' }]
|
62
61
|
}] });
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXJhbmdlLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8u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GUyLmdldE1vbnRoKCkpIHtcclxuICAgICAgICBpZiAoZGF0ZTEuZ2V0RGF0ZSgpID09PSBkYXRlMi5nZXREYXRlKCkpXHJcbiAgICAgICAgICByZXR1cm4gZGF5anMoZGF0ZTEpLmZvcm1hdChgJHt3IHx8ICcnfSAke219ICR7ZH0sICR7eX1gKTtcclxuICAgICAgICBlbHNlXHJcbiAgICAgICAgICByZXR1cm4gYCR7ZGF5anMoZGF0ZTEpLmZvcm1hdChgJHt3IHx8ICcnfSAke219ICR7ZH1gKX0gLSAke2RheWpzKGRhdGUyKS5mb3JtYXQoYCR7ZH0sICR7eX1gKX1gO1xyXG4gICAgICB9XHJcbiAgICAgIGVsc2Uge1xyXG4gICAgICAgIHJldHVybiBgJHtkYXlqcyhkYXRlMSkuZm9ybWF0KGAke3cgfHwgJyd9ICR7bX0gJHtkfWApfSAtICR7ZGF5anMoZGF0ZTIpLmZvcm1hdChgJHttfSAke2R9LCAke3l9YCl9YDtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgZWxzZSB7XHJcbiAgICAgIHJldHVybiBgJHtkYXlqcyhkYXRlMSkuZm9ybWF0KGAke219ICR7ZH0sICR7eX1gKX0gLSAke2RheWpzKGRhdGUyKS5mb3JtYXQoYCR7bX0gJHtkfSwgJHt5fWApfWA7XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Pipe } from '@angular/core';
|
2
|
+
import dayjs from 'dayjs';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export class DifferencePipe {
|
5
|
+
transform(value, ...args) {
|
6
|
+
return dayjs(value).diff(args[0], args[1]);
|
7
|
+
}
|
8
|
+
}
|
9
|
+
DifferencePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DifferencePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
10
|
+
DifferencePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DifferencePipe, name: "amDifference" });
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DifferencePipe, decorators: [{
|
12
|
+
type: Pipe,
|
13
|
+
args: [{ name: 'amDifference' }]
|
14
|
+
}] });
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlmZmVyZW5jZS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicmFyaWVzL2NvcmUvc3JjL2xpYi9jb3JlL3BpcGVzL2RpZmZlcmVuY2UucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQztBQUNwRCxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUM7O0FBRzFCLE1BQU0sT0FBTyxjQUFjO0lBQ3ZCLFNBQVMsQ0FBQyxLQUFVLEVBQUUsR0FBRyxJQUFXO1FBQ2hDLE9BQU8sS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDL0MsQ0FBQzs7MkdBSFEsY0FBYzt5R0FBZCxjQUFjOzJGQUFkLGNBQWM7a0JBRDFCLElBQUk7bUJBQUMsRUFBRSxJQUFJLEVBQUUsY0FBYyxFQUFFIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGlwZSwgUGlwZVRyYW5zZm9ybSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgZGF5anMgZnJvbSAnZGF5anMnO1xyXG5cclxuQFBpcGUoeyBuYW1lOiAnYW1EaWZmZXJlbmNlJyB9KVxyXG5leHBvcnQgY2xhc3MgRGlmZmVyZW5jZVBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuICAgIHRyYW5zZm9ybSh2YWx1ZTogYW55LCAuLi5hcmdzOiBhbnlbXSkge1xyXG4gICAgICAgIHJldHVybiBkYXlqcyh2YWx1ZSkuZGlmZihhcmdzWzBdLCBhcmdzWzFdKTtcclxuICAgIH1cclxufVxyXG4iXX0=
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Pipe } from '@angular/core';
|
2
|
+
/// <reference path="./node_modules/dayjs/plugin/duration.d.ts" />
|
3
|
+
import dayjs from 'dayjs';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "../translate.service";
|
6
|
+
export class DurationFormatPipe {
|
7
|
+
constructor(_translate) {
|
8
|
+
this._translate = _translate;
|
9
|
+
}
|
10
|
+
transform(value, ...args) {
|
11
|
+
const duration = dayjs.duration(value, args[0] || 's');
|
12
|
+
return this._format(duration);
|
13
|
+
}
|
14
|
+
_format(duration) {
|
15
|
+
const parts = [];
|
16
|
+
let o = duration.months(), d = duration.days(), h = duration.hours(), m = duration.minutes();
|
17
|
+
//if (d && d >= dayjs.relativeTimeThreshold('d')) {
|
18
|
+
// o++;
|
19
|
+
// d = 0;
|
20
|
+
//}
|
21
|
+
//if (h && h >= dayjs.relativeTimeThreshold('h')) {
|
22
|
+
// d++;
|
23
|
+
// h = 0;
|
24
|
+
//}
|
25
|
+
//if (m && m >= dayjs.relativeTimeThreshold('m')) {
|
26
|
+
// h++;
|
27
|
+
// m = 0;
|
28
|
+
//}
|
29
|
+
if (o > 0)
|
30
|
+
parts.push(dayjs.duration({ months: o }).humanize());
|
31
|
+
if (d > 0)
|
32
|
+
parts.push(dayjs.duration({ days: d }).humanize());
|
33
|
+
if (h > 0)
|
34
|
+
parts.push(dayjs.duration({ hours: h }).humanize());
|
35
|
+
if (m > 0)
|
36
|
+
parts.push(dayjs.duration({ minutes: m }).humanize());
|
37
|
+
else if (!h && !d)
|
38
|
+
parts.push(duration.humanize());
|
39
|
+
return this._translate.join(parts, 'NumericJoinAnd');
|
40
|
+
}
|
41
|
+
}
|
42
|
+
DurationFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DurationFormatPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
|
43
|
+
DurationFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DurationFormatPipe, name: "amDurationFormat" });
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DurationFormatPipe, decorators: [{
|
45
|
+
type: Pipe,
|
46
|
+
args: [{ name: 'amDurationFormat' }]
|
47
|
+
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; } });
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHVyYXRpb24tZm9ybWF0LnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJyYXJpZXMvY29yZS9zcmMvbGliL2NvcmUvcGlwZXMvZHVyYXRpb24tZm9ybWF0LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsa0VBQWtFO0FBQ2xFLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQzs7O0FBSVUsTUFBTSxPQUNoQyxrQkFBa0I7SUFnQzFCLFlBQW9CLFVBQTRCO1FBQTVCLGVBQVUsR0FBVixVQUFVLENBQWtCO0lBQ2hELENBQUM7SUFoQ0MsU0FBUyxDQUFDLEtBQVUsRUFBRSxHQUFHLElBQVc7UUFDaEMsTUFBTSxRQUFRLEdB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gICAgcGFydHMucHVzaChkYXlqcy5kdXJhdGlvbih7IG1vbnRoczogbyB9KS5odW1hbml6ZSgpKTtcclxuICAgICAgICBpZiAoZCA+IDApXHJcbiAgICAgICAgICAgIHBhcnRzLnB1c2goZGF5anMuZHVyYXRpb24oeyBkYXlzOiBkIH0pLmh1bWFuaXplKCkpO1xyXG4gICAgICAgIGlmIChoID4gMClcclxuICAgICAgICAgICAgcGFydHMucHVzaChkYXlqcy5kdXJhdGlvbih7IGhvdXJzOiBoIH0pLmh1bWFuaXplKCkpO1xyXG4gICAgICAgIGlmIChtID4gMClcclxuICAgICAgICAgICAgcGFydHMucHVzaChkYXlqcy5kdXJhdGlvbih7IG1pbnV0ZXM6IG0gfSkuaHVtYW5pemUoKSk7XHJcbiAgICAgICAgZWxzZSBpZiAoIWggJiYgIWQpXHJcbiAgICAgICAgICAgIHBhcnRzLnB1c2goZHVyYXRpb24uaHVtYW5pemUoKSk7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuX3RyYW5zbGF0ZS5qb2luKHBhcnRzLCAnTnVtZXJpY0pvaW5BbmQnKTtcclxuICAgIH1cclxuICBjb25zdHJ1Y3Rvcihwcml2YXRlIF90cmFuc2xhdGU6IFRyYW5zbGF0ZVNlcnZpY2UpIHtcclxuICB9XHJcbn1cclxuIl19
|
@@ -1,48 +1,19 @@
|
|
1
|
-
import { Pipe } from
|
2
|
-
|
1
|
+
import { Pipe } from '@angular/core';
|
2
|
+
/// <reference path="./node_modules/dayjs/plugin/duration.d.ts" />
|
3
|
+
import dayjs from 'dayjs';
|
3
4
|
import * as i0 from "@angular/core";
|
4
|
-
|
5
|
-
|
6
|
-
export class DurationFormatPipe {
|
7
|
-
constructor(_translate) {
|
8
|
-
this._translate = _translate;
|
5
|
+
export class DurationPipe {
|
6
|
+
constructor() {
|
9
7
|
}
|
10
8
|
transform(value, ...args) {
|
11
|
-
const duration =
|
12
|
-
return
|
13
|
-
}
|
14
|
-
_format(duration) {
|
15
|
-
const parts = [];
|
16
|
-
let o = duration.months(), d = duration.days(), h = duration.hours(), m = duration.minutes();
|
17
|
-
if (d && d >= moment.relativeTimeThreshold('d')) {
|
18
|
-
o++;
|
19
|
-
d = 0;
|
20
|
-
}
|
21
|
-
if (h && h >= moment.relativeTimeThreshold('h')) {
|
22
|
-
d++;
|
23
|
-
h = 0;
|
24
|
-
}
|
25
|
-
if (m && m >= moment.relativeTimeThreshold('m')) {
|
26
|
-
h++;
|
27
|
-
m = 0;
|
28
|
-
}
|
29
|
-
if (o > 0)
|
30
|
-
parts.push(moment.duration({ months: o }).humanize());
|
31
|
-
if (d > 0)
|
32
|
-
parts.push(moment.duration({ days: d }).humanize());
|
33
|
-
if (h > 0)
|
34
|
-
parts.push(moment.duration({ hours: h }).humanize());
|
35
|
-
if (m > 0)
|
36
|
-
parts.push(moment.duration({ minutes: m }).humanize());
|
37
|
-
else if (!h && !d)
|
38
|
-
parts.push(duration.humanize());
|
39
|
-
return this._translate.join(parts, 'NumericJoinAnd');
|
9
|
+
const duration = dayjs.duration(value, args[0] || 's');
|
10
|
+
return duration.humanize();
|
40
11
|
}
|
41
12
|
}
|
42
|
-
|
43
|
-
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
13
|
+
DurationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
14
|
+
DurationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DurationPipe, name: "amDuration" });
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DurationPipe, decorators: [{
|
45
16
|
type: Pipe,
|
46
|
-
args: [{ name: '
|
47
|
-
}], ctorParameters: function () { return [
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
17
|
+
args: [{ name: 'amDuration' }]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