Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Component registration updated #268

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
manual-register tests updated
vikas-cldcvr committed Apr 29, 2024
commit 280bdfba444aee4235c8dc322aa42fc0614616dc
3 changes: 2 additions & 1 deletion .storybook/code-sandbox.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@ export function getCodeSandBoxUrl(story) {
const params = getParameters({
files: {
"index.js": {
content: `import "@ollion/flow-core";
content: `import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);;
import "@ollion/flow-system-icon";
document.getElementById("app").innerHTML =\`${story}\`
`,
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -56,7 +56,8 @@ _Note:_ after installation re-start your application.
Copy and import the below snippet into your startup file. In **VueJS:** (src/main.ts or main.js), **Angular:** (src/main.ts), **React:** (src/index.tsx or index.jsx)

```JavaScript
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
```

<br>
@@ -98,7 +99,8 @@ npm i --save @ollion/flow-system-icon
### 2️⃣ Import the icon pack

```javascript
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import "@ollion/flow-system-icon";
```

5 changes: 3 additions & 2 deletions packages/flow-code-editor/README.md
Original file line number Diff line number Diff line change
@@ -19,8 +19,9 @@ npm i --save @ollion/flow-code-editor
Paste the below snippet in your project and add your application startup/runtime code to it.

```javascript
import "@ollion/flow-core";
import "@ollion/flow-code-editor";
import { register, flowCoreElements } from "@ollion/flow-core";
import { FCodeEditor } from "@ollion/flow-code-editor";
register([...flowCoreElements, FCodeEditor]);
```

<br>
6 changes: 4 additions & 2 deletions packages/flow-core/README.md
Original file line number Diff line number Diff line change
@@ -56,7 +56,8 @@ _Note:_ after installation re-start your application.
Copy and import the below snippet into your startup file. In **VueJS:** (src/main.ts or main.js), **Angular:** (src/main.ts), **React:** (src/index.tsx or index.jsx)

```JavaScript
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
```

<br>
@@ -98,7 +99,8 @@ npm i --save @ollion/flow-system-icon
### 2️⃣ Import the icon pack

```javascript
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import "@ollion/flow-system-icon";
```

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";
// importing flow-core components
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
// setting icon pack for testing icon related test cases

Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// importing flow-core components
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FBreadcrumb, ConfigUtil } from "@ollion/flow-core";

3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-button/f-button.test.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FButton, FIcon, ConfigUtil, FCounter } from "@ollion/flow-core";
// importing `loadingSVG` to cross check
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
import FCarouselExample from "./i-fcarousel-example";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { ConfigUtil, FCarousel } from "@ollion/flow-core";
import { html } from "lit";
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { html, fixture, expect } from "@open-wc/testing";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FCheckbox } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { html, fixture, expect } from "@open-wc/testing";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FColorPicker, FInput } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
// importing `loadingSVG` to cross check
import loadingSVG from "./../../mixins/svg/loader";
// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FCounter } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
import { expect, fixture, html, oneEvent } from "@open-wc/testing";

// importing flow-core components
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { ConfigUtil, FDateTimePicker } from "@ollion/flow-core";

3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-div/f-div.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";

import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FDiv } from "@ollion/flow-core";

describe("f-div", () => {
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";
// importing flow-core components
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FDivider } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
import { expect, fixture, html } from "@open-wc/testing";

// importing flow-core components
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { ConfigUtil, FEmojiPicker, FIcon } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { ConfigUtil, FText, FFileUpload, FDiv } from "@ollion/flow-core";
// importing `loadingSVG` to cross check
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";

import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FFormGroup } from "@ollion/flow-core";

describe("f-form-group", () => {
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-form/f-form.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";

import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FForm } from "@ollion/flow-core";

describe("f-form", () => {
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-grid/f-grid.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";
// importing flow-core components
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FGrid } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ import { html, fixture, expect } from "@open-wc/testing";
// IconPack to test
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FIconButton, ConfigUtil } from "@ollion/flow-core";

ConfigUtil.setConfig({ iconPack: IconPack });
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-icon/f-icon.test.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@ import notFound from "../../mixins/svg/not-found";
import { ConfigUtil } from "@ollion/flow-core-config";

// import all flow -core components
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FIcon } from "@ollion/flow-core";

3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-input/f-input.test.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
import { expect, fixture, html } from "@open-wc/testing";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { ConfigUtil, FIcon, FInput, FText } from "@ollion/flow-core";
// importing `loadingSVG` to cross check
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FPictogram, ConfigUtil } from "@ollion/flow-core";

ConfigUtil.setConfig({ iconPack: IconPack });
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { expect, fixture, html } from "@open-wc/testing";

import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FPopover } from "@ollion/flow-core";

describe("f-popover", () => {
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { html, fixture, expect } from "@open-wc/testing";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FProgressBar } from "@ollion/flow-core";

describe("f-progress-bar", () => {
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-radio/f-radio.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { html, fixture, expect } from "@open-wc/testing";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FRadio } from "@ollion/flow-core";

3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-search/f-search.test.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { expect, fixture, oneEvent } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { ConfigUtil, FDiv, FSearch, FSuggest } from "@ollion/flow-core";
import { html } from "lit";
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-select/f-select.test.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FIcon, ConfigUtil, FSelect, FText, FTag, FCheckbox } from "@ollion/flow-core";
// setting icon pack for testing icon related test cases
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-spacer/f-spacer.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { html, fixture, expect } from "@open-wc/testing";
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FSpacer } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { expect, fixture, oneEvent } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { ConfigUtil, FDiv, FSuggest } from "@ollion/flow-core";
import { html } from "lit";
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-switch/f-switch.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { html, fixture, expect } from "@open-wc/testing";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FSwitch } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from "@open-wc/testing";
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FTabContent } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from "@open-wc/testing";
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FTabNode } from "@ollion/flow-core";

3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-tab/f-tab.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { html, fixture, expect } from "@open-wc/testing";
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FTab } from "@ollion/flow-core";

3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-tag/f-tag.test.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FTag, FIcon, ConfigUtil, FCounter } from "@ollion/flow-core";
// importing `loadingSVG` to cross check
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from "@open-wc/testing";
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FTemplate } from "@ollion/flow-core";

Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FIcon, ConfigUtil, FTextArea } from "@ollion/flow-core";

3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-text/f-text.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { html, fixture, expect } from "@open-wc/testing";

import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);
import { FText } from "@ollion/flow-core";

describe("f-text", () => {
3 changes: 2 additions & 1 deletion packages/flow-core/src/components/f-toast/f-toast.test.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";

// import flow-core elements
import "@ollion/flow-core";
import { register, flowCoreElements } from "@ollion/flow-core";
register(flowCoreElements);

import { FIcon, ConfigUtil, FToast } from "@ollion/flow-core";

Loading