How to use existing cumulocity widget in custom widget - cumulocity

I created a custom widget using angular 10, Now I wanted to add a datapoint list in the configuration(edit) and access it
I am using c8y-data-point-list directive but my angular application not able to find this selector/associated component.
so my first question is how to use the existing angularJs component in angular? how to import it?
is it possible?
I also want to use more widget in a custom widget from ng1-module, how to achieve it?

c8y-data-point-list is not in the official list of cumulocity components, so it's not possible to use it.
Also the highest version of angular would be the 8th, as they currently only support it and still use angularJS components.

Related

How do I use Angular UI Grid (native to AngularJS) in an Angular 8 project

I am trying to use the Angular UI Grid in my Angular 8 project. Looking online i can't seem to find anywhere which tells me how to configure it properly.
I know that Angular UI grid is native to AngularJS. But is it possible to implement this into a TS project? I need the table in various different components.
Any help would be great!! :)
You can use ag-grid,mat-table,ngx-datatable instead of angular UI grid.

How to override component on specific slot

i'm trying to make a banner component to use as SimpleBannerComponent, but i need to override only in a specific slot/section on homepage.
In another pages I will use the default component.
How can I do that?
Thanks for your time.
The best way is to create a new CMS component only for that specific slot/section on homepage, because once you update a component, all its instances will also be updated everywhere.
Documentation on how to create and map a new component can be found on Spartacus Documentation Site.

How can I get the component code before compile in Vue2.x?

What problem does this feature solve?
<code-box title="基本" describe="button基本用法">
<i-button>Default</i-button>
</code-box>
I want to get default Slot String like <i-button>Default</i-button> in codeBox.
I can find then api _slotContents in vue 1.x.
Is there any way can get the same function in vue 2.x?
What does the proposed API look like?
_slotContents in vue 1.x
If I understand correctly, you want to use scoped slots.
If for some reason you really want to get the rendered html inside your component you can use this.$el.innerHtml.

vuetify pagination add custom features (slot/template)

I'm using the VueJS Vuetify framework and I need a pagination option with more features then the basic one available.
what am i looking for:
an option to add custom names (not just numbers)
a tooltip over the buttons
to disable/enable just some of the buttons
pagination - meaning: use next, previous and "..." if there are too many pages
if the pagination had a template option (slot) that would of been perfect.
now i am wondering how is the best why to get my goal. is there a way to add templates to vuetify? is there a different component that has this options on the pagination?
Read the api here In answer to your questions:
1+2+3 This is not supported in vuetify out of the box and therefore you may want to consider writing your own pagination tool or looking for a different package.
4. This can be set in the props as described in the docs above, see total-visible prop and length.

Unable to get VeeValidate 3.x working with a custom component using VueSelect

This is the code: https://codesandbox.io/s/veevalidate-with-vueselect-13g9d
I'm using a custom component because I want to override a couple of slots in VueSelect. I'm using the ValidationProvider but that doesn't seem to be working.
I've looked for help but only found examples using VeeValidate 2.x.
I've figured out how it works. By default, VeeValidate validates the input only after the blur or input events on the child elements of ValidationProvider. If you want it to validate on custom events, you can implement a custom mode for the custom component and specify the mode attribute on the ValidationProvider.
For example: https://codesandbox.io/s/veevalidate-with-vueselect-13g9d (my updated codesandbox link).