@dereekb/dbx-form 9.25.16 → 10.0.0
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/_index.scss +1 -0
- package/calendar/lib/calendar.module.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.cell.component.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.component.d.ts +4 -4
- package/calendar/lib/calendar.schedule.selection.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.days.component.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.days.form.component.d.ts +2 -2
- package/calendar/lib/calendar.schedule.selection.dialog.button.component.d.ts +1 -6
- package/calendar/lib/calendar.schedule.selection.dialog.component.d.ts +1 -11
- package/calendar/lib/calendar.schedule.selection.popover.button.component.d.ts +2 -2
- package/calendar/lib/calendar.schedule.selection.popover.component.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.popover.content.component.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.range.component.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.store.d.ts +4 -32
- package/calendar/lib/calendar.schedule.selection.store.provide.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.toggle.button.component.d.ts +1 -1
- package/calendar/lib/field/schedule/calendar.schedule.field.component.d.ts +2 -8
- package/esm2022/calendar/lib/calendar.module.mjs +155 -0
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.cell.component.mjs +10 -10
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.component.mjs +6 -6
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.days.component.mjs +6 -6
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.days.form.component.mjs +6 -6
- package/esm2022/calendar/lib/calendar.schedule.selection.dialog.button.component.mjs +36 -0
- package/esm2022/calendar/lib/calendar.schedule.selection.dialog.component.mjs +56 -0
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.mjs +1 -1
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.popover.button.component.mjs +6 -6
- package/esm2022/calendar/lib/calendar.schedule.selection.popover.component.mjs +38 -0
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.popover.content.component.mjs +6 -6
- package/esm2022/calendar/lib/calendar.schedule.selection.range.component.mjs +188 -0
- package/esm2022/calendar/lib/calendar.schedule.selection.store.mjs +785 -0
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.store.provide.mjs +7 -7
- package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.toggle.button.component.mjs +6 -6
- package/esm2022/calendar/lib/field/schedule/calendar.schedule.field.component.mjs +158 -0
- package/esm2022/calendar/lib/field/schedule/calendar.schedule.field.mjs +28 -0
- package/esm2022/calendar/lib/field/schedule/calendar.schedule.module.mjs +58 -0
- package/{esm2020 → esm2022}/lib/form/action/form.action.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/form/action/form.action.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/form/action/transition/form.action.transition.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/form/action/transition/form.action.transition.safety.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/form/form.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/form/io/form.changes.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/form/io/form.input.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/form/io/form.io.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/form/io/form.loading.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/form.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/formly/field/checklist/checklist.item.field.component.mjs +9 -9
- package/{esm2020 → esm2022}/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +6 -6
- package/esm2022/lib/formly/field/checklist/checklist.item.field.module.mjs +67 -0
- package/{esm2020 → esm2022}/lib/formly/field/component/component.field.component.mjs +6 -6
- package/esm2022/lib/formly/field/component/component.field.module.mjs +32 -0
- package/esm2022/lib/formly/field/field.mjs +97 -0
- package/{esm2020 → esm2022}/lib/formly/field/form.field.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/formly/field/selection/list/list.field.component.mjs +4 -4
- package/esm2022/lib/formly/field/selection/list/list.field.module.mjs +76 -0
- package/esm2022/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +33 -0
- package/{esm2020 → esm2022}/lib/formly/field/selection/pickable/pickable.field.directive.mjs +4 -4
- package/esm2022/lib/formly/field/selection/pickable/pickable.field.module.mjs +93 -0
- package/esm2022/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +116 -0
- package/{esm2020 → esm2022}/lib/formly/field/selection/pickable/pickable.mjs +1 -1
- package/esm2022/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +68 -0
- package/esm2022/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +95 -0
- package/esm2022/lib/formly/field/selection/searchable/searchable.field.directive.mjs +278 -0
- package/esm2022/lib/formly/field/selection/searchable/searchable.field.module.mjs +91 -0
- package/{esm2020 → esm2022}/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +4 -4
- package/esm2022/lib/formly/field/selection/selection.field.mjs +39 -0
- package/{esm2020 → esm2022}/lib/formly/field/selection/selection.mjs +1 -1
- package/{esm2020 → esm2022}/lib/formly/field/selection/selection.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/formly/field/selection/sourceselect/sourceselect.field.component.mjs +4 -4
- package/esm2022/lib/formly/field/selection/sourceselect/sourceselect.field.module.mjs +93 -0
- package/{esm2020 → esm2022}/lib/formly/field/texteditor/texteditor.field.component.mjs +6 -6
- package/esm2022/lib/formly/field/texteditor/texteditor.field.module.mjs +51 -0
- package/{esm2020 → esm2022}/lib/formly/field/value/array/array.field.component.mjs +8 -8
- package/esm2022/lib/formly/field/value/array/array.field.module.mjs +62 -0
- package/esm2022/lib/formly/field/value/boolean/boolean.field.mjs +47 -0
- package/{esm2020 → esm2022}/lib/formly/field/value/boolean/boolean.field.module.mjs +5 -5
- package/esm2022/lib/formly/field/value/date/date.field.module.mjs +96 -0
- package/esm2022/lib/formly/field/value/date/datetime.field.component.mjs +488 -0
- package/esm2022/lib/formly/field/value/date/datetime.field.mjs +141 -0
- package/{esm2020 → esm2022}/lib/formly/field/value/date/datetime.field.service.mjs +9 -9
- package/esm2022/lib/formly/field/value/date/fixeddaterange.field.component.mjs +506 -0
- package/{esm2020 → esm2022}/lib/formly/field/value/number/number.field.module.mjs +5 -5
- package/esm2022/lib/formly/field/value/phone/phone.field.component.mjs +100 -0
- package/esm2022/lib/formly/field/value/phone/phone.field.module.mjs +66 -0
- package/{esm2020 → esm2022}/lib/formly/field/value/text/text.field.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/formly/field/value/value.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/expandable.wrapper.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/expandable.wrapper.delegate.mjs +4 -4
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/flex.wrapper.component.mjs +6 -6
- package/esm2022/lib/formly/field/wrapper/form.wrapper.module.mjs +86 -0
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/info.wrapper.component.mjs +7 -7
- package/esm2022/lib/formly/field/wrapper/section.wrapper.component.mjs +27 -0
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/style.wrapper.component.mjs +7 -7
- package/esm2022/lib/formly/field/wrapper/subsection.wrapper.component.mjs +27 -0
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/toggle.wrapper.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/formly/field/wrapper/working.wrapper.component.mjs +6 -6
- package/esm2022/lib/formly/field/wrapper/wrapper.mjs +73 -0
- package/{esm2020 → esm2022}/lib/formly/form/form.form.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/formly/form/search.form.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/formly/formly.context.directive.mjs +4 -4
- package/esm2022/lib/formly/formly.context.mjs +100 -0
- package/{esm2020 → esm2022}/lib/formly/formly.directive.mjs +16 -16
- package/{esm2020 → esm2022}/lib/formly/formly.form.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/formly/formly.module.mjs +16 -16
- package/{esm2020 → esm2022}/lib/layout/form.layout.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/layout/form.spacer.component.mjs +6 -6
- package/{esm2020 → esm2022}/mapbox/lib/field/latlng/latlng.field.component.mjs +10 -10
- package/{esm2020 → esm2022}/mapbox/lib/field/latlng/latlng.field.marker.component.mjs +6 -6
- package/esm2022/mapbox/lib/field/latlng/latlng.field.mjs +35 -0
- package/esm2022/mapbox/lib/field/latlng/latlng.module.mjs +59 -0
- package/{mapbox/esm2020 → esm2022/mapbox}/lib/field/zoom/zoom.field.component.mjs +10 -10
- package/esm2022/mapbox/lib/field/zoom/zoom.field.mjs +23 -0
- package/esm2022/mapbox/lib/field/zoom/zoom.module.mjs +57 -0
- package/{mapbox/esm2020 → esm2022/mapbox}/lib/mapbox.module.mjs +5 -5
- package/{fesm2020 → fesm2022}/dereekb-dbx-form-calendar.mjs +188 -228
- package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -0
- package/{mapbox/fesm2020 → fesm2022}/dereekb-dbx-form-mapbox.mjs +76 -76
- package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/dereekb-dbx-form.mjs +820 -831
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -0
- package/lib/extension/_extension.scss +11 -6
- package/lib/extension/calendar/_calendar.scss +7 -5
- package/lib/form/_form.scss +3 -2
- package/lib/form/action/form.action.directive.d.ts +2 -2
- package/lib/form/action/transition/form.action.transition.safety.directive.d.ts +1 -1
- package/lib/form/form.angular.util.d.ts +1 -1
- package/lib/form/form.d.ts +1 -1
- package/lib/form/io/form.changes.directive.d.ts +1 -1
- package/lib/form/io/form.input.directive.d.ts +2 -2
- package/lib/form/io/form.loading.directive.d.ts +1 -1
- package/lib/formly/_formly.scss +7 -9
- package/lib/formly/field/_field.scss +7 -7
- package/lib/formly/field/checklist/_checklist.scss +3 -2
- package/lib/formly/field/checklist/checklist.field.d.ts +4 -4
- package/lib/formly/field/checklist/checklist.item.d.ts +1 -1
- package/lib/formly/field/checklist/checklist.item.field.component.d.ts +2 -2
- package/lib/formly/field/checklist/checklist.item.field.content.default.component.d.ts +4 -4
- package/lib/formly/field/checklist/checklist.item.field.d.ts +1 -1
- package/lib/formly/field/component/_component.scss +3 -2
- package/lib/formly/field/component/component.field.component.d.ts +2 -2
- package/lib/formly/field/component/component.field.d.ts +1 -1
- package/lib/formly/field/field.d.ts +5 -11
- package/lib/formly/field/selection/_selection.scss +5 -5
- package/lib/formly/field/selection/list/_list.scss +3 -2
- package/lib/formly/field/selection/list/list.field.component.d.ts +1 -1
- package/lib/formly/field/selection/pickable/_pickable.scss +3 -9
- package/lib/formly/field/selection/pickable/pickable.chip.field.component.d.ts +1 -1
- package/lib/formly/field/selection/pickable/pickable.d.ts +6 -22
- package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +3 -3
- package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +4 -4
- package/lib/formly/field/selection/pickable/pickable.util.d.ts +2 -2
- package/lib/formly/field/selection/searchable/_searchable.scss +5 -5
- package/lib/formly/field/selection/searchable/searchable.chip.field.component.d.ts +1 -1
- package/lib/formly/field/selection/searchable/searchable.d.ts +4 -4
- package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +3 -3
- package/lib/formly/field/selection/searchable/searchable.field.d.ts +1 -1
- package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +1 -1
- package/lib/formly/field/selection/searchable/searchable.text.field.component.d.ts +1 -1
- package/lib/formly/field/selection/selection.d.ts +1 -5
- package/lib/formly/field/selection/selection.field.d.ts +1 -1
- package/lib/formly/field/selection/sourceselect/_sourceselect.scss +6 -15
- package/lib/formly/field/selection/sourceselect/sourceselect.d.ts +6 -6
- package/lib/formly/field/selection/sourceselect/sourceselect.field.component.d.ts +1 -1
- package/lib/formly/field/selection/sourceselect/sourceselect.field.module.d.ts +1 -1
- package/lib/formly/field/texteditor/_texteditor.scss +3 -2
- package/lib/formly/field/texteditor/texteditor.field.component.d.ts +2 -2
- package/lib/formly/field/value/_value.scss +10 -6
- package/lib/formly/field/value/array/_array.scss +7 -2
- package/lib/formly/field/value/array/array.field.component.d.ts +2 -2
- package/lib/formly/field/value/boolean/_boolean.scss +5 -4
- package/lib/formly/field/value/date/_date.scss +20 -37
- package/lib/formly/field/value/date/date.field.module.d.ts +1 -1
- package/lib/formly/field/value/date/datetime.field.component.d.ts +3 -13
- package/lib/formly/field/value/date/datetime.field.d.ts +5 -5
- package/lib/formly/field/value/date/fixeddaterange.field.component.d.ts +7 -7
- package/lib/formly/field/value/hidden.field.d.ts +1 -1
- package/lib/formly/field/value/number/_number.scss +35 -0
- package/lib/formly/field/value/number/number.field.d.ts +3 -3
- package/lib/formly/field/value/phone/_phone.scss +4 -3
- package/lib/formly/field/value/phone/phone.field.component.d.ts +1 -1
- package/lib/formly/field/value/phone/phone.field.module.d.ts +1 -1
- package/lib/formly/field/value/text/_text.scss +3 -2
- package/lib/formly/field/value/text/text.additional.field.d.ts +3 -3
- package/lib/formly/field/value/text/text.field.d.ts +2 -2
- package/lib/formly/field/wrapper/_wrapper.scss +5 -4
- package/lib/formly/field/wrapper/autotouch.wrapper.component.d.ts +1 -1
- package/lib/formly/field/wrapper/expandable.wrapper.component.d.ts +2 -2
- package/lib/formly/field/wrapper/expandable.wrapper.delegate.d.ts +1 -1
- package/lib/formly/field/wrapper/flex.wrapper.component.d.ts +1 -1
- package/lib/formly/field/wrapper/form.wrapper.module.d.ts +1 -1
- package/lib/formly/field/wrapper/info.wrapper.component.d.ts +1 -1
- package/lib/formly/field/wrapper/section.wrapper.component.d.ts +2 -2
- package/lib/formly/field/wrapper/style.wrapper.component.d.ts +2 -2
- package/lib/formly/field/wrapper/subsection.wrapper.component.d.ts +2 -2
- package/lib/formly/field/wrapper/toggle.wrapper.component.d.ts +1 -1
- package/lib/formly/field/wrapper/working.wrapper.component.d.ts +2 -2
- package/lib/formly/field/wrapper/wrapper.d.ts +1 -1
- package/lib/formly/form/_form.scss +17 -4
- package/lib/formly/form/search.form.component.d.ts +1 -1
- package/lib/formly/formly.context.directive.d.ts +1 -1
- package/lib/formly/formly.directive.d.ts +4 -4
- package/lib/formly/formly.form.component.d.ts +1 -1
- package/lib/formly/template/login.d.ts +1 -1
- package/lib/formly/template/timezone.d.ts +1 -1
- package/lib/layout/_layout.scss +3 -2
- package/lib/layout/form.spacer.component.d.ts +1 -1
- package/lib/style/_all-typography.scss +11 -3
- package/lib/style/_core.scss +1 -2
- package/lib/style/_mixin.scss +10 -0
- package/lib/style/_theming.scss +1 -1
- package/lib/validator/available.d.ts +1 -1
- package/mapbox/{esm2020 → esm2022}/lib/field/latlng/latlng.field.component.mjs +10 -10
- package/mapbox/{esm2020 → esm2022}/lib/field/latlng/latlng.field.marker.component.mjs +6 -6
- package/mapbox/esm2022/lib/field/latlng/latlng.field.mjs +35 -0
- package/mapbox/esm2022/lib/field/latlng/latlng.module.mjs +59 -0
- package/{esm2020/mapbox → mapbox/esm2022}/lib/field/zoom/zoom.field.component.mjs +10 -10
- package/mapbox/esm2022/lib/field/zoom/zoom.field.mjs +23 -0
- package/mapbox/esm2022/lib/field/zoom/zoom.module.mjs +57 -0
- package/{esm2020/mapbox → mapbox/esm2022}/lib/mapbox.module.mjs +5 -5
- package/{fesm2020 → mapbox/fesm2022}/dereekb-dbx-form-mapbox.mjs +76 -76
- package/mapbox/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -0
- package/mapbox/lib/field/latlng/latlng.field.component.d.ts +1 -1
- package/mapbox/lib/field/latlng/latlng.field.marker.component.d.ts +1 -1
- package/mapbox/lib/field/zoom/zoom.field.component.d.ts +1 -1
- package/mapbox/package.json +10 -28
- package/package.json +31 -31
- package/esm2020/calendar/lib/calendar.module.mjs +0 -155
- package/esm2020/calendar/lib/calendar.schedule.selection.dialog.button.component.mjs +0 -38
- package/esm2020/calendar/lib/calendar.schedule.selection.dialog.component.mjs +0 -65
- package/esm2020/calendar/lib/calendar.schedule.selection.popover.component.mjs +0 -37
- package/esm2020/calendar/lib/calendar.schedule.selection.range.component.mjs +0 -188
- package/esm2020/calendar/lib/calendar.schedule.selection.store.mjs +0 -814
- package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.component.mjs +0 -158
- package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.mjs +0 -29
- package/esm2020/calendar/lib/field/schedule/calendar.schedule.module.mjs +0 -58
- package/esm2020/lib/formly/field/checklist/checklist.item.field.module.mjs +0 -67
- package/esm2020/lib/formly/field/component/component.field.module.mjs +0 -32
- package/esm2020/lib/formly/field/field.mjs +0 -103
- package/esm2020/lib/formly/field/selection/list/list.field.module.mjs +0 -76
- package/esm2020/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +0 -33
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.module.mjs +0 -93
- package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +0 -116
- package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +0 -68
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +0 -95
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.directive.mjs +0 -278
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.module.mjs +0 -91
- package/esm2020/lib/formly/field/selection/selection.field.mjs +0 -39
- package/esm2020/lib/formly/field/selection/sourceselect/sourceselect.field.module.mjs +0 -93
- package/esm2020/lib/formly/field/texteditor/texteditor.field.module.mjs +0 -51
- package/esm2020/lib/formly/field/value/array/array.field.module.mjs +0 -62
- package/esm2020/lib/formly/field/value/boolean/boolean.field.mjs +0 -47
- package/esm2020/lib/formly/field/value/date/date.field.module.mjs +0 -96
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +0 -488
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +0 -143
- package/esm2020/lib/formly/field/value/date/fixeddaterange.field.component.mjs +0 -506
- package/esm2020/lib/formly/field/value/phone/phone.field.component.mjs +0 -100
- package/esm2020/lib/formly/field/value/phone/phone.field.module.mjs +0 -66
- package/esm2020/lib/formly/field/wrapper/form.wrapper.module.mjs +0 -86
- package/esm2020/lib/formly/field/wrapper/section.wrapper.component.mjs +0 -26
- package/esm2020/lib/formly/field/wrapper/subsection.wrapper.component.mjs +0 -26
- package/esm2020/lib/formly/field/wrapper/wrapper.mjs +0 -78
- package/esm2020/lib/formly/formly.context.mjs +0 -100
- package/esm2020/mapbox/lib/field/latlng/latlng.field.mjs +0 -35
- package/esm2020/mapbox/lib/field/latlng/latlng.module.mjs +0 -59
- package/esm2020/mapbox/lib/field/zoom/zoom.field.mjs +0 -23
- package/esm2020/mapbox/lib/field/zoom/zoom.module.mjs +0 -57
- package/fesm2015/dereekb-dbx-form-calendar.mjs +0 -1955
- package/fesm2015/dereekb-dbx-form-calendar.mjs.map +0 -1
- package/fesm2015/dereekb-dbx-form-mapbox.mjs +0 -585
- package/fesm2015/dereekb-dbx-form-mapbox.mjs.map +0 -1
- package/fesm2015/dereekb-dbx-form.mjs +0 -6205
- package/fesm2015/dereekb-dbx-form.mjs.map +0 -1
- package/fesm2020/dereekb-dbx-form-calendar.mjs.map +0 -1
- package/fesm2020/dereekb-dbx-form-mapbox.mjs.map +0 -1
- package/fesm2020/dereekb-dbx-form.mjs.map +0 -1
- package/mapbox/esm2020/lib/field/latlng/latlng.field.mjs +0 -35
- package/mapbox/esm2020/lib/field/latlng/latlng.module.mjs +0 -59
- package/mapbox/esm2020/lib/field/zoom/zoom.field.mjs +0 -23
- package/mapbox/esm2020/lib/field/zoom/zoom.module.mjs +0 -57
- package/mapbox/fesm2015/dereekb-dbx-form-mapbox.mjs +0 -585
- package/mapbox/fesm2015/dereekb-dbx-form-mapbox.mjs.map +0 -1
- package/mapbox/fesm2020/dereekb-dbx-form-mapbox.mjs.map +0 -1
- /package/{esm2020 → esm2022}/calendar/dereekb-dbx-form-calendar.mjs +0 -0
- /package/{esm2020 → esm2022}/calendar/index.mjs +0 -0
- /package/{esm2020 → esm2022}/calendar/lib/calendar.schedule.selection.form.mjs +0 -0
- /package/{esm2020 → esm2022}/calendar/lib/field/index.mjs +0 -0
- /package/{esm2020 → esm2022}/calendar/lib/field/schedule/index.mjs +0 -0
- /package/{esm2020 → esm2022}/calendar/lib/index.mjs +0 -0
- /package/{esm2020 → esm2022}/dereekb-dbx-form.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/form/action/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/form/action/transition/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/form/form.angular.util.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/form/form.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/form/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/form/io/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/config/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/config/validation.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/checklist/checklist.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/checklist/checklist.item.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/checklist/checklist.item.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/checklist/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/component/component.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/component/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/list/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/list/list.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/pickable/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/pickable/pickable.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/pickable/pickable.util.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/searchable/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/searchable/searchable.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/searchable/searchable.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/searchable/text.chip.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/sourceselect/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/sourceselect/sourceselect.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/selection/sourceselect/sourceselect.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/texteditor/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/texteditor/texteditor.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/array/array.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/array/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/boolean/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/date/date.value.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/date/datetime.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/date/datetime.preset.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/date/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/hidden.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/number/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/number/number.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/phone/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/phone/phone.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/text/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/text/text.additional.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/text/text.address.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/value/text/text.field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/field/wrapper/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/form/form.form.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/form/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/template/available.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/template/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/template/login.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/formly/template/timezone.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/layout/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/validator/available.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/validator/boolean.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/validator/email.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/validator/field.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/validator/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/validator/number.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/validator/phone.mjs +0 -0
- /package/{esm2020 → esm2022}/mapbox/dereekb-dbx-form-mapbox.mjs +0 -0
- /package/{esm2020 → esm2022}/mapbox/index.mjs +0 -0
- /package/{esm2020 → esm2022}/mapbox/lib/field/index.mjs +0 -0
- /package/{esm2020 → esm2022}/mapbox/lib/field/latlng/index.mjs +0 -0
- /package/{esm2020 → esm2022}/mapbox/lib/field/zoom/index.mjs +0 -0
- /package/mapbox/{esm2020 → esm2022}/dereekb-dbx-form-mapbox.mjs +0 -0
- /package/mapbox/{esm2020 → esm2022}/index.mjs +0 -0
- /package/mapbox/{esm2020 → esm2022}/lib/field/index.mjs +0 -0
- /package/mapbox/{esm2020 → esm2022}/lib/field/latlng/index.mjs +0 -0
- /package/mapbox/{esm2020 → esm2022}/lib/field/zoom/index.mjs +0 -0
|
@@ -1,585 +0,0 @@
|
|
|
1
|
-
import { formlyField, propsAndConfigForFieldConfig, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, validatorsForFieldConfig, DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, styleWrapper } from '@dereekb/dbx-form';
|
|
2
|
-
import { LAT_LNG_PATTERN, isSameLatLngPoint, isDefaultLatLngPoint, isValidLatLngPoint, latLngStringFunction, latLngPointFunction, latLngPoint } from '@dereekb/util';
|
|
3
|
-
import * as i1 from '@dereekb/dbx-web';
|
|
4
|
-
import { mapCompactModeObs, DbxTextModule } from '@dereekb/dbx-web';
|
|
5
|
-
import * as i0 from '@angular/core';
|
|
6
|
-
import { Component, ChangeDetectionStrategy, Optional, NgModule } from '@angular/core';
|
|
7
|
-
import { FieldType } from '@ngx-formly/material';
|
|
8
|
-
import { combineLatest, map, shareReplay, BehaviorSubject, of, switchMap, startWith, distinctUntilChanged, skipWhile, filter, skip, throttleTime, first } from 'rxjs';
|
|
9
|
-
import { SubscriptionObject, filterMaybe, asObservableFromGetter } from '@dereekb/rxjs';
|
|
10
|
-
import * as i2 from '@dereekb/dbx-web/mapbox';
|
|
11
|
-
import { provideMapboxStoreIfParentIsUnavailable, DbxMapboxModule, mapboxZoomLevel, MAPBOX_MIN_ZOOM_LEVEL, MAPBOX_MAX_ZOOM_LEVEL } from '@dereekb/dbx-web/mapbox';
|
|
12
|
-
import * as i3 from '@angular/common';
|
|
13
|
-
import { CommonModule } from '@angular/common';
|
|
14
|
-
import * as i3$1 from '@ng-web-apis/geolocation';
|
|
15
|
-
import * as i5 from '@angular/material/icon';
|
|
16
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
17
|
-
import * as i6 from '@angular/material/button';
|
|
18
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
19
|
-
import * as i4 from '@angular/forms';
|
|
20
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
21
|
-
import * as i8 from '@angular/material/form-field';
|
|
22
|
-
import * as i9 from '@angular/material/input';
|
|
23
|
-
import { MatInputModule } from '@angular/material/input';
|
|
24
|
-
import * as i10 from 'ngx-mapbox-gl';
|
|
25
|
-
import { NgxMapboxGLModule } from 'ngx-mapbox-gl';
|
|
26
|
-
import * as i1$1 from '@ngx-formly/core';
|
|
27
|
-
import { FormlyModule } from '@ngx-formly/core';
|
|
28
|
-
|
|
29
|
-
function mapboxLatLngField(config = {}) {
|
|
30
|
-
var _a;
|
|
31
|
-
const { key = 'latLng', latLngConfig, showMap, zoom, recenterTime, showCenterButton, setCenterOnLocationSet, selectLocationOnMapDrag, selectLocationOnMapClick, markerConfig } = config;
|
|
32
|
-
const fieldConfig = Object.assign(Object.assign({}, formlyField(Object.assign({ key, type: 'mapbox-latlng-picker' }, propsAndConfigForFieldConfig(config, {
|
|
33
|
-
label: (_a = config.label) !== null && _a !== void 0 ? _a : 'Location',
|
|
34
|
-
placeholder: DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER,
|
|
35
|
-
pattern: LAT_LNG_PATTERN,
|
|
36
|
-
autocomplete: false,
|
|
37
|
-
showMap,
|
|
38
|
-
zoom,
|
|
39
|
-
latLngConfig,
|
|
40
|
-
recenterTime,
|
|
41
|
-
selectLocationOnMapDrag,
|
|
42
|
-
selectLocationOnMapClick,
|
|
43
|
-
showCenterButton,
|
|
44
|
-
setCenterOnLocationSet,
|
|
45
|
-
markerConfig
|
|
46
|
-
})))), validatorsForFieldConfig({
|
|
47
|
-
messages: {
|
|
48
|
-
pattern: DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE
|
|
49
|
-
}
|
|
50
|
-
}));
|
|
51
|
-
return styleWrapper(fieldConfig, {
|
|
52
|
-
classGetter: 'dbx-mat-form-field-disable-underline'
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
class DbxFormMapboxLatLngFieldMarkerComponent {
|
|
57
|
-
constructor(fieldComponent) {
|
|
58
|
-
this.fieldComponent = fieldComponent;
|
|
59
|
-
this.marker$ = combineLatest([this.fieldComponent.latLng$, this.fieldComponent.markerConfig$]).pipe(map(([latLng, markerConfig]) => {
|
|
60
|
-
if (markerConfig !== false) {
|
|
61
|
-
return Object.assign({ latLng }, markerConfig);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
return undefined;
|
|
65
|
-
}
|
|
66
|
-
}), shareReplay(1));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
DbxFormMapboxLatLngFieldMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngFieldMarkerComponent, deps: [{ token: DbxFormMapboxLatLngFieldComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
DbxFormMapboxLatLngFieldMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFormMapboxLatLngFieldMarkerComponent, selector: "ng-component", ngImport: i0, template: `
|
|
71
|
-
<dbx-mapbox-marker [marker]="marker$ | async"></dbx-mapbox-marker>
|
|
72
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i2.DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: ["marker"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngFieldMarkerComponent, decorators: [{
|
|
74
|
-
type: Component,
|
|
75
|
-
args: [{
|
|
76
|
-
template: `
|
|
77
|
-
<dbx-mapbox-marker [marker]="marker$ | async"></dbx-mapbox-marker>
|
|
78
|
-
`,
|
|
79
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
80
|
-
}]
|
|
81
|
-
}], ctorParameters: function () { return [{ type: DbxFormMapboxLatLngFieldComponent }]; } });
|
|
82
|
-
|
|
83
|
-
const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = 'DbxFormMapboxLatLngFieldComponent';
|
|
84
|
-
const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG = {
|
|
85
|
-
icon: 'pin_drop'
|
|
86
|
-
};
|
|
87
|
-
/*
|
|
88
|
-
TODO: Re-add menu for picking a new location, including using the current location.
|
|
89
|
-
<button mat-icon-button (click)="useCurrentLocation()" [disabled]="isReadonlyOrDisabled || (useCurrentLocationDisabled$ | async)">
|
|
90
|
-
<mat-icon>my_location</mat-icon>
|
|
91
|
-
</button>
|
|
92
|
-
*/
|
|
93
|
-
class DbxFormMapboxLatLngFieldComponent extends FieldType {
|
|
94
|
-
constructor(
|
|
95
|
-
//
|
|
96
|
-
compact, dbxMapboxInjectionStore, geolocation$, dbxMapboxMapStore, ngZone, injector) {
|
|
97
|
-
var _a;
|
|
98
|
-
super();
|
|
99
|
-
this.compact = compact;
|
|
100
|
-
this.dbxMapboxInjectionStore = dbxMapboxInjectionStore;
|
|
101
|
-
this.geolocation$ = geolocation$;
|
|
102
|
-
this.dbxMapboxMapStore = dbxMapboxMapStore;
|
|
103
|
-
this.ngZone = ngZone;
|
|
104
|
-
this.injector = injector;
|
|
105
|
-
this.compactClass$ = mapCompactModeObs((_a = this.compact) === null || _a === void 0 ? void 0 : _a.mode$, {
|
|
106
|
-
compact: 'dbx-mapbox-input-field-compact'
|
|
107
|
-
});
|
|
108
|
-
this._useCurrentLocationDisabled = new BehaviorSubject(false);
|
|
109
|
-
this.useCurrentLocationDisabled$ = this._useCurrentLocationDisabled.asObservable();
|
|
110
|
-
this._sub = new SubscriptionObject();
|
|
111
|
-
this._geoSub = new SubscriptionObject();
|
|
112
|
-
this._centerSub = new SubscriptionObject();
|
|
113
|
-
this._flyToCenterSub = new SubscriptionObject();
|
|
114
|
-
this._clickSub = new SubscriptionObject();
|
|
115
|
-
this._zoom = new BehaviorSubject(12);
|
|
116
|
-
this._markerConfig = new BehaviorSubject(of(DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG));
|
|
117
|
-
this._formControlObs = new BehaviorSubject(undefined);
|
|
118
|
-
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
119
|
-
this.value$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), shareReplay(1));
|
|
120
|
-
this.latLng$ = this.value$.pipe(filterMaybe(), map((x) => this._latLngPointFunction(x)), distinctUntilChanged(isSameLatLngPoint), shareReplay(1));
|
|
121
|
-
this.nonZeroLatLng$ = this.latLng$.pipe(
|
|
122
|
-
/**
|
|
123
|
-
* Center observable passed to the store. Do not pass invalid points.
|
|
124
|
-
*
|
|
125
|
-
* Also skip any initial 0,0 values so the center doesn't potentially "whip" from 0,0 to a final loaded value.
|
|
126
|
-
*/
|
|
127
|
-
skipWhile(isDefaultLatLngPoint), filter(isValidLatLngPoint));
|
|
128
|
-
this.zoom$ = this._zoom.asObservable();
|
|
129
|
-
this.markerConfig$ = this._markerConfig.asObservable().pipe(switchMap((x) => x), shareReplay(1));
|
|
130
|
-
}
|
|
131
|
-
get zoom() {
|
|
132
|
-
return Math.min(this.field.props.zoom || 12, 18);
|
|
133
|
-
}
|
|
134
|
-
get formGroupName() {
|
|
135
|
-
return this.field.key;
|
|
136
|
-
}
|
|
137
|
-
get formGroup() {
|
|
138
|
-
return this.form;
|
|
139
|
-
}
|
|
140
|
-
get label() {
|
|
141
|
-
var _a;
|
|
142
|
-
return (_a = this.field.props) === null || _a === void 0 ? void 0 : _a.label;
|
|
143
|
-
}
|
|
144
|
-
get description() {
|
|
145
|
-
return this.props.description;
|
|
146
|
-
}
|
|
147
|
-
get isReadonlyOrDisabled() {
|
|
148
|
-
return this.props.readonly || this.disabled;
|
|
149
|
-
}
|
|
150
|
-
get showMap() {
|
|
151
|
-
var _a;
|
|
152
|
-
return (_a = this.field.props.showMap) !== null && _a !== void 0 ? _a : true;
|
|
153
|
-
}
|
|
154
|
-
get selectLocationOnMapDrag() {
|
|
155
|
-
var _a;
|
|
156
|
-
return (_a = this.field.props.selectLocationOnMapDrag) !== null && _a !== void 0 ? _a : true;
|
|
157
|
-
}
|
|
158
|
-
get selectLocationOnMapClick() {
|
|
159
|
-
var _a;
|
|
160
|
-
return (_a = this.field.props.selectLocationOnMapClick) !== null && _a !== void 0 ? _a : false;
|
|
161
|
-
}
|
|
162
|
-
get setCenterOnLocationSet() {
|
|
163
|
-
var _a;
|
|
164
|
-
return (_a = this.field.props.setCenterOnLocationSet) !== null && _a !== void 0 ? _a : true;
|
|
165
|
-
}
|
|
166
|
-
get showCenterButton() {
|
|
167
|
-
return !this.selectLocationOnMapDrag && this.props.showCenterButton !== false;
|
|
168
|
-
}
|
|
169
|
-
get recenterTime() {
|
|
170
|
-
return this.field.props.recenterTime || 10 * 1000;
|
|
171
|
-
}
|
|
172
|
-
get useCurrentLocationDisabled() {
|
|
173
|
-
return this._useCurrentLocationDisabled;
|
|
174
|
-
}
|
|
175
|
-
get mapInjectionKey() {
|
|
176
|
-
return this.field.props.mapInjectionKey;
|
|
177
|
-
}
|
|
178
|
-
get markerConfig() {
|
|
179
|
-
return this.field.props.markerConfig;
|
|
180
|
-
}
|
|
181
|
-
ngOnInit() {
|
|
182
|
-
var _a, _b, _c, _d;
|
|
183
|
-
const latLngPointConfig = Object.assign(Object.assign({}, this.field.props.latLngConfig), { wrap: ((_a = this.field.props.latLngConfig) === null || _a === void 0 ? void 0 : _a.wrap) || false, validate: ((_b = this.field.props.latLngConfig) === null || _b === void 0 ? void 0 : _b.validate) || false, precisionRounding: (_d = (_c = this.field.props.latLngConfig) === null || _c === void 0 ? void 0 : _c.precisionRounding) !== null && _d !== void 0 ? _d : 'round' });
|
|
184
|
-
this._latLngStringFunction = latLngStringFunction(latLngPointConfig);
|
|
185
|
-
this._latLngPointFunction = latLngPointFunction(latLngPointConfig);
|
|
186
|
-
this._formControlObs.next(this.formControl);
|
|
187
|
-
this._zoom.next(this.zoom);
|
|
188
|
-
if (this.setCenterOnLocationSet) {
|
|
189
|
-
this._centerSub.subscription = this.dbxMapboxMapStore.setCenter(this.nonZeroLatLng$);
|
|
190
|
-
}
|
|
191
|
-
if (this.showMap) {
|
|
192
|
-
// Set zoom only if showMap is true
|
|
193
|
-
this.dbxMapboxMapStore.setZoom(this.zoom$);
|
|
194
|
-
// recenter periodically
|
|
195
|
-
if (this.recenterTime > 0) {
|
|
196
|
-
this._flyToCenterSub.subscription = this.dbxMapboxMapStore.center$.pipe(skip(1), throttleTime(this.recenterTime, undefined, { leading: false, trailing: true })).subscribe(() => {
|
|
197
|
-
this.flyToMarker();
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
// use the center of the map to set locations
|
|
203
|
-
if (this.selectLocationOnMapDrag) {
|
|
204
|
-
this._sub.subscription = this.dbxMapboxMapStore.center$.subscribe((center) => {
|
|
205
|
-
this.dbxMapboxMapStore.centerGivenMargin$.pipe(first()).subscribe(() => {
|
|
206
|
-
if (!this.isReadonlyOrDisabled) {
|
|
207
|
-
this.ngZone.run(() => {
|
|
208
|
-
this.setValue(center);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
// enable selecting the location on a map click
|
|
215
|
-
if (this.selectLocationOnMapClick) {
|
|
216
|
-
this._clickSub.subscription = this.dbxMapboxMapStore.clickEvent$.subscribe((x) => {
|
|
217
|
-
if ((x === null || x === void 0 ? void 0 : x.type) === 'click') {
|
|
218
|
-
this.setValue(x.lngLat);
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
if (this.props.readonly) {
|
|
224
|
-
this.formControl.disable();
|
|
225
|
-
}
|
|
226
|
-
// Add the marker to the injection store for display
|
|
227
|
-
if (this.dbxMapboxInjectionStore) {
|
|
228
|
-
if (this.markerConfig != null) {
|
|
229
|
-
this._markerConfig.next(this.markerConfig === false ? of(false) : asObservableFromGetter(this.markerConfig, this));
|
|
230
|
-
}
|
|
231
|
-
this.dbxMapboxInjectionStore.addInjectionConfig({
|
|
232
|
-
key: this.mapInjectionKey || DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY,
|
|
233
|
-
injectionConfig: {
|
|
234
|
-
componentClass: DbxFormMapboxLatLngFieldMarkerComponent,
|
|
235
|
-
providers: [{ provide: DbxFormMapboxLatLngFieldComponent, useValue: this }]
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
ngOnDestroy() {
|
|
241
|
-
super.ngOnDestroy();
|
|
242
|
-
this._zoom.complete();
|
|
243
|
-
this._markerConfig.complete();
|
|
244
|
-
this._formControlObs.complete();
|
|
245
|
-
this._sub.destroy();
|
|
246
|
-
this._geoSub.destroy();
|
|
247
|
-
this._centerSub.destroy();
|
|
248
|
-
this._flyToCenterSub.destroy();
|
|
249
|
-
this._clickSub.destroy();
|
|
250
|
-
}
|
|
251
|
-
flyToMarker() {
|
|
252
|
-
this.dbxMapboxMapStore.easeTo(this.nonZeroLatLng$.pipe(first(), map((x) => ({ center: x }))));
|
|
253
|
-
}
|
|
254
|
-
useCurrentLocation() {
|
|
255
|
-
this._geoSub.subscription = this.geolocation$.pipe(first()).subscribe({
|
|
256
|
-
next: (position) => {
|
|
257
|
-
if (position) {
|
|
258
|
-
const { latitude: lat, longitude: lng } = position.coords;
|
|
259
|
-
this.setValue({ lat, lng });
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
error: () => {
|
|
263
|
-
this._useCurrentLocationDisabled.next(true);
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
onMarkerDragEnd(marker) {
|
|
268
|
-
this.setValue(marker.getLngLat());
|
|
269
|
-
}
|
|
270
|
-
setValue(latLng) {
|
|
271
|
-
this.formControl.setValue(latLng ? this._latLngStringFunction(latLng) : latLng);
|
|
272
|
-
this.formControl.markAsTouched();
|
|
273
|
-
this.formControl.markAsDirty();
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
DbxFormMapboxLatLngFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngFieldComponent, deps: [{ token: i1.CompactContextStore, optional: true }, { token: i2.DbxMapboxInjectionStore, optional: true }, { token: i3$1.GeolocationService }, { token: i2.DbxMapboxMapStore }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
277
|
-
DbxFormMapboxLatLngFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFormMapboxLatLngFieldComponent, selector: "ng-component", providers: [provideMapboxStoreIfParentIsUnavailable()], usesInheritance: true, ngImport: i0, template: `
|
|
278
|
-
<div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
|
|
279
|
-
<div *ngIf="showMap" class="dbx-mapbox-input-field-map">
|
|
280
|
-
<mgl-map dbxMapboxMap>
|
|
281
|
-
<mgl-marker [lngLat]="(latLng$ | async) || [0, 0]" [draggable]="!isReadonlyOrDisabled" (markerDragEnd)="onMarkerDragEnd($event)"></mgl-marker>
|
|
282
|
-
</mgl-map>
|
|
283
|
-
</div>
|
|
284
|
-
<div class="dbx-mapbox-input-field-input">
|
|
285
|
-
<button *ngIf="showCenterButton" mat-icon-button (click)="flyToMarker()">
|
|
286
|
-
<mat-icon>my_location</mat-icon>
|
|
287
|
-
</button>
|
|
288
|
-
<mat-form-field class="dbx-mapbox-input-field-input-field" appearance="standard">
|
|
289
|
-
<mat-label>Coordinates</mat-label>
|
|
290
|
-
<input type="text" matInput [placeholder]="placeholder" [formControl]="formControl" />
|
|
291
|
-
<mat-hint class="dbx-hint dbx-warn" *ngIf="useCurrentLocationDisabled$ | async">Could not access your current location.</mat-hint>
|
|
292
|
-
</mat-form-field>
|
|
293
|
-
</div>
|
|
294
|
-
</div>
|
|
295
|
-
`, isInline: true, styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.DbxMapboxMapDirective, selector: "[dbxMapboxMap]" }, { kind: "directive", 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]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MapComponent, selector: "mgl-map", inputs: ["accessToken", "collectResourceTiming", "crossSourceCollisions", "customMapboxApiUrl", "fadeDuration", "hash", "refreshExpiredTiles", "failIfMajorPerformanceCaveat", "bearingSnap", "interactive", "pitchWithRotate", "clickTolerance", "attributionControl", "logoPosition", "maxTileCacheSize", "localIdeographFontFamily", "preserveDrawingBuffer", "trackResize", "transformRequest", "bounds", "antialias", "locale", "minZoom", "maxZoom", "minPitch", "maxPitch", "scrollZoom", "dragRotate", "touchPitch", "touchZoomRotate", "doubleClickZoom", "keyboard", "dragPan", "boxZoom", "style", "center", "maxBounds", "zoom", "bearing", "pitch", "fitBoundsOptions", "renderWorldCopies", "projection", "movingMethod", "movingOptions", "fitBounds", "fitScreenCoordinates", "centerWithPanTo", "panToOptions", "cursorStyle"], outputs: ["mapResize", "mapRemove", "mapMouseDown", "mapMouseUp", "mapMouseMove", "mapClick", "mapDblClick", "mapMouseOver", "mapMouseOut", "mapContextMenu", "mapTouchStart", "mapTouchEnd", "mapTouchMove", "mapTouchCancel", "mapWheel", "moveStart", "move", "moveEnd", "mapDragStart", "mapDrag", "mapDragEnd", "zoomStart", "zoomEvt", "zoomEnd", "rotateStart", "rotate", "rotateEnd", "pitchStart", "pitchEvt", "pitchEnd", "boxZoomStart", "boxZoomEnd", "boxZoomCancel", "webGlContextLost", "webGlContextRestored", "mapLoad", "idle", "render", "mapError", "data", "styleData", "sourceData", "dataLoading", "styleDataLoading", "sourceDataLoading", "styleImageMissing", "resize", "remove", "mouseDown", "mouseUp", "mouseMove", "click", "dblClick", "mouseOver", "mouseOut", "contextMenu", "touchStart", "touchEnd", "touchMove", "touchCancel", "wheel", "dragStart", "drag", "dragEnd", "load", "error"] }, { kind: "component", type: i10.MarkerComponent, selector: "mgl-marker", inputs: ["offset", "anchor", "clickTolerance", "feature", "lngLat", "draggable", "popupShown", "className", "pitchAlignment", "rotationAlignment"], outputs: ["markerDragStart", "markerDragEnd", "markerDrag", "dragStart", "dragEnd", "drag"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] });
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngFieldComponent, decorators: [{
|
|
297
|
-
type: Component,
|
|
298
|
-
args: [{ template: `
|
|
299
|
-
<div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
|
|
300
|
-
<div *ngIf="showMap" class="dbx-mapbox-input-field-map">
|
|
301
|
-
<mgl-map dbxMapboxMap>
|
|
302
|
-
<mgl-marker [lngLat]="(latLng$ | async) || [0, 0]" [draggable]="!isReadonlyOrDisabled" (markerDragEnd)="onMarkerDragEnd($event)"></mgl-marker>
|
|
303
|
-
</mgl-map>
|
|
304
|
-
</div>
|
|
305
|
-
<div class="dbx-mapbox-input-field-input">
|
|
306
|
-
<button *ngIf="showCenterButton" mat-icon-button (click)="flyToMarker()">
|
|
307
|
-
<mat-icon>my_location</mat-icon>
|
|
308
|
-
</button>
|
|
309
|
-
<mat-form-field class="dbx-mapbox-input-field-input-field" appearance="standard">
|
|
310
|
-
<mat-label>Coordinates</mat-label>
|
|
311
|
-
<input type="text" matInput [placeholder]="placeholder" [formControl]="formControl" />
|
|
312
|
-
<mat-hint class="dbx-hint dbx-warn" *ngIf="useCurrentLocationDisabled$ | async">Could not access your current location.</mat-hint>
|
|
313
|
-
</mat-form-field>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
`, providers: [provideMapboxStoreIfParentIsUnavailable()], styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"] }]
|
|
317
|
-
}], ctorParameters: function () {
|
|
318
|
-
return [{ type: i1.CompactContextStore, decorators: [{
|
|
319
|
-
type: Optional
|
|
320
|
-
}] }, { type: i2.DbxMapboxInjectionStore, decorators: [{
|
|
321
|
-
type: Optional
|
|
322
|
-
}] }, { type: i3$1.GeolocationService }, { type: i2.DbxMapboxMapStore }, { type: i0.NgZone }, { type: i0.Injector }];
|
|
323
|
-
} });
|
|
324
|
-
|
|
325
|
-
class DbxFormMapboxLatLngModule {
|
|
326
|
-
}
|
|
327
|
-
DbxFormMapboxLatLngModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
328
|
-
DbxFormMapboxLatLngModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngModule, declarations: [DbxFormMapboxLatLngFieldComponent, DbxFormMapboxLatLngFieldMarkerComponent], imports: [CommonModule,
|
|
329
|
-
MatIconModule,
|
|
330
|
-
MatButtonModule,
|
|
331
|
-
DbxTextModule,
|
|
332
|
-
DbxMapboxModule,
|
|
333
|
-
FormsModule,
|
|
334
|
-
ReactiveFormsModule,
|
|
335
|
-
MatInputModule, i1$1.FormlyModule, NgxMapboxGLModule], exports: [DbxFormMapboxLatLngFieldMarkerComponent] });
|
|
336
|
-
DbxFormMapboxLatLngModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngModule, imports: [CommonModule,
|
|
337
|
-
MatIconModule,
|
|
338
|
-
MatButtonModule,
|
|
339
|
-
DbxTextModule,
|
|
340
|
-
DbxMapboxModule,
|
|
341
|
-
FormsModule,
|
|
342
|
-
ReactiveFormsModule,
|
|
343
|
-
MatInputModule,
|
|
344
|
-
FormlyModule.forChild({
|
|
345
|
-
types: [{ name: 'mapbox-latlng-picker', component: DbxFormMapboxLatLngFieldComponent, wrappers: ['style', 'form-field'] }]
|
|
346
|
-
}),
|
|
347
|
-
NgxMapboxGLModule] });
|
|
348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxLatLngModule, decorators: [{
|
|
349
|
-
type: NgModule,
|
|
350
|
-
args: [{
|
|
351
|
-
imports: [
|
|
352
|
-
CommonModule,
|
|
353
|
-
MatIconModule,
|
|
354
|
-
MatButtonModule,
|
|
355
|
-
DbxTextModule,
|
|
356
|
-
DbxMapboxModule,
|
|
357
|
-
FormsModule,
|
|
358
|
-
ReactiveFormsModule,
|
|
359
|
-
MatInputModule,
|
|
360
|
-
FormlyModule.forChild({
|
|
361
|
-
types: [{ name: 'mapbox-latlng-picker', component: DbxFormMapboxLatLngFieldComponent, wrappers: ['style', 'form-field'] }]
|
|
362
|
-
}),
|
|
363
|
-
NgxMapboxGLModule
|
|
364
|
-
],
|
|
365
|
-
declarations: [DbxFormMapboxLatLngFieldComponent, DbxFormMapboxLatLngFieldMarkerComponent],
|
|
366
|
-
exports: [DbxFormMapboxLatLngFieldMarkerComponent]
|
|
367
|
-
}]
|
|
368
|
-
}] });
|
|
369
|
-
|
|
370
|
-
function mapboxZoomField(config = {}) {
|
|
371
|
-
var _a;
|
|
372
|
-
const { key = 'zoom', showMap, center, minZoom, maxZoom, zoomStep } = config;
|
|
373
|
-
const fieldConfig = Object.assign({}, formlyField(Object.assign({ key, type: 'mapbox-zoom-picker' }, propsAndConfigForFieldConfig(config, {
|
|
374
|
-
label: (_a = config.label) !== null && _a !== void 0 ? _a : 'Zoom',
|
|
375
|
-
autocomplete: false,
|
|
376
|
-
showMap,
|
|
377
|
-
center,
|
|
378
|
-
minZoom,
|
|
379
|
-
maxZoom,
|
|
380
|
-
zoomStep
|
|
381
|
-
}))));
|
|
382
|
-
return styleWrapper(fieldConfig, {
|
|
383
|
-
classGetter: 'dbx-mat-form-field-disable-underline'
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
class DbxFormMapboxZoomFieldComponent extends FieldType {
|
|
388
|
-
constructor(compact, dbxMapboxService, dbxMapboxMapStore, ngZone) {
|
|
389
|
-
var _a;
|
|
390
|
-
super();
|
|
391
|
-
this.compact = compact;
|
|
392
|
-
this.dbxMapboxService = dbxMapboxService;
|
|
393
|
-
this.dbxMapboxMapStore = dbxMapboxMapStore;
|
|
394
|
-
this.ngZone = ngZone;
|
|
395
|
-
this._undoZoomLimit = false;
|
|
396
|
-
this.compactClass$ = mapCompactModeObs((_a = this.compact) === null || _a === void 0 ? void 0 : _a.mode$, {
|
|
397
|
-
compact: 'dbx-mapbox-input-field-compact'
|
|
398
|
-
});
|
|
399
|
-
this._sub = new SubscriptionObject();
|
|
400
|
-
this._center = new BehaviorSubject(undefined);
|
|
401
|
-
this._formControlObs = new BehaviorSubject(undefined);
|
|
402
|
-
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
403
|
-
this.value$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), shareReplay(1));
|
|
404
|
-
this.zoom$ = this.value$.pipe(filterMaybe(), shareReplay(1));
|
|
405
|
-
this.center$ = this._center.pipe(filterMaybe());
|
|
406
|
-
}
|
|
407
|
-
get center() {
|
|
408
|
-
return this.field.props.center || latLngPoint(this.dbxMapboxService.defaultCenter);
|
|
409
|
-
}
|
|
410
|
-
get formGroupName() {
|
|
411
|
-
return this.field.key;
|
|
412
|
-
}
|
|
413
|
-
get formGroup() {
|
|
414
|
-
return this.form;
|
|
415
|
-
}
|
|
416
|
-
get label() {
|
|
417
|
-
var _a;
|
|
418
|
-
return (_a = this.field.props) === null || _a === void 0 ? void 0 : _a.label;
|
|
419
|
-
}
|
|
420
|
-
get description() {
|
|
421
|
-
return this.props.description;
|
|
422
|
-
}
|
|
423
|
-
get isReadonlyOrDisabled() {
|
|
424
|
-
return this.props.readonly || this.disabled;
|
|
425
|
-
}
|
|
426
|
-
get showMap() {
|
|
427
|
-
var _a;
|
|
428
|
-
return (_a = this.field.props.showMap) !== null && _a !== void 0 ? _a : true;
|
|
429
|
-
}
|
|
430
|
-
get lockMapToZoomLevels() {
|
|
431
|
-
var _a;
|
|
432
|
-
return (_a = this.field.props.lockMapToZoomLevels) !== null && _a !== void 0 ? _a : false;
|
|
433
|
-
}
|
|
434
|
-
get minZoom() {
|
|
435
|
-
return mapboxZoomLevel(this.field.props.minZoom || MAPBOX_MIN_ZOOM_LEVEL);
|
|
436
|
-
}
|
|
437
|
-
get maxZoom() {
|
|
438
|
-
return mapboxZoomLevel(this.field.props.maxZoom || MAPBOX_MAX_ZOOM_LEVEL);
|
|
439
|
-
}
|
|
440
|
-
get zoomStep() {
|
|
441
|
-
return mapboxZoomLevel(this.field.props.zoomStep || 1);
|
|
442
|
-
}
|
|
443
|
-
ngOnInit() {
|
|
444
|
-
this._formControlObs.next(this.formControl);
|
|
445
|
-
this._center.next(this.center);
|
|
446
|
-
// set/sync props for error messages
|
|
447
|
-
this.props.min = this.minZoom;
|
|
448
|
-
this.props.max = this.maxZoom;
|
|
449
|
-
this.dbxMapboxMapStore.setZoom(this.zoom$);
|
|
450
|
-
// Set center only if showMap is false.
|
|
451
|
-
if (this.showMap) {
|
|
452
|
-
this.dbxMapboxMapStore.setCenter(this.center$);
|
|
453
|
-
}
|
|
454
|
-
if (this.props.readonly) {
|
|
455
|
-
this.formControl.disable();
|
|
456
|
-
if (this.showMap) {
|
|
457
|
-
this.dbxMapboxMapStore.setZoomDisabled();
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
else if (this.lockMapToZoomLevels) {
|
|
461
|
-
// set zoom limits on the map
|
|
462
|
-
this.dbxMapboxMapStore.setZoomRange({ min: this.minZoom, max: this.maxZoom });
|
|
463
|
-
// flat to undo them later if not using the same map
|
|
464
|
-
this._undoZoomLimit = !this.showMap;
|
|
465
|
-
}
|
|
466
|
-
this._sub.subscription = this.dbxMapboxMapStore.zoom$.subscribe((zoom) => {
|
|
467
|
-
if (!this.isReadonlyOrDisabled) {
|
|
468
|
-
this.ngZone.run(() => {
|
|
469
|
-
this.setValue(zoom);
|
|
470
|
-
});
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
ngOnDestroy() {
|
|
475
|
-
super.ngOnDestroy();
|
|
476
|
-
this._formControlObs.complete();
|
|
477
|
-
this._center.complete();
|
|
478
|
-
this._sub.destroy();
|
|
479
|
-
if (!this._undoZoomLimit) {
|
|
480
|
-
this.dbxMapboxMapStore.setZoomRange({});
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
setValue(zoom) {
|
|
484
|
-
this.formControl.setValue(zoom);
|
|
485
|
-
this.formControl.markAsTouched();
|
|
486
|
-
this.formControl.markAsDirty();
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
DbxFormMapboxZoomFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxZoomFieldComponent, deps: [{ token: i1.CompactContextStore, optional: true }, { token: i2.DbxMapboxService }, { token: i2.DbxMapboxMapStore }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
490
|
-
DbxFormMapboxZoomFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFormMapboxZoomFieldComponent, selector: "ng-component", providers: [provideMapboxStoreIfParentIsUnavailable()], usesInheritance: true, ngImport: i0, template: `
|
|
491
|
-
<div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
|
|
492
|
-
<div *ngIf="showMap" class="dbx-mapbox-input-field-map">
|
|
493
|
-
<mgl-map dbxMapboxMap></mgl-map>
|
|
494
|
-
</div>
|
|
495
|
-
<div class="dbx-mapbox-input-field-input">
|
|
496
|
-
<mat-form-field class="dbx-mapbox-input-field-input-field" appearance="standard">
|
|
497
|
-
<mat-label>Zoom Level</mat-label>
|
|
498
|
-
<input type="number" matInput [min]="minZoom" [max]="maxZoom" [step]="zoomStep" [placeholder]="placeholder" [formControl]="formControl" />
|
|
499
|
-
</mat-form-field>
|
|
500
|
-
</div>
|
|
501
|
-
</div>
|
|
502
|
-
`, isInline: true, styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DbxMapboxMapDirective, selector: "[dbxMapboxMap]" }, { kind: "directive", 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]" }, { kind: "directive", type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MapComponent, selector: "mgl-map", inputs: ["accessToken", "collectResourceTiming", "crossSourceCollisions", "customMapboxApiUrl", "fadeDuration", "hash", "refreshExpiredTiles", "failIfMajorPerformanceCaveat", "bearingSnap", "interactive", "pitchWithRotate", "clickTolerance", "attributionControl", "logoPosition", "maxTileCacheSize", "localIdeographFontFamily", "preserveDrawingBuffer", "trackResize", "transformRequest", "bounds", "antialias", "locale", "minZoom", "maxZoom", "minPitch", "maxPitch", "scrollZoom", "dragRotate", "touchPitch", "touchZoomRotate", "doubleClickZoom", "keyboard", "dragPan", "boxZoom", "style", "center", "maxBounds", "zoom", "bearing", "pitch", "fitBoundsOptions", "renderWorldCopies", "projection", "movingMethod", "movingOptions", "fitBounds", "fitScreenCoordinates", "centerWithPanTo", "panToOptions", "cursorStyle"], outputs: ["mapResize", "mapRemove", "mapMouseDown", "mapMouseUp", "mapMouseMove", "mapClick", "mapDblClick", "mapMouseOver", "mapMouseOut", "mapContextMenu", "mapTouchStart", "mapTouchEnd", "mapTouchMove", "mapTouchCancel", "mapWheel", "moveStart", "move", "moveEnd", "mapDragStart", "mapDrag", "mapDragEnd", "zoomStart", "zoomEvt", "zoomEnd", "rotateStart", "rotate", "rotateEnd", "pitchStart", "pitchEvt", "pitchEnd", "boxZoomStart", "boxZoomEnd", "boxZoomCancel", "webGlContextLost", "webGlContextRestored", "mapLoad", "idle", "render", "mapError", "data", "styleData", "sourceData", "dataLoading", "styleDataLoading", "sourceDataLoading", "styleImageMissing", "resize", "remove", "mouseDown", "mouseUp", "mouseMove", "click", "dblClick", "mouseOver", "mouseOut", "contextMenu", "touchStart", "touchEnd", "touchMove", "touchCancel", "wheel", "dragStart", "drag", "dragEnd", "load", "error"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] });
|
|
503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxZoomFieldComponent, decorators: [{
|
|
504
|
-
type: Component,
|
|
505
|
-
args: [{ template: `
|
|
506
|
-
<div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
|
|
507
|
-
<div *ngIf="showMap" class="dbx-mapbox-input-field-map">
|
|
508
|
-
<mgl-map dbxMapboxMap></mgl-map>
|
|
509
|
-
</div>
|
|
510
|
-
<div class="dbx-mapbox-input-field-input">
|
|
511
|
-
<mat-form-field class="dbx-mapbox-input-field-input-field" appearance="standard">
|
|
512
|
-
<mat-label>Zoom Level</mat-label>
|
|
513
|
-
<input type="number" matInput [min]="minZoom" [max]="maxZoom" [step]="zoomStep" [placeholder]="placeholder" [formControl]="formControl" />
|
|
514
|
-
</mat-form-field>
|
|
515
|
-
</div>
|
|
516
|
-
</div>
|
|
517
|
-
`, providers: [provideMapboxStoreIfParentIsUnavailable()], styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"] }]
|
|
518
|
-
}], ctorParameters: function () {
|
|
519
|
-
return [{ type: i1.CompactContextStore, decorators: [{
|
|
520
|
-
type: Optional
|
|
521
|
-
}] }, { type: i2.DbxMapboxService }, { type: i2.DbxMapboxMapStore }, { type: i0.NgZone }];
|
|
522
|
-
} });
|
|
523
|
-
|
|
524
|
-
class DbxFormMapboxZoomModule {
|
|
525
|
-
}
|
|
526
|
-
DbxFormMapboxZoomModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxZoomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
527
|
-
DbxFormMapboxZoomModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxZoomModule, declarations: [DbxFormMapboxZoomFieldComponent], imports: [CommonModule,
|
|
528
|
-
MatIconModule,
|
|
529
|
-
MatButtonModule,
|
|
530
|
-
DbxTextModule,
|
|
531
|
-
DbxMapboxModule,
|
|
532
|
-
FormsModule,
|
|
533
|
-
ReactiveFormsModule,
|
|
534
|
-
MatInputModule, i1$1.FormlyModule, NgxMapboxGLModule] });
|
|
535
|
-
DbxFormMapboxZoomModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxZoomModule, imports: [CommonModule,
|
|
536
|
-
MatIconModule,
|
|
537
|
-
MatButtonModule,
|
|
538
|
-
DbxTextModule,
|
|
539
|
-
DbxMapboxModule,
|
|
540
|
-
FormsModule,
|
|
541
|
-
ReactiveFormsModule,
|
|
542
|
-
MatInputModule,
|
|
543
|
-
FormlyModule.forChild({
|
|
544
|
-
types: [{ name: 'mapbox-zoom-picker', component: DbxFormMapboxZoomFieldComponent, wrappers: ['style', 'form-field'] }]
|
|
545
|
-
}),
|
|
546
|
-
NgxMapboxGLModule] });
|
|
547
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxZoomModule, decorators: [{
|
|
548
|
-
type: NgModule,
|
|
549
|
-
args: [{
|
|
550
|
-
imports: [
|
|
551
|
-
CommonModule,
|
|
552
|
-
MatIconModule,
|
|
553
|
-
MatButtonModule,
|
|
554
|
-
DbxTextModule,
|
|
555
|
-
DbxMapboxModule,
|
|
556
|
-
FormsModule,
|
|
557
|
-
ReactiveFormsModule,
|
|
558
|
-
MatInputModule,
|
|
559
|
-
FormlyModule.forChild({
|
|
560
|
-
types: [{ name: 'mapbox-zoom-picker', component: DbxFormMapboxZoomFieldComponent, wrappers: ['style', 'form-field'] }]
|
|
561
|
-
}),
|
|
562
|
-
NgxMapboxGLModule
|
|
563
|
-
],
|
|
564
|
-
declarations: [DbxFormMapboxZoomFieldComponent]
|
|
565
|
-
}]
|
|
566
|
-
}] });
|
|
567
|
-
|
|
568
|
-
class DbxFormMapboxModule {
|
|
569
|
-
}
|
|
570
|
-
DbxFormMapboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
571
|
-
DbxFormMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxModule, exports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule] });
|
|
572
|
-
DbxFormMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxModule, imports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule] });
|
|
573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormMapboxModule, decorators: [{
|
|
574
|
-
type: NgModule,
|
|
575
|
-
args: [{
|
|
576
|
-
exports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule]
|
|
577
|
-
}]
|
|
578
|
-
}] });
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Generated bundle index. Do not edit.
|
|
582
|
-
*/
|
|
583
|
-
|
|
584
|
-
export { DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY, DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG, DbxFormMapboxLatLngFieldComponent, DbxFormMapboxLatLngFieldMarkerComponent, DbxFormMapboxLatLngModule, DbxFormMapboxModule, DbxFormMapboxZoomFieldComponent, DbxFormMapboxZoomModule, mapboxLatLngField, mapboxZoomField };
|
|
585
|
-
//# sourceMappingURL=dereekb-dbx-form-mapbox.mjs.map
|