@pisapp/vue-helpers 7.0.0-dev.20260916-153034
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/LICENSE +28 -0
- package/README.md +48 -0
- package/THIRD-PARTY-NOTICES.txt +43 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +19 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
PRODUCT INFORMATION SERVICES (PIS) PROPRIETARY SOFTWARE LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ABB Asea Brown Boveri Ltd. All rights reserved.
|
|
4
|
+
|
|
5
|
+
The Product Information Services (PIS) software package and its documentation
|
|
6
|
+
(the "Software") are proprietary to ABB Asea Brown Boveri Ltd and its
|
|
7
|
+
licensors.
|
|
8
|
+
|
|
9
|
+
Subject to a valid written agreement between ABB and you or the organization
|
|
10
|
+
you represent that authorizes use of PIS (the "Applicable Agreement"), ABB
|
|
11
|
+
grants you a non-exclusive, non-transferable, non-sublicensable, limited
|
|
12
|
+
license to install and use the Software solely to develop, test, and run
|
|
13
|
+
applications that access PIS services as authorized by the Applicable
|
|
14
|
+
Agreement.
|
|
15
|
+
|
|
16
|
+
Except to the extent that mandatory law does not allow a restriction, you may
|
|
17
|
+
not copy, modify, distribute, publish, sublicense, rent, lease, sell, or
|
|
18
|
+
otherwise make the Software available to a third party. You may not remove or
|
|
19
|
+
alter proprietary notices or reverse engineer the Software except as expressly
|
|
20
|
+
permitted by mandatory law.
|
|
21
|
+
|
|
22
|
+
If no Applicable Agreement authorizes your use of PIS, no license to use the
|
|
23
|
+
Software is granted. Your right to use the Software ends when the Applicable
|
|
24
|
+
Agreement ends or your authorization under it is withdrawn.
|
|
25
|
+
|
|
26
|
+
The Applicable Agreement controls if it conflicts with this notice. The
|
|
27
|
+
Software is provided subject to the warranties, limitations of liability, and
|
|
28
|
+
other terms in the Applicable Agreement.
|
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @pisapp/vue-helpers
|
|
2
|
+
|
|
3
|
+
Vue 3.5+ helper for **PIS v7**. `compileComponent(C)` mounts a Vue component
|
|
4
|
+
into a PIS template surface. Because PIS itself is built on Vue reactivity, the
|
|
5
|
+
context (`ctx`) flows in natively — mutations to `ctx` fields re-render your
|
|
6
|
+
component with no bridge layer.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm add @pisapp/core @pisapp/vue-helpers vue
|
|
12
|
+
# npm install @pisapp/core @pisapp/vue-helpers vue
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Peer dependencies
|
|
16
|
+
|
|
17
|
+
| Package | Range | Notes |
|
|
18
|
+
| -------------- | -------- | --------------------------------------- |
|
|
19
|
+
| `@pisapp/core` | `^7.0.0` | The component runtime + types. |
|
|
20
|
+
| `vue` | `^3.5.0` | The reactivity runtime PIS is built on. |
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { registerAll } from '@pisapp/core';
|
|
26
|
+
import { compileComponent } from '@pisapp/vue-helpers';
|
|
27
|
+
import BuyButton from './BuyButton.vue';
|
|
28
|
+
|
|
29
|
+
registerAll(); // explicit registration (C11 follow-up) — once at startup
|
|
30
|
+
|
|
31
|
+
const cellCallbacks = compileComponent(BuyButton);
|
|
32
|
+
|
|
33
|
+
const options = {
|
|
34
|
+
components: {
|
|
35
|
+
itemsTable: {
|
|
36
|
+
columns: [{ dataField: 'ProductId', cellTemplate: cellCallbacks }],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`compileComponent` accepts a Vue component (`Component`) and returns the
|
|
43
|
+
`{ mount }` template value (`TemplateCallbacks`) that PIS expects on a template
|
|
44
|
+
slot; `mount` returns the teardown cleanup. The component receives `ctx` as a
|
|
45
|
+
prop.
|
|
46
|
+
|
|
47
|
+
See the [Vue migration guide](../../PisNextGenDocs/src/migration/web-components/vue.md) for
|
|
48
|
+
the full DSL translation rules and the codemod-first migration flow.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
THIRD-PARTY NOTICES
|
|
2
|
+
|
|
3
|
+
Product Information Services (PIS) packages may include or depend on the
|
|
4
|
+
third-party software listed below. The applicable third-party license terms
|
|
5
|
+
apply to that software.
|
|
6
|
+
|
|
7
|
+
Bootstrap 5.3.2
|
|
8
|
+
Copyright (c) 2011-2023 The Bootstrap Authors
|
|
9
|
+
|
|
10
|
+
vue-virtual-scroller 2.0.1
|
|
11
|
+
Copyright (c) 2020 guillaume.b.chau@gmail.com
|
|
12
|
+
|
|
13
|
+
Vue 3.5.40
|
|
14
|
+
Copyright (c) 2018-present, Yuxi (Evan) You
|
|
15
|
+
|
|
16
|
+
vue3-runtime-template 1.0.2
|
|
17
|
+
Copyright (c) 2018 Alex Jover
|
|
18
|
+
|
|
19
|
+
The components listed above are licensed under the MIT License:
|
|
20
|
+
|
|
21
|
+
MIT License
|
|
22
|
+
|
|
23
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
24
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
25
|
+
in the Software without restriction, including without limitation the rights
|
|
26
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
28
|
+
furnished to do so, subject to the following conditions:
|
|
29
|
+
|
|
30
|
+
The above copyright notice and this permission notice shall be included in all
|
|
31
|
+
copies or substantial portions of the Software.
|
|
32
|
+
|
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
36
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
37
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
38
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
|
+
SOFTWARE.
|
|
40
|
+
|
|
41
|
+
ABBvoice font assets are proprietary ABB assets. They are not redistributed in
|
|
42
|
+
these npm packages. PIS CSS references the ABB-hosted font service at:
|
|
43
|
+
https://external.productinformation.abb.com/PisApp/current/fonts/
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MountCallback, TemplateCallbacks, VueSlotComponent } from '@pisapp/core';
|
|
2
|
+
import { Component } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* What a Vue consumer may place on a `*Template` config field — the same union
|
|
5
|
+
* as core's `MountPoint<C>`, on a Vue-specific name:
|
|
6
|
+
*
|
|
7
|
+
* - `MountCallback<C>` — a bare render function, the plain-JS form. MountPoint
|
|
8
|
+
* wraps it in reactiveMount (a bare function is NEVER a Vue functional
|
|
9
|
+
* component — the shapes are indistinguishable at runtime).
|
|
10
|
+
* - `TemplateCallbacks<C>` — the `{ mount }` value returned by
|
|
11
|
+
* `compileComponent` (cross-framework compatible) or `reactiveMount`.
|
|
12
|
+
* - `VueSlotComponent` — an object Vue component passed DIRECTLY. The runtime
|
|
13
|
+
* projects it via `<component :is>` and hands it the reactive `ctx` as a
|
|
14
|
+
* prop, preserving the Vue lifecycle natively. This is the canonical Vue
|
|
15
|
+
* example: `options.components.search.table.columns[i].cellTemplate = MyCell`
|
|
16
|
+
* (no `compileComponent` needed). Functional components (bare functions)
|
|
17
|
+
* must be wrapped with `compileComponent`.
|
|
18
|
+
*/
|
|
19
|
+
export type VueTemplateRenderable<C = unknown> = TemplateCallbacks<C> | MountCallback<C> | VueSlotComponent;
|
|
20
|
+
/**
|
|
21
|
+
* Compile a Vue component into a template mount value. The context type `C`
|
|
22
|
+
* defaults to `unknown` (Vue's `h()` erases component prop types, so the
|
|
23
|
+
* context can't be inferred from the component here); type safety lives on the
|
|
24
|
+
* component itself, whose `ctx` prop is typed against the surface context.
|
|
25
|
+
* Pass `C` explicitly for wiring-site checking:
|
|
26
|
+
* `compileComponent<ProductsSearchTableCellProps>(MyCell)`.
|
|
27
|
+
*
|
|
28
|
+
* Light-DOM note: PIS v7 components render with `shadowRoot: false`, so the
|
|
29
|
+
* mount container is plain light DOM and host-document CSS reaches consumer
|
|
30
|
+
* SFC `<style>` blocks naturally — no stylesheet mirroring is done here.
|
|
31
|
+
*/
|
|
32
|
+
export declare function compileComponent<C = unknown>(component: Component): TemplateCallbacks<C>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createApp as e, h as t } from "vue";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
var n = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function r(r) {
|
|
5
|
+
return { mount: (i, a) => {
|
|
6
|
+
n.get(i)?.();
|
|
7
|
+
let o = e({
|
|
8
|
+
name: "PisVueHelperHost",
|
|
9
|
+
render: () => t(r, { ctx: a })
|
|
10
|
+
});
|
|
11
|
+
o.mount(i);
|
|
12
|
+
let s = !1, c = () => {
|
|
13
|
+
s || (s = !0, n.delete(i), o.unmount());
|
|
14
|
+
};
|
|
15
|
+
return n.set(i, c), c;
|
|
16
|
+
} };
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as compileComponent };
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pisapp/vue-helpers",
|
|
3
|
+
"version": "7.0.0-dev.20260916-153034",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
|
+
"author": "ABB Asea Brown Boveri Ltd",
|
|
6
|
+
"description": "Vue 3 helper for PIS v7 — mount custom cells via compileComponent($1). Bridges the reactive ctx to Vue props natively (decision D-N2).",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"THIRD-PARTY-NOTICES.txt"
|
|
20
|
+
],
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"vue": ">=3.5.17 <4",
|
|
23
|
+
"@pisapp/core": "^7.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"typescript": "~6.0.3",
|
|
27
|
+
"@pisapp/core": "7.0.0-dev.20260916-153034",
|
|
28
|
+
"vue": ">=3.5.17 <4",
|
|
29
|
+
"vitest": "^4.1.10",
|
|
30
|
+
"jsdom": "^25.0.1"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"pisRelease": {
|
|
36
|
+
"version": "7.0.0-dev.20260916-153034",
|
|
37
|
+
"channel": "dev",
|
|
38
|
+
"commit": "3cfd54cc87975b643036674bfb2d000d81973ac5"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "node ../../scripts/build-library.mjs --package @pisapp/vue-helpers",
|
|
42
|
+
"lint": "eslint . --max-warnings 0",
|
|
43
|
+
"lint:fix": "eslint . --fix",
|
|
44
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
45
|
+
"test": "vitest run"
|
|
46
|
+
}
|
|
47
|
+
}
|