@sneat/contactus-shared 0.2.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/esm2022/index.js +4 -0
- package/esm2022/index.js.map +1 -0
- package/esm2022/lib/components/address-form/address-form.component.js +182 -0
- package/esm2022/lib/components/address-form/address-form.component.js.map +1 -0
- package/esm2022/lib/components/address-form/index.js +2 -0
- package/esm2022/lib/components/address-form/index.js.map +1 -0
- package/esm2022/lib/components/basic-contact-form/basic-contact-form.component.js +71 -0
- package/esm2022/lib/components/basic-contact-form/basic-contact-form.component.js.map +1 -0
- package/esm2022/lib/components/basic-contact-form/index.js +2 -0
- package/esm2022/lib/components/basic-contact-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-comm-channels/comm-channel-form.component.js +90 -0
- package/esm2022/lib/components/contact-comm-channels/comm-channel-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-comm-channels/comm-channel-item.component.js +128 -0
- package/esm2022/lib/components/contact-comm-channels/comm-channel-item.component.js.map +1 -0
- package/esm2022/lib/components/contact-comm-channels/comm-channels-list.component.js +30 -0
- package/esm2022/lib/components/contact-comm-channels/comm-channels-list.component.js.map +1 -0
- package/esm2022/lib/components/contact-comm-channels/contact-comm-channels.component.js +16 -0
- package/esm2022/lib/components/contact-comm-channels/contact-comm-channels.component.js.map +1 -0
- package/esm2022/lib/components/contact-comm-channels/contact-emails.component.js +30 -0
- package/esm2022/lib/components/contact-comm-channels/contact-emails.component.js.map +1 -0
- package/esm2022/lib/components/contact-comm-channels/contact-phones.component.js +30 -0
- package/esm2022/lib/components/contact-comm-channels/contact-phones.component.js.map +1 -0
- package/esm2022/lib/components/contact-comm-channels/index.js +2 -0
- package/esm2022/lib/components/contact-comm-channels/index.js.map +1 -0
- package/esm2022/lib/components/contact-details/contact-details.component.js +235 -0
- package/esm2022/lib/components/contact-details/contact-details.component.js.map +1 -0
- package/esm2022/lib/components/contact-details/index.js +2 -0
- package/esm2022/lib/components/contact-details/index.js.map +1 -0
- package/esm2022/lib/components/contact-details/related-contacts.component.js +116 -0
- package/esm2022/lib/components/contact-details/related-contacts.component.js.map +1 -0
- package/esm2022/lib/components/contact-dob/contact-dob.component.js +57 -0
- package/esm2022/lib/components/contact-dob/contact-dob.component.js.map +1 -0
- package/esm2022/lib/components/contact-dob/index.js +2 -0
- package/esm2022/lib/components/contact-dob/index.js.map +1 -0
- package/esm2022/lib/components/contact-events.js +2 -0
- package/esm2022/lib/components/contact-events.js.map +1 -0
- package/esm2022/lib/components/contact-forms/contact-form-base.component.js +30 -0
- package/esm2022/lib/components/contact-forms/contact-form-base.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/emails-form/emails-form.component.js +76 -0
- package/esm2022/lib/components/contact-forms/emails-form/emails-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/emails-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/emails-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/index.js +11 -0
- package/esm2022/lib/components/contact-forms/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/location-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/location-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/location-form/location-form.component.js +194 -0
- package/esm2022/lib/components/contact-forms/location-form/location-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/new-contact/index.js +5 -0
- package/esm2022/lib/components/contact-forms/new-contact/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-company-form.component.js +115 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-company-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-contact-form-base.component.js +34 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-contact-form-base.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-contact-form.component.js +82 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-contact-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-person-form.component.js +282 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-person-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-pet-form.component.js +25 -0
- package/esm2022/lib/components/contact-forms/new-contact/new-pet-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/person-forms/age-group/age-group-form.component.js +64 -0
- package/esm2022/lib/components/contact-forms/person-forms/age-group/age-group-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/person-forms/age-group/index.js +2 -0
- package/esm2022/lib/components/contact-forms/person-forms/age-group/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/person-forms/gender-form/gender-form.component.js +118 -0
- package/esm2022/lib/components/contact-forms/person-forms/gender-form/gender-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/person-forms/gender-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/person-forms/gender-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/person-forms/names-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/person-forms/names-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/person-forms/names-form/names-form.component.js +296 -0
- package/esm2022/lib/components/contact-forms/person-forms/names-form/names-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/pesson-wizard/index.js +2 -0
- package/esm2022/lib/components/contact-forms/pesson-wizard/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/pesson-wizard/person-wizard.component.js +369 -0
- package/esm2022/lib/components/contact-forms/pesson-wizard/person-wizard.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/pet-kind-and-breed-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/pet-kind-and-breed-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/pet-kind-and-breed-form/pet-kind-and-breed-form.component.js +66 -0
- package/esm2022/lib/components/contact-forms/pet-kind-and-breed-form/pet-kind-and-breed-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/phones-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/phones-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/phones-form/phones-form.component.js +79 -0
- package/esm2022/lib/components/contact-forms/phones-form/phones-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/relationship-form/contact-relationship-form.component.js +125 -0
- package/esm2022/lib/components/contact-forms/relationship-form/contact-relationship-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/relationship-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/relationship-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/relationship-form/relationship-form.component.js +136 -0
- package/esm2022/lib/components/contact-forms/relationship-form/relationship-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/role-form/contact-role-form.component.js +98 -0
- package/esm2022/lib/components/contact-forms/role-form/contact-role-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/role-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/role-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/roles-form/index.js +2 -0
- package/esm2022/lib/components/contact-forms/roles-form/index.js.map +1 -0
- package/esm2022/lib/components/contact-forms/roles-form/roles-form.component.js +59 -0
- package/esm2022/lib/components/contact-forms/roles-form/roles-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-forms/space-related-form.component.js +32 -0
- package/esm2022/lib/components/contact-forms/space-related-form.component.js.map +1 -0
- package/esm2022/lib/components/contact-input/contact-input.component.js +151 -0
- package/esm2022/lib/components/contact-input/contact-input.component.js.map +1 -0
- package/esm2022/lib/components/contact-input/index.js +2 -0
- package/esm2022/lib/components/contact-input/index.js.map +1 -0
- package/esm2022/lib/components/contact-locations/contact-locations.component.js +52 -0
- package/esm2022/lib/components/contact-locations/contact-locations.component.js.map +1 -0
- package/esm2022/lib/components/contact-locations/index.js +2 -0
- package/esm2022/lib/components/contact-locations/index.js.map +1 -0
- package/esm2022/lib/components/contact-modules-menu/contact-modules-menu.component.js +29 -0
- package/esm2022/lib/components/contact-modules-menu/contact-modules-menu.component.js.map +1 -0
- package/esm2022/lib/components/contact-modules-menu/index.js +2 -0
- package/esm2022/lib/components/contact-modules-menu/index.js.map +1 -0
- package/esm2022/lib/components/contact-role-badges/contact-role-badges.component.js +44 -0
- package/esm2022/lib/components/contact-role-badges/contact-role-badges.component.js.map +1 -0
- package/esm2022/lib/components/contact-roles-input/contact-roles-input.component.js +37 -0
- package/esm2022/lib/components/contact-roles-input/contact-roles-input.component.js.map +1 -0
- package/esm2022/lib/components/contact-roles-input/index.js +2 -0
- package/esm2022/lib/components/contact-roles-input/index.js.map +1 -0
- package/esm2022/lib/components/contacts-by-type/contacts-by-type.component.js +200 -0
- package/esm2022/lib/components/contacts-by-type/contacts-by-type.component.js.map +1 -0
- package/esm2022/lib/components/contacts-by-type/index.js +2 -0
- package/esm2022/lib/components/contacts-by-type/index.js.map +1 -0
- package/esm2022/lib/components/contacts-checklist/contacts-checklist-item.component.js +32 -0
- package/esm2022/lib/components/contacts-checklist/contacts-checklist-item.component.js.map +1 -0
- package/esm2022/lib/components/contacts-checklist/contacts-checklist.component.js +140 -0
- package/esm2022/lib/components/contacts-checklist/contacts-checklist.component.js.map +1 -0
- package/esm2022/lib/components/contacts-checklist/index.js +2 -0
- package/esm2022/lib/components/contacts-checklist/index.js.map +1 -0
- package/esm2022/lib/components/contacts-component/contacts.component.js +200 -0
- package/esm2022/lib/components/contacts-component/contacts.component.js.map +1 -0
- package/esm2022/lib/components/contacts-component.commands.js +2 -0
- package/esm2022/lib/components/contacts-component.commands.js.map +1 -0
- package/esm2022/lib/components/contacts-list/contacts-list.component.js +32 -0
- package/esm2022/lib/components/contacts-list/contacts-list.component.js.map +1 -0
- package/esm2022/lib/components/contacts-list/index.js +3 -0
- package/esm2022/lib/components/contacts-list/index.js.map +1 -0
- package/esm2022/lib/components/contacts-list-item/contacts-list-item.component.js +138 -0
- package/esm2022/lib/components/contacts-list-item/contacts-list-item.component.js.map +1 -0
- package/esm2022/lib/components/contacts-list-item/related-as.component.js +34 -0
- package/esm2022/lib/components/contacts-list-item/related-as.component.js.map +1 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector-input.component.js +91 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector-input.component.js.map +1 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.component.js +415 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.component.js.map +1 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.interfaces.js +2 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.interfaces.js.map +1 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.module.js +28 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.module.js.map +1 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.service.js +18 -0
- package/esm2022/lib/components/contacts-selector/contacts-selector.service.js.map +1 -0
- package/esm2022/lib/components/contacts-selector/lib-exports.js +6 -0
- package/esm2022/lib/components/contacts-selector/lib-exports.js.map +1 -0
- package/esm2022/lib/components/contactus-module.base.component.js +4 -0
- package/esm2022/lib/components/contactus-module.base.component.js.map +1 -0
- package/esm2022/lib/components/inlist-options/inlist-age-group.component.js +53 -0
- package/esm2022/lib/components/inlist-options/inlist-age-group.component.js.map +1 -0
- package/esm2022/lib/components/inlist-options/inlist-options.component.js +27 -0
- package/esm2022/lib/components/inlist-options/inlist-options.component.js.map +1 -0
- package/esm2022/lib/components/invite-links/invite-links.component.js +87 -0
- package/esm2022/lib/components/invite-links/invite-links.component.js.map +1 -0
- package/esm2022/lib/components/lib-exports.js +29 -0
- package/esm2022/lib/components/lib-exports.js.map +1 -0
- package/esm2022/lib/components/members-as-badges/contacts-as-badges.component.js +39 -0
- package/esm2022/lib/components/members-as-badges/contacts-as-badges.component.js.map +1 -0
- package/esm2022/lib/components/members-as-badges/index.js +2 -0
- package/esm2022/lib/components/members-as-badges/index.js.map +1 -0
- package/esm2022/lib/components/members-by-role/family-members.component.js +180 -0
- package/esm2022/lib/components/members-by-role/family-members.component.js.map +1 -0
- package/esm2022/lib/components/members-by-role/index.js +4 -0
- package/esm2022/lib/components/members-by-role/index.js.map +1 -0
- package/esm2022/lib/components/members-by-role/member-group.js +2 -0
- package/esm2022/lib/components/members-by-role/member-group.js.map +1 -0
- package/esm2022/lib/components/members-by-role/members-by-role.component.js +34 -0
- package/esm2022/lib/components/members-by-role/members-by-role.component.js.map +1 -0
- package/esm2022/lib/components/members-card-header/members-card-header.component.js +33 -0
- package/esm2022/lib/components/members-card-header/members-card-header.component.js.map +1 -0
- package/esm2022/lib/components/members-list/index.js +2 -0
- package/esm2022/lib/components/members-list/index.js.map +1 -0
- package/esm2022/lib/components/members-list/members-list.component.js +164 -0
- package/esm2022/lib/components/members-list/members-list.component.js.map +1 -0
- package/esm2022/lib/components/members-short-list-card/members-short-list-card.component.js +60 -0
- package/esm2022/lib/components/members-short-list-card/members-short-list-card.component.js.map +1 -0
- package/esm2022/lib/components/shared-with/index.js +2 -0
- package/esm2022/lib/components/shared-with/index.js.map +1 -0
- package/esm2022/lib/components/shared-with/shared-with.component.js +25 -0
- package/esm2022/lib/components/shared-with/shared-with.component.js.map +1 -0
- package/esm2022/lib/components/with-new-contact-input.js +18 -0
- package/esm2022/lib/components/with-new-contact-input.js.map +1 -0
- package/esm2022/lib/constants.js +2 -0
- package/esm2022/lib/constants.js.map +1 -0
- package/esm2022/lib/index.js +3 -0
- package/esm2022/lib/index.js.map +1 -0
- package/esm2022/lib/modals/contact-names-modal/contact-names-modal.component.js +88 -0
- package/esm2022/lib/modals/contact-names-modal/contact-names-modal.component.js.map +1 -0
- package/esm2022/lib/modals/invite-modal/index.js +2 -0
- package/esm2022/lib/modals/invite-modal/index.js.map +1 -0
- package/esm2022/lib/modals/invite-modal/invite-modal.component.js +255 -0
- package/esm2022/lib/modals/invite-modal/invite-modal.component.js.map +1 -0
- package/esm2022/lib/pipes/contact-title.pipe.js +25 -0
- package/esm2022/lib/pipes/contact-title.pipe.js.map +1 -0
- package/esm2022/lib/pipes/index.js +4 -0
- package/esm2022/lib/pipes/index.js.map +1 -0
- package/esm2022/lib/pipes/person-title.pipe.js +21 -0
- package/esm2022/lib/pipes/person-title.pipe.js.map +1 -0
- package/esm2022/lib/pipes/selected-contacts.pipe.js +22 -0
- package/esm2022/lib/pipes/selected-contacts.pipe.js.map +1 -0
- package/esm2022/lib/providers/user-space-brief.provider.js +30 -0
- package/esm2022/lib/providers/user-space-brief.provider.js.map +1 -0
- package/esm2022/lib/ui-types.js +2 -0
- package/esm2022/lib/ui-types.js.map +1 -0
- package/esm2022/sneat-contactus-shared.js +5 -0
- package/esm2022/sneat-contactus-shared.js.map +1 -0
- package/index.d.ts +3 -0
- package/lib/components/address-form/address-form.component.d.ts +51 -0
- package/lib/components/address-form/index.d.ts +1 -0
- package/lib/components/basic-contact-form/basic-contact-form.component.d.ts +20 -0
- package/lib/components/basic-contact-form/index.d.ts +1 -0
- package/lib/components/contact-comm-channels/comm-channel-form.component.d.ts +20 -0
- package/lib/components/contact-comm-channels/comm-channel-item.component.d.ts +24 -0
- package/lib/components/contact-comm-channels/comm-channels-list.component.d.ts +15 -0
- package/lib/components/contact-comm-channels/contact-comm-channels.component.d.ts +7 -0
- package/lib/components/contact-comm-channels/contact-emails.component.d.ts +9 -0
- package/lib/components/contact-comm-channels/contact-phones.component.d.ts +9 -0
- package/lib/components/contact-comm-channels/index.d.ts +1 -0
- package/lib/components/contact-details/contact-details.component.d.ts +32 -0
- package/lib/components/contact-details/index.d.ts +1 -0
- package/lib/components/contact-details/related-contacts.component.d.ts +24 -0
- package/lib/components/contact-dob/contact-dob.component.d.ts +13 -0
- package/lib/components/contact-dob/index.d.ts +1 -0
- package/lib/components/contact-events.d.ts +6 -0
- package/lib/components/contact-forms/contact-form-base.component.d.ts +15 -0
- package/lib/components/contact-forms/emails-form/emails-form.component.d.ts +27 -0
- package/lib/components/contact-forms/emails-form/index.d.ts +1 -0
- package/lib/components/contact-forms/index.d.ts +10 -0
- package/lib/components/contact-forms/location-form/index.d.ts +1 -0
- package/lib/components/contact-forms/location-form/location-form.component.d.ts +39 -0
- package/lib/components/contact-forms/new-contact/index.d.ts +4 -0
- package/lib/components/contact-forms/new-contact/new-company-form.component.d.ts +26 -0
- package/lib/components/contact-forms/new-contact/new-contact-form-base.component.d.ts +15 -0
- package/lib/components/contact-forms/new-contact/new-contact-form.component.d.ts +20 -0
- package/lib/components/contact-forms/new-contact/new-person-form.component.d.ts +51 -0
- package/lib/components/contact-forms/new-contact/new-pet-form.component.d.ts +8 -0
- package/lib/components/contact-forms/person-forms/age-group/age-group-form.component.d.ts +17 -0
- package/lib/components/contact-forms/person-forms/age-group/index.d.ts +1 -0
- package/lib/components/contact-forms/person-forms/gender-form/gender-form.component.d.ts +22 -0
- package/lib/components/contact-forms/person-forms/gender-form/index.d.ts +1 -0
- package/lib/components/contact-forms/person-forms/names-form/index.d.ts +1 -0
- package/lib/components/contact-forms/person-forms/names-form/names-form.component.d.ts +63 -0
- package/lib/components/contact-forms/pesson-wizard/index.d.ts +1 -0
- package/lib/components/contact-forms/pesson-wizard/person-wizard.component.d.ts +63 -0
- package/lib/components/contact-forms/pet-kind-and-breed-form/index.d.ts +1 -0
- package/lib/components/contact-forms/pet-kind-and-breed-form/pet-kind-and-breed-form.component.d.ts +14 -0
- package/lib/components/contact-forms/phones-form/index.d.ts +1 -0
- package/lib/components/contact-forms/phones-form/phones-form.component.d.ts +21 -0
- package/lib/components/contact-forms/relationship-form/contact-relationship-form.component.d.ts +24 -0
- package/lib/components/contact-forms/relationship-form/index.d.ts +1 -0
- package/lib/components/contact-forms/relationship-form/relationship-form.component.d.ts +34 -0
- package/lib/components/contact-forms/role-form/contact-role-form.component.d.ts +33 -0
- package/lib/components/contact-forms/role-form/index.d.ts +1 -0
- package/lib/components/contact-forms/roles-form/index.d.ts +1 -0
- package/lib/components/contact-forms/roles-form/roles-form.component.d.ts +21 -0
- package/lib/components/contact-forms/space-related-form.component.d.ts +11 -0
- package/lib/components/contact-input/contact-input.component.d.ts +36 -0
- package/lib/components/contact-input/index.d.ts +1 -0
- package/lib/components/contact-locations/contact-locations.component.d.ts +14 -0
- package/lib/components/contact-locations/index.d.ts +1 -0
- package/lib/components/contact-modules-menu/contact-modules-menu.component.d.ts +12 -0
- package/lib/components/contact-modules-menu/index.d.ts +1 -0
- package/lib/components/contact-role-badges/contact-role-badges.component.d.ts +12 -0
- package/lib/components/contact-roles-input/contact-roles-input.component.d.ts +18 -0
- package/lib/components/contact-roles-input/index.d.ts +1 -0
- package/lib/components/contacts-by-type/contacts-by-type.component.d.ts +38 -0
- package/lib/components/contacts-by-type/index.d.ts +1 -0
- package/lib/components/contacts-checklist/contacts-checklist-item.component.d.ts +21 -0
- package/lib/components/contacts-checklist/contacts-checklist.component.d.ts +40 -0
- package/lib/components/contacts-checklist/index.d.ts +1 -0
- package/lib/components/contacts-component/contacts.component.d.ts +45 -0
- package/lib/components/contacts-component.commands.d.ts +5 -0
- package/lib/components/contacts-list/contacts-list.component.d.ts +11 -0
- package/lib/components/contacts-list/index.d.ts +2 -0
- package/lib/components/contacts-list-item/contacts-list-item.component.d.ts +29 -0
- package/lib/components/contacts-list-item/related-as.component.d.ts +16 -0
- package/lib/components/contacts-selector/contacts-selector-input.component.d.ts +24 -0
- package/lib/components/contacts-selector/contacts-selector.component.d.ts +80 -0
- package/lib/components/contacts-selector/contacts-selector.interfaces.d.ts +22 -0
- package/lib/components/contacts-selector/contacts-selector.module.d.ts +6 -0
- package/lib/components/contacts-selector/contacts-selector.service.d.ts +10 -0
- package/lib/components/contacts-selector/lib-exports.d.ts +5 -0
- package/lib/components/contactus-module.base.component.d.ts +4 -0
- package/lib/components/inlist-options/inlist-age-group.component.d.ts +12 -0
- package/lib/components/inlist-options/inlist-options.component.d.ts +18 -0
- package/lib/components/invite-links/invite-links.component.d.ts +28 -0
- package/lib/components/lib-exports.d.ts +27 -0
- package/lib/components/members-as-badges/contacts-as-badges.component.d.ts +18 -0
- package/lib/components/members-as-badges/index.d.ts +1 -0
- package/lib/components/members-by-role/family-members.component.d.ts +21 -0
- package/lib/components/members-by-role/index.d.ts +3 -0
- package/lib/components/members-by-role/member-group.d.ts +9 -0
- package/lib/components/members-by-role/members-by-role.component.d.ts +12 -0
- package/lib/components/members-card-header/members-card-header.component.d.ts +13 -0
- package/lib/components/members-list/index.d.ts +1 -0
- package/lib/components/members-list/members-list.component.d.ts +32 -0
- package/lib/components/members-short-list-card/members-short-list-card.component.d.ts +12 -0
- package/lib/components/shared-with/index.d.ts +1 -0
- package/lib/components/shared-with/shared-with.component.d.ts +6 -0
- package/lib/components/with-new-contact-input.d.ts +10 -0
- package/lib/constants.d.ts +13 -0
- package/lib/index.d.ts +2 -0
- package/lib/modals/contact-names-modal/contact-names-modal.component.d.ts +15 -0
- package/lib/modals/invite-modal/index.d.ts +1 -0
- package/lib/modals/invite-modal/invite-modal.component.d.ts +49 -0
- package/lib/pipes/contact-title.pipe.d.ts +10 -0
- package/lib/pipes/index.d.ts +3 -0
- package/lib/pipes/person-title.pipe.d.ts +9 -0
- package/lib/pipes/selected-contacts.pipe.d.ts +8 -0
- package/lib/providers/user-space-brief.provider.d.ts +12 -0
- package/lib/ui-types.d.ts +9 -0
- package/package.json +27 -0
- package/sneat-contactus-shared.d.ts +5 -0
- package/tsconfig.lib.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { LowerCasePipe } from '@angular/common';
|
|
2
|
+
import { Component, computed, effect, input, signal, inject, } from '@angular/core';
|
|
3
|
+
import { IonButton, IonButtons, IonCard, IonIcon, IonItem, IonItemDivider, IonItemSliding, IonLabel, IonSpinner, } from '@ionic/angular/standalone';
|
|
4
|
+
import { addSpace } from '@sneat/contactus-core';
|
|
5
|
+
import { ContactusSpaceService } from '@sneat/contactus-services';
|
|
6
|
+
import { listItemAnimations } from '@sneat/core';
|
|
7
|
+
import { ContactsListItemComponent } from '../contacts-list-item/contacts-list-item.component';
|
|
8
|
+
import { getRelatedItems, } from '@sneat/dto';
|
|
9
|
+
import { WithSpaceInput } from '@sneat/space-services';
|
|
10
|
+
import { ClassName } from '@sneat/ui';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
const emptyRelatedGroups = [
|
|
13
|
+
{
|
|
14
|
+
title: 'Parents',
|
|
15
|
+
relatedAs: 'parent',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'Children',
|
|
19
|
+
relatedAs: 'child',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: 'Siblings',
|
|
23
|
+
relatedAs: 'sibling',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Friends',
|
|
27
|
+
relatedAs: 'friend',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: 'Other',
|
|
31
|
+
relatedAs: 'other',
|
|
32
|
+
maxCount: 1,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
const emptyRelatedGroupRoles = emptyRelatedGroups
|
|
36
|
+
.map((g) => g.relatedAs)
|
|
37
|
+
.filter((id) => id !== 'other');
|
|
38
|
+
export class RelatedContactsComponent extends WithSpaceInput {
|
|
39
|
+
constructor() {
|
|
40
|
+
super();
|
|
41
|
+
this.contactusSpaceService = inject(ContactusSpaceService);
|
|
42
|
+
this.$relatedTo = input.required(...(ngDevMode ? [{ debugName: "$relatedTo" }] : []));
|
|
43
|
+
this.$related = computed(() => this.$relatedTo()?.related, ...(ngDevMode ? [{ debugName: "$related" }] : []));
|
|
44
|
+
this.$spaceContacts = signal(undefined, ...(ngDevMode ? [{ debugName: "$spaceContacts" }] : []));
|
|
45
|
+
this.$relatedItems = computed(() => {
|
|
46
|
+
const related = this.$related() || {};
|
|
47
|
+
const contactus = related['contactus'];
|
|
48
|
+
return (contactus && contactus['contacts']) || [];
|
|
49
|
+
}, ...(ngDevMode ? [{ debugName: "$relatedItems" }] : []));
|
|
50
|
+
this.$relatedContacts = computed(() => {
|
|
51
|
+
const relatedItems = this.$relatedItems();
|
|
52
|
+
if (!relatedItems) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
const spaceContacts = this.$spaceContacts();
|
|
56
|
+
return spaceContacts?.filter((c) => relatedItems[c.id]);
|
|
57
|
+
}, ...(ngDevMode ? [{ debugName: "$relatedContacts" }] : []));
|
|
58
|
+
this.$relatedGroups = computed(() => {
|
|
59
|
+
const relatedContacts = this.$relatedContacts();
|
|
60
|
+
const related = this.$related();
|
|
61
|
+
if (!related || !relatedContacts) {
|
|
62
|
+
return emptyRelatedGroups;
|
|
63
|
+
}
|
|
64
|
+
const relatedItems = getRelatedItems('contactus', 'contacts', related);
|
|
65
|
+
return emptyRelatedGroups.map((g) => Object.assign(g, {
|
|
66
|
+
contacts: relatedContacts?.filter((c) => {
|
|
67
|
+
const ri = relatedItems[c.id];
|
|
68
|
+
return (ri?.rolesOfItem &&
|
|
69
|
+
(g.relatedAs === `other`
|
|
70
|
+
? !emptyRelatedGroupRoles.some((r) => ri.rolesOfItem && ri.rolesOfItem[r])
|
|
71
|
+
: ri.rolesOfItem[g.relatedAs]));
|
|
72
|
+
}) || [],
|
|
73
|
+
}));
|
|
74
|
+
}, ...(ngDevMode ? [{ debugName: "$relatedGroups" }] : []));
|
|
75
|
+
let prevSpaceID;
|
|
76
|
+
effect(() => {
|
|
77
|
+
const spaceID = this.$spaceID();
|
|
78
|
+
if (spaceID !== prevSpaceID) {
|
|
79
|
+
this.subscription?.unsubscribe();
|
|
80
|
+
prevSpaceID = spaceID;
|
|
81
|
+
}
|
|
82
|
+
if (!spaceID) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.subscription = this.contactusSpaceService
|
|
86
|
+
.watchContactBriefs(spaceID)
|
|
87
|
+
.pipe(this.takeUntilDestroyed())
|
|
88
|
+
.subscribe((briefs) => {
|
|
89
|
+
const space = this.$space();
|
|
90
|
+
if (space.id !== spaceID) {
|
|
91
|
+
throw new Error('space.id !== spaceID');
|
|
92
|
+
}
|
|
93
|
+
this.$spaceContacts.set(briefs.map(addSpace(space)) || []);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: RelatedContactsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
98
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: RelatedContactsComponent, isStandalone: true, selector: "sneat-related-contacts", inputs: { $relatedTo: { classPropertyName: "$relatedTo", publicName: "$relatedTo", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: ClassName, useValue: 'RelatedContactsComponent' }], usesInheritance: true, ngImport: i0, template: "<ion-card>\n @for (relatedGroup of $relatedGroups(); track relatedGroup.relatedAs) {\n <ion-item lines=\"full\" color=\"light\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ relatedGroup.title }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button>\n <ion-icon name=\"add\" slot=\"start\" />\n <ion-label>Add</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-item>\n @if (relatedGroup.contacts) {\n @for (\n contact of relatedGroup.contacts;\n track contact.id;\n let last = $last\n ) {\n <ion-item-sliding @listItem>\n <sneat-contacts-list-item\n [hideCheckbox]=\"true\"\n [showRelatedAs]=\"false\"\n [showBorder]=\"last ? 'full' : 'inset'\"\n [$space]=\"$space()\"\n [$contact]=\"contact\"\n [relatedTo]=\"$relatedTo()\"\n />\n </ion-item-sliding>\n } @empty {\n <ion-item-divider>\n <ion-label>\n @if (relatedGroup.relatedAs === \"other\") {\n No other contacts add yet.\n } @else {\n No {{ relatedGroup.title | lowercase }} add yet.\n }\n </ion-label>\n </ion-item-divider>\n }\n } @else {\n <ion-item lines=\"full\">\n <ion-label color=\"medium\">Loading...</ion-label>\n <ion-spinner name=\"lines-small\" slot=\"end\" color=\"medium\" />\n </ion-item>\n }\n }\n</ion-card>\n", dependencies: [{ kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: ContactsListItemComponent, selector: "sneat-contacts-list-item", inputs: ["$contact", "$space", "hideCheckbox", "excludeRole", "showAddress", "showBorder", "hideRoles", "relatedTo", "showRelatedAs", "showRelatedItems", "contactClicked"], outputs: ["checkChange"] }, { kind: "component", type: IonItemSliding, selector: "ion-item-sliding", inputs: ["disabled"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "pipe", type: LowerCasePipe, name: "lowercase" }], animations: [listItemAnimations] }); }
|
|
99
|
+
}
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: RelatedContactsComponent, decorators: [{
|
|
101
|
+
type: Component,
|
|
102
|
+
args: [{ selector: 'sneat-related-contacts', animations: [listItemAnimations], imports: [
|
|
103
|
+
IonCard,
|
|
104
|
+
IonItem,
|
|
105
|
+
IonLabel,
|
|
106
|
+
ContactsListItemComponent,
|
|
107
|
+
IonItemSliding,
|
|
108
|
+
IonButtons,
|
|
109
|
+
IonButton,
|
|
110
|
+
IonIcon,
|
|
111
|
+
IonItemDivider,
|
|
112
|
+
LowerCasePipe,
|
|
113
|
+
IonSpinner,
|
|
114
|
+
], providers: [{ provide: ClassName, useValue: 'RelatedContactsComponent' }], template: "<ion-card>\n @for (relatedGroup of $relatedGroups(); track relatedGroup.relatedAs) {\n <ion-item lines=\"full\" color=\"light\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ relatedGroup.title }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button>\n <ion-icon name=\"add\" slot=\"start\" />\n <ion-label>Add</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-item>\n @if (relatedGroup.contacts) {\n @for (\n contact of relatedGroup.contacts;\n track contact.id;\n let last = $last\n ) {\n <ion-item-sliding @listItem>\n <sneat-contacts-list-item\n [hideCheckbox]=\"true\"\n [showRelatedAs]=\"false\"\n [showBorder]=\"last ? 'full' : 'inset'\"\n [$space]=\"$space()\"\n [$contact]=\"contact\"\n [relatedTo]=\"$relatedTo()\"\n />\n </ion-item-sliding>\n } @empty {\n <ion-item-divider>\n <ion-label>\n @if (relatedGroup.relatedAs === \"other\") {\n No other contacts add yet.\n } @else {\n No {{ relatedGroup.title | lowercase }} add yet.\n }\n </ion-label>\n </ion-item-divider>\n }\n } @else {\n <ion-item lines=\"full\">\n <ion-label color=\"medium\">Loading...</ion-label>\n <ion-spinner name=\"lines-small\" slot=\"end\" color=\"medium\" />\n </ion-item>\n }\n }\n</ion-card>\n" }]
|
|
115
|
+
}], ctorParameters: () => [], propDecorators: { $relatedTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "$relatedTo", required: true }] }] } });
|
|
116
|
+
//# sourceMappingURL=related-contacts.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"related-contacts.component.js","sourceRoot":"","sources":["../../../../../../../../libs/contactus/shared/src/lib/components/contact-details/related-contacts.component.ts","../../../../../../../../libs/contactus/shared/src/lib/components/contact-details/related-contacts.component.html"],"names":[],"mappings":"AAAA,OAAO,E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,EAAE,CAAC;oBACzB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAC1C,CAAC;gBACD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAC7D,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;8GAjFU,wBAAwB;kGAAxB,wBAAwB,uNAFxB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAA0B,EAAE,CAAC,iDCtF3E,s+CA8CA,4CD4BI,OAAO,yLACP,OAAO,0NACP,QAAQ,6FACR,yBAAyB,4QACzB,cAAc,mFACd,UAAU,8EACV,SAAS,oPACT,OAAO,2JACP,cAAc,kGAEd,UAAU,oGADV,aAAa,oCAXH,CAAC,kBAAkB,CAAC;;2FAgBrB,wBAAwB;kBAnBpC,SAAS;+BACE,wBAAwB,cAEtB,CAAC,kBAAkB,CAAC,WACvB;wBACP,OAAO;wBACP,OAAO;wBACP,QAAQ;wBACR,yBAAyB;wBACzB,cAAc;wBACd,UAAU;wBACV,SAAS;wBACT,OAAO;wBACP,cAAc;wBACd,aAAa;wBACb,UAAU;qBACX,aACU,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAA0B,EAAE,CAAC","sourcesContent":["import { LowerCasePipe } from '@angular/common';\nimport {\n Component,\n computed,\n effect,\n input,\n signal,\n inject,\n} from '@angular/core';\nimport {\n IonButton,\n IonButtons,\n IonCard,\n IonIcon,\n IonItem,\n IonItemDivider,\n IonItemSliding,\n IonLabel,\n IonSpinner,\n} from '@ionic/angular/standalone';\nimport { addSpace, IContactWithCheck } from '@sneat/contactus-core';\nimport { ContactusSpaceService } from '@sneat/contactus-services';\nimport { listItemAnimations } from '@sneat/core';\nimport { ContactsListItemComponent } from '../contacts-list-item/contacts-list-item.component';\nimport {\n getRelatedItems,\n IRelatedItems,\n IRelatedModules,\n IRelatedTo,\n} from '@sneat/dto';\nimport { WithSpaceInput } from '@sneat/space-services';\nimport { Subscription } from 'rxjs';\nimport { ClassName } from '@sneat/ui';\n\ninterface IRelatedGroup {\n readonly title: string;\n readonly maxCount?: number;\n readonly relatedAs: string;\n readonly contacts?: readonly IContactWithCheck[];\n}\n\nconst emptyRelatedGroups: readonly IRelatedGroup[] = [\n {\n title: 'Parents',\n relatedAs: 'parent',\n },\n {\n title: 'Children',\n relatedAs: 'child',\n },\n {\n title: 'Siblings',\n relatedAs: 'sibling',\n },\n {\n title: 'Friends',\n relatedAs: 'friend',\n },\n {\n title: 'Other',\n relatedAs: 'other',\n maxCount: 1,\n },\n];\n\nconst emptyRelatedGroupRoles = emptyRelatedGroups\n .map((g) => g.relatedAs)\n .filter((id) => id !== 'other');\n\n@Component({\n selector: 'sneat-related-contacts',\n templateUrl: './related-contacts.component.html',\n animations: [listItemAnimations],\n imports: [\n IonCard,\n IonItem,\n IonLabel,\n ContactsListItemComponent,\n IonItemSliding,\n IonButtons,\n IonButton,\n IonIcon,\n IonItemDivider,\n LowerCasePipe,\n IonSpinner,\n ],\n providers: [{ provide: ClassName, useValue: 'RelatedContactsComponent' }],\n})\nexport class RelatedContactsComponent extends WithSpaceInput {\n private readonly contactusSpaceService = inject(ContactusSpaceService);\n\n public readonly $relatedTo = input.required<IRelatedTo | undefined>();\n\n public readonly $related = computed<IRelatedModules | undefined>(\n () => this.$relatedTo()?.related,\n );\n\n protected readonly $spaceContacts = signal<\n readonly IContactWithCheck[] | undefined\n >(undefined);\n\n protected readonly $relatedItems = computed<IRelatedItems | undefined>(() => {\n const related = this.$related() || {};\n const contactus = related['contactus'];\n return (contactus && contactus['contacts']) || [];\n });\n\n protected readonly $relatedContacts = computed<\n readonly IContactWithCheck[] | undefined\n >(() => {\n const relatedItems = this.$relatedItems();\n if (!relatedItems) {\n return undefined;\n }\n const spaceContacts = this.$spaceContacts();\n return spaceContacts?.filter((c) => relatedItems[c.id]);\n });\n\n private subscription?: Subscription;\n\n protected $relatedGroups = computed<readonly IRelatedGroup[]>(() => {\n const relatedContacts = this.$relatedContacts();\n const related = this.$related();\n if (!related || !relatedContacts) {\n return emptyRelatedGroups;\n }\n const relatedItems = getRelatedItems('contactus', 'contacts', related);\n\n return emptyRelatedGroups.map((g) =>\n Object.assign(g, {\n contacts:\n relatedContacts?.filter((c) => {\n const ri = relatedItems[c.id];\n return (\n ri?.rolesOfItem &&\n (g.relatedAs === `other`\n ? !emptyRelatedGroupRoles.some(\n (r) => ri.rolesOfItem && ri.rolesOfItem[r],\n )\n : ri.rolesOfItem[g.relatedAs])\n );\n }) || [],\n }),\n );\n });\n\n constructor() {\n super();\n let prevSpaceID: string;\n effect(() => {\n const spaceID = this.$spaceID();\n if (spaceID !== prevSpaceID) {\n this.subscription?.unsubscribe();\n prevSpaceID = spaceID;\n }\n if (!spaceID) {\n return;\n }\n this.subscription = this.contactusSpaceService\n .watchContactBriefs(spaceID)\n .pipe(this.takeUntilDestroyed())\n .subscribe((briefs) => {\n const space = this.$space();\n if (space.id !== spaceID) {\n throw new Error('space.id !== spaceID');\n }\n this.$spaceContacts.set(briefs.map(addSpace(space)) || []);\n });\n });\n }\n}\n","<ion-card>\n @for (relatedGroup of $relatedGroups(); track relatedGroup.relatedAs) {\n <ion-item lines=\"full\" color=\"light\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ relatedGroup.title }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button>\n <ion-icon name=\"add\" slot=\"start\" />\n <ion-label>Add</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-item>\n @if (relatedGroup.contacts) {\n @for (\n contact of relatedGroup.contacts;\n track contact.id;\n let last = $last\n ) {\n <ion-item-sliding @listItem>\n <sneat-contacts-list-item\n [hideCheckbox]=\"true\"\n [showRelatedAs]=\"false\"\n [showBorder]=\"last ? 'full' : 'inset'\"\n [$space]=\"$space()\"\n [$contact]=\"contact\"\n [relatedTo]=\"$relatedTo()\"\n />\n </ion-item-sliding>\n } @empty {\n <ion-item-divider>\n <ion-label>\n @if (relatedGroup.relatedAs === \"other\") {\n No other contacts add yet.\n } @else {\n No {{ relatedGroup.title | lowercase }} add yet.\n }\n </ion-label>\n </ion-item-divider>\n }\n } @else {\n <ion-item lines=\"full\">\n <ion-label color=\"medium\">Loading...</ion-label>\n <ion-spinner name=\"lines-small\" slot=\"end\" color=\"medium\" />\n </ion-item>\n }\n }\n</ion-card>\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, input, computed, inject, signal, } from '@angular/core';
|
|
2
|
+
import { DateInputComponent } from '@sneat/components';
|
|
3
|
+
import { ContactService, } from '@sneat/contactus-services';
|
|
4
|
+
import { ClassName, SneatBaseComponent } from '@sneat/ui';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class ContactDobComponent extends SneatBaseComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.$contact = input.required(...(ngDevMode ? [{ debugName: "$contact" }] : []));
|
|
10
|
+
this.$updating = signal(false, ...(ngDevMode ? [{ debugName: "$updating" }] : []));
|
|
11
|
+
this.$dob = computed(() => {
|
|
12
|
+
const contact = this.$contact();
|
|
13
|
+
return contact?.dbo ? contact.dbo.dob || '' : undefined;
|
|
14
|
+
}, ...(ngDevMode ? [{ debugName: "$dob" }] : []));
|
|
15
|
+
this.today = new Date().toISOString().slice(0, 10);
|
|
16
|
+
this.contactService = inject(ContactService);
|
|
17
|
+
}
|
|
18
|
+
onDobChanged(dateOfBirth) {
|
|
19
|
+
const contact = this.$contact();
|
|
20
|
+
if (!contact) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const spaceID = contact.space.id;
|
|
24
|
+
const request = {
|
|
25
|
+
spaceID,
|
|
26
|
+
contactID: contact.id,
|
|
27
|
+
dateOfBirth,
|
|
28
|
+
};
|
|
29
|
+
this.$updating.set(true);
|
|
30
|
+
this.contactService.updateContact(request).subscribe({
|
|
31
|
+
next: () => {
|
|
32
|
+
this.$updating.set(false);
|
|
33
|
+
},
|
|
34
|
+
error: (err) => {
|
|
35
|
+
this.$updating.set(false);
|
|
36
|
+
this.errorLogger.logError(err, 'failed to update contact date of birth');
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ContactDobComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ContactDobComponent, isStandalone: true, selector: "sneat-contact-dob", inputs: { $contact: { classPropertyName: "$contact", publicName: "$contact", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
42
|
+
{
|
|
43
|
+
provide: ClassName,
|
|
44
|
+
useValue: 'ContactDobComponent',
|
|
45
|
+
},
|
|
46
|
+
], usesInheritance: true, ngImport: i0, template: "<sneat-date-input\n [$label]=\"'Date of birth'\"\n [$value]=\"$dob()\"\n [$updating]=\"$updating()\"\n [$max]=\"today\"\n (valueChange)=\"onDobChanged($event)\"\n/>\n", dependencies: [{ kind: "component", type: DateInputComponent, selector: "sneat-date-input", inputs: ["$label", "$value", "$max", "$updating", "$noValueLabel", "$noValueButtonColor"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ContactDobComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'sneat-contact-dob', imports: [DateInputComponent], providers: [
|
|
51
|
+
{
|
|
52
|
+
provide: ClassName,
|
|
53
|
+
useValue: 'ContactDobComponent',
|
|
54
|
+
},
|
|
55
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<sneat-date-input\n [$label]=\"'Date of birth'\"\n [$value]=\"$dob()\"\n [$updating]=\"$updating()\"\n [$max]=\"today\"\n (valueChange)=\"onDobChanged($event)\"\n/>\n" }]
|
|
56
|
+
}], propDecorators: { $contact: [{ type: i0.Input, args: [{ isSignal: true, alias: "$contact", required: true }] }] } });
|
|
57
|
+
//# sourceMappingURL=contact-dob.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-dob.component.js","sourceRoot":"","sources":["../../../../../../../../libs/contactus/shared/src/lib/components/contact-dob/contact-dob.component.ts","../../../../../../../../libs/contactus/shared/src/lib/components/contact-dob/contact-dob.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EACL,cAAc,GAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;;AAc1D,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IAZ3D;;QAakB,aAAQ,GAAG,KAAK,CAAC,QAAQ,mDAA+B,CAAC;QACzD,cAAS,GAAG,MAAM,CAAC,KAAK,qDAAC,CAAC;QAEvB,SAAI,GAAG,QAAQ,CAAC,GAAG,EAAE;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChC,OAAO,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,CAAC,gDAAC,CAAC;QAEgB,UAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAEhD,mBAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;KA4B1D;IA1BW,YAAY,CAAC,WAA+B;QACpD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QACD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAEjC,MAAM,OAAO,GAA0B;YACrC,OAAO;YACP,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,WAAW;SACZ,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;YACnD,IAAI,EAAE,GAAS,EAAE;gBACf,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;YACD,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE;gBACb,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC1B,IAAI,CAAC,WAAW,CAAC,QAAQ,CACvB,GAAG,EACH,wCAAwC,CACzC,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC;8GAtCU,mBAAmB;kGAAnB,mBAAmB,4MARnB;YACT;gBACE,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,qBAAqB;aAChC;SACF,iDCzBH,6KAOA,4CDYY,kBAAkB;;2FASjB,mBAAmB;kBAZ/B,SAAS;+BACE,mBAAmB,WAEpB,CAAC,kBAAkB,CAAC,aAClB;wBACT;4BACE,OAAO,EAAE,SAAS;4BAClB,QAAQ,EAAE,qBAAqB;yBAChC;qBACF,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n input,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport { DateInputComponent } from '@sneat/components';\nimport { IContactContext } from '@sneat/contactus-core';\nimport {\n ContactService,\n IUpdateContactRequest,\n} from '@sneat/contactus-services';\nimport { ClassName, SneatBaseComponent } from '@sneat/ui';\n\n@Component({\n selector: 'sneat-contact-dob',\n templateUrl: './contact-dob.component.html',\n imports: [DateInputComponent],\n providers: [\n {\n provide: ClassName,\n useValue: 'ContactDobComponent',\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ContactDobComponent extends SneatBaseComponent {\n public readonly $contact = input.required<IContactContext | undefined>();\n public readonly $updating = signal(false);\n\n protected readonly $dob = computed(() => {\n const contact = this.$contact();\n return contact?.dbo ? contact.dbo.dob || '' : undefined;\n });\n\n protected readonly today = new Date().toISOString().slice(0, 10);\n\n private readonly contactService = inject(ContactService);\n\n protected onDobChanged(dateOfBirth: string | undefined): void {\n const contact = this.$contact();\n if (!contact) {\n return;\n }\n const spaceID = contact.space.id;\n\n const request: IUpdateContactRequest = {\n spaceID,\n contactID: contact.id,\n dateOfBirth,\n };\n this.$updating.set(true);\n this.contactService.updateContact(request).subscribe({\n next: (): void => {\n this.$updating.set(false);\n },\n error: (err) => {\n this.$updating.set(false);\n this.errorLogger.logError(\n err,\n 'failed to update contact date of birth',\n );\n },\n });\n }\n}\n","<sneat-date-input\n [$label]=\"'Date of birth'\"\n [$value]=\"$dob()\"\n [$updating]=\"$updating()\"\n [$max]=\"today\"\n (valueChange)=\"onDobChanged($event)\"\n/>\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/contactus/shared/src/lib/components/contact-dob/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './contact-dob.component';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-events.js","sourceRoot":"","sources":["../../../../../../../libs/contactus/shared/src/lib/components/contact-events.ts"],"names":[],"mappings":"","sourcesContent":["import {\n ContactGroupWithIdAndBrief,\n IContactRoleWithIdAndBrief,\n} from '@sneat/contactus-core';\n\nexport interface IContactAddEventArgs {\n event: Event;\n group?: ContactGroupWithIdAndBrief;\n role?: IContactRoleWithIdAndBrief;\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Directive, EventEmitter, input, Output } from '@angular/core';
|
|
2
|
+
import { WithSpaceInput } from '@sneat/space-services';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ContactFormBaseComponent extends WithSpaceInput {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
// Should $hideRole be in NewContactFormBaseComponent?
|
|
8
|
+
this.$hideRole = input(...(ngDevMode ? [undefined, { debugName: "$hideRole" }] : []));
|
|
9
|
+
}
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ContactFormBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ContactFormBaseComponent, isStandalone: true, inputs: { $hideRole: { classPropertyName: "$hideRole", publicName: "$hideRole", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ContactFormBaseComponent, decorators: [{
|
|
14
|
+
type: Directive
|
|
15
|
+
}], propDecorators: { $hideRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hideRole", required: false }] }] } });
|
|
16
|
+
export class EditContactFormBaseComponent extends ContactFormBaseComponent {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.$contact = input.required(...(ngDevMode ? [{ debugName: "$contact" }] : []));
|
|
20
|
+
this.contactChange = new EventEmitter();
|
|
21
|
+
}
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: EditContactFormBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: EditContactFormBaseComponent, isStandalone: true, inputs: { $contact: { classPropertyName: "$contact", publicName: "$contact", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { contactChange: "contactChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: EditContactFormBaseComponent, decorators: [{
|
|
26
|
+
type: Directive
|
|
27
|
+
}], propDecorators: { $contact: [{ type: i0.Input, args: [{ isSignal: true, alias: "$contact", required: true }] }], contactChange: [{
|
|
28
|
+
type: Output
|
|
29
|
+
}] } });
|
|
30
|
+
//# sourceMappingURL=contact-form-base.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-form-base.component.js","sourceRoot":"","sources":["../../../../../../../../libs/contactus/shared/src/lib/components/contact-forms/contact-form-base.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;;AAGvD,MAAM,OAAgB,wBAAyB,SAAQ,cAAc;IADrE;;QAEE,sDAAsD;QACtC,cAAS,GAAG,KAAK,+DAAW,CAAC;KAC9C;8GAHqB,wBAAwB;kGAAxB,wBAAwB;;2FAAxB,wBAAwB;kBAD7C,SAAS;;AAOV,MAAM,OAAgB,4BAA6B,SAAQ,wBAAwB;IADnF;;QAEkB,aAAQ,GAAG,KAAK,CAAC,QAAQ,mDAA0B,CAAC;QAEjD,kBAAa,GAAG,IAAI,YAAY,EAA0B,CAAC;KAC/E;8GAJqB,4BAA4B;kGAA5B,4BAA4B;;2FAA5B,4BAA4B;kBADjD,SAAS;;sBAIP,MAAM","sourcesContent":["import { Directive, EventEmitter, input, Output } from '@angular/core';\nimport { ContactDboWithSpaceRef } from '@sneat/contactus-core';\nimport { WithSpaceInput } from '@sneat/space-services';\n\n@Directive()\nexport abstract class ContactFormBaseComponent extends WithSpaceInput {\n // Should $hideRole be in NewContactFormBaseComponent?\n public readonly $hideRole = input<boolean>();\n}\n\n@Directive()\nexport abstract class EditContactFormBaseComponent extends ContactFormBaseComponent {\n public readonly $contact = input.required<ContactDboWithSpaceRef>();\n\n @Output() readonly contactChange = new EventEmitter<ContactDboWithSpaceRef>();\n}\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output, } from '@angular/core';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { IonCard, IonCol, IonGrid, IonIcon, IonInput, IonItem, IonItemDivider, IonLabel, IonRow, IonSelect, IonSelectOption, } from '@ionic/angular/standalone';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
const emailTypes = [
|
|
7
|
+
{ id: 'personal', title: 'Personal' },
|
|
8
|
+
{ id: 'work', title: 'Work' },
|
|
9
|
+
];
|
|
10
|
+
const emptyEmails = [
|
|
11
|
+
{ type: 'personal', address: '' },
|
|
12
|
+
{ type: 'work', address: '' },
|
|
13
|
+
];
|
|
14
|
+
export class EmailsFormComponent {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.types = emailTypes;
|
|
17
|
+
this.hideHeader = false;
|
|
18
|
+
this.isActiveInWizard = false;
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
this.emailInputs = emptyEmails;
|
|
21
|
+
this.emailsChange = new EventEmitter();
|
|
22
|
+
}
|
|
23
|
+
ngOnChanges(changes) {
|
|
24
|
+
const emailsChange = changes['emails'];
|
|
25
|
+
// 'EmailsFormComponent.ngOnChanges(), emailsChange',
|
|
26
|
+
// emailsChange,
|
|
27
|
+
if (emailsChange && (this.emails?.length || 0) === 0) {
|
|
28
|
+
this.emailInputs = emptyEmails;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
typeChanged(event) {
|
|
32
|
+
event.stopPropagation();
|
|
33
|
+
this.setEmailsOnInputChanged();
|
|
34
|
+
}
|
|
35
|
+
addressChanged(event) {
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
this.setEmailsOnInputChanged();
|
|
38
|
+
}
|
|
39
|
+
setEmailsOnInputChanged() {
|
|
40
|
+
this.emails = [...this.emailInputs].filter((email) => !!email.address);
|
|
41
|
+
if (this.emails.length === 0) {
|
|
42
|
+
this.emails = undefined;
|
|
43
|
+
}
|
|
44
|
+
this.emailsChange.emit(this.emails);
|
|
45
|
+
}
|
|
46
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: EmailsFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
47
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: EmailsFormComponent, isStandalone: true, selector: "sneat-emails-form", inputs: { hideHeader: "hideHeader", isActiveInWizard: "isActiveInWizard", disabled: "disabled", emails: "emails" }, outputs: { emailsChange: "emailsChange" }, usesOnChanges: true, ngImport: i0, template: "<ion-card>\n @if (!hideHeader) {\n <ion-item-divider [color]=\"isActiveInWizard ? 'primary' : 'light'\">\n <ion-label>\n <ion-icon name=\"at\" class=\"ion-margin-end\" />\n Emails\n </ion-label>\n </ion-item-divider>\n }\n <ion-grid class=\"ion-grid-layout\">\n @for (\n email of emailInputs;\n track email.type + email.address;\n let i = $index\n ) {\n <ion-row>\n <ion-col size=\"auto\">\n <ion-item>\n <ion-select\n interface=\"popover\"\n [disabled]=\"true\"\n [(ngModel)]=\"email.type\"\n (ionChange)=\"typeChanged($event)\"\n >\n @for (t of types; track t.id) {\n <ion-select-option [value]=\"t.id\" [disabled]=\"disabled\">\n {{ t.title }}\n </ion-select-option>\n }\n </ion-select>\n </ion-item>\n </ion-col>\n\n <ion-col>\n <ion-item>\n <ion-input\n type=\"email\"\n email=\"true\"\n placeholder=\"email\"\n [(ngModel)]=\"email.address\"\n [disabled]=\"disabled\"\n (ionBlur)=\"addressChanged($event)\"\n />\n </ion-item>\n </ion-col>\n </ion-row>\n }\n </ion-grid>\n</ion-card>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: IonRow, selector: "ion-row" }, { kind: "component", type: IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonSelect, selector: "ion-select", inputs: ["cancelText", "color", "compareWith", "disabled", "errorText", "expandedIcon", "fill", "helperText", "interface", "interfaceOptions", "justify", "label", "labelPlacement", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "shape", "toggleIcon", "value"] }, { kind: "component", type: IonSelectOption, selector: "ion-select-option", inputs: ["disabled", "value"] }, { kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }] }); }
|
|
48
|
+
}
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: EmailsFormComponent, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{ imports: [
|
|
52
|
+
FormsModule,
|
|
53
|
+
IonCard,
|
|
54
|
+
IonItemDivider,
|
|
55
|
+
IonLabel,
|
|
56
|
+
IonIcon,
|
|
57
|
+
IonGrid,
|
|
58
|
+
IonRow,
|
|
59
|
+
IonCol,
|
|
60
|
+
IonItem,
|
|
61
|
+
IonSelect,
|
|
62
|
+
IonSelectOption,
|
|
63
|
+
IonInput,
|
|
64
|
+
], selector: 'sneat-emails-form', template: "<ion-card>\n @if (!hideHeader) {\n <ion-item-divider [color]=\"isActiveInWizard ? 'primary' : 'light'\">\n <ion-label>\n <ion-icon name=\"at\" class=\"ion-margin-end\" />\n Emails\n </ion-label>\n </ion-item-divider>\n }\n <ion-grid class=\"ion-grid-layout\">\n @for (\n email of emailInputs;\n track email.type + email.address;\n let i = $index\n ) {\n <ion-row>\n <ion-col size=\"auto\">\n <ion-item>\n <ion-select\n interface=\"popover\"\n [disabled]=\"true\"\n [(ngModel)]=\"email.type\"\n (ionChange)=\"typeChanged($event)\"\n >\n @for (t of types; track t.id) {\n <ion-select-option [value]=\"t.id\" [disabled]=\"disabled\">\n {{ t.title }}\n </ion-select-option>\n }\n </ion-select>\n </ion-item>\n </ion-col>\n\n <ion-col>\n <ion-item>\n <ion-input\n type=\"email\"\n email=\"true\"\n placeholder=\"email\"\n [(ngModel)]=\"email.address\"\n [disabled]=\"disabled\"\n (ionBlur)=\"addressChanged($event)\"\n />\n </ion-item>\n </ion-col>\n </ion-row>\n }\n </ion-grid>\n</ion-card>\n" }]
|
|
65
|
+
}], propDecorators: { hideHeader: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], isActiveInWizard: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], disabled: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], emails: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], emailsChange: [{
|
|
74
|
+
type: Output
|
|
75
|
+
}] } });
|
|
76
|
+
//# sourceMappingURL=emails-form.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emails-form.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/contactus/shared/src/lib/components/contact-forms/emails-form/emails-form.component.ts","../../../../../../../../../libs/contactus/shared/src/lib/components/contact-forms/emails-form/emails-form.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,EAEL,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,cAAc,EACd,QAAQ,EACR,MAAM,EACN,SAAS,EACT,eAAe,GAChB,MAAM,2BAA2B,CAAC;;;AAKnC,MAAM,UAAU,GAAuC;IACrD,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IACrC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MAAM,GAAG,SAAS,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;8GArCU,mBAAmB;kGAAnB,mBAAmB,iQC3DhC,q2CAiDA,2CDNI,WAAW,8eACX,OAAO,yLACP,cAAc,kGACd,QAAQ,6FACR,OAAO,2JACP,OAAO,wEACP,MAAM,oDACN,MAAM,kTACN,OAAO,0NACP,SAAS,kVACT,eAAe,6FACf,QAAQ;;2FAKC,mBAAmB;kBAlB/B,SAAS;8BACC;wBACP,WAAW;wBACX,OAAO;wBACP,cAAc;wBACd,QAAQ;wBACR,OAAO;wBACP,OAAO;wBACP,MAAM;wBACN,MAAM;wBACN,OAAO;wBACP,SAAS;wBACT,eAAe;wBACf,QAAQ;qBACT,YACS,mBAAmB;;sBAM5B,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBAIL,KAAK;;sBACL,MAAM","sourcesContent":["import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n IonCard,\n IonCol,\n IonGrid,\n IonIcon,\n IonInput,\n IonItem,\n IonItemDivider,\n IonLabel,\n IonRow,\n IonSelect,\n IonSelectOption,\n} from '@ionic/angular/standalone';\nimport { IEmail } from '@sneat/contactus-core';\n\ntype EmailType = 'personal' | 'work';\n\nconst emailTypes: { id: EmailType; title: string }[] = [\n { id: 'personal', title: 'Personal' },\n { id: 'work', title: 'Work' },\n];\n\ninterface emailInput {\n type: EmailType;\n address: string;\n}\n\nconst emptyEmails: emailInput[] = [\n { type: 'personal', address: '' },\n { type: 'work', address: '' },\n];\n\n@Component({\n imports: [\n FormsModule,\n IonCard,\n IonItemDivider,\n IonLabel,\n IonIcon,\n IonGrid,\n IonRow,\n IonCol,\n IonItem,\n IonSelect,\n IonSelectOption,\n IonInput,\n ],\n selector: 'sneat-emails-form',\n templateUrl: './emails-form.component.html',\n})\nexport class EmailsFormComponent implements OnChanges {\n readonly types = emailTypes;\n\n @Input() hideHeader = false;\n @Input() isActiveInWizard = false;\n @Input() disabled = false;\n\n emailInputs: readonly emailInput[] = emptyEmails;\n\n @Input() emails?: readonly IEmail[];\n @Output() readonly emailsChange = new EventEmitter<readonly IEmail[]>();\n\n ngOnChanges(changes: SimpleChanges): void {\n const emailsChange = changes['emails'];\n // 'EmailsFormComponent.ngOnChanges(), emailsChange',\n // emailsChange,\n if (emailsChange && (this.emails?.length || 0) === 0) {\n this.emailInputs = emptyEmails;\n }\n }\n\n typeChanged(event: Event): void {\n event.stopPropagation();\n this.setEmailsOnInputChanged();\n }\n\n addressChanged(event: Event): void {\n event.stopPropagation();\n this.setEmailsOnInputChanged();\n }\n\n private setEmailsOnInputChanged(): void {\n this.emails = [...this.emailInputs].filter((email) => !!email.address);\n if (this.emails.length === 0) {\n this.emails = undefined;\n }\n this.emailsChange.emit(this.emails);\n }\n}\n","<ion-card>\n @if (!hideHeader) {\n <ion-item-divider [color]=\"isActiveInWizard ? 'primary' : 'light'\">\n <ion-label>\n <ion-icon name=\"at\" class=\"ion-margin-end\" />\n Emails\n </ion-label>\n </ion-item-divider>\n }\n <ion-grid class=\"ion-grid-layout\">\n @for (\n email of emailInputs;\n track email.type + email.address;\n let i = $index\n ) {\n <ion-row>\n <ion-col size=\"auto\">\n <ion-item>\n <ion-select\n interface=\"popover\"\n [disabled]=\"true\"\n [(ngModel)]=\"email.type\"\n (ionChange)=\"typeChanged($event)\"\n >\n @for (t of types; track t.id) {\n <ion-select-option [value]=\"t.id\" [disabled]=\"disabled\">\n {{ t.title }}\n </ion-select-option>\n }\n </ion-select>\n </ion-item>\n </ion-col>\n\n <ion-col>\n <ion-item>\n <ion-input\n type=\"email\"\n email=\"true\"\n placeholder=\"email\"\n [(ngModel)]=\"email.address\"\n [disabled]=\"disabled\"\n (ionBlur)=\"addressChanged($event)\"\n />\n </ion-item>\n </ion-col>\n </ion-row>\n }\n </ion-grid>\n</ion-card>\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../libs/contactus/shared/src/lib/components/contact-forms/emails-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './emails-form.component';\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './person-forms/age-group';
|
|
2
|
+
export * from './emails-form';
|
|
3
|
+
export * from './person-forms/gender-form';
|
|
4
|
+
export * from './person-forms/names-form';
|
|
5
|
+
export * from './pet-kind-and-breed-form';
|
|
6
|
+
export * from './phones-form';
|
|
7
|
+
export * from './relationship-form';
|
|
8
|
+
export * from './space-related-form.component';
|
|
9
|
+
export * from './roles-form';
|
|
10
|
+
export * from './pesson-wizard';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/contactus/shared/src/lib/components/contact-forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './person-forms/age-group';\nexport * from './emails-form';\nexport * from './person-forms/gender-form';\nexport * from './person-forms/names-form';\nexport * from './pet-kind-and-breed-form';\nexport * from './phones-form';\nexport * from './relationship-form';\nexport * from './space-related-form.component';\nexport * from './roles-form';\nexport * from './pesson-wizard';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../libs/contactus/shared/src/lib/components/contact-forms/location-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './location-form.component';\n"]}
|