From 280bdfba444aee4235c8dc322aa42fc0614616dc Mon Sep 17 00:00:00 2001 From: vikas-cldcvr Date: Mon, 29 Apr 2024 17:42:37 +0530 Subject: [PATCH] manual-register tests updated --- .storybook/code-sandbox.js | 3 ++- README.md | 6 ++++-- packages/flow-code-editor/README.md | 5 +++-- packages/flow-core/README.md | 6 ++++-- .../src/components/f-accordion/f-accordion.test.ts | 3 ++- .../src/components/f-breadcrumb/f-breadcrumb.test.ts | 3 ++- .../src/components/f-button/f-button.test.ts | 3 ++- .../src/components/f-carousel/f-carousel.test.ts | 3 ++- .../src/components/f-checkbox/f-checkbox.test.ts | 3 ++- .../components/f-color-picker/f-color-picker.test.ts | 3 ++- .../src/components/f-counter/f-counter.test.ts | 3 ++- .../f-date-time-picker/f-date-time-picker.test.ts | 3 ++- .../flow-core/src/components/f-div/f-div.test.ts | 3 ++- .../src/components/f-divider/f-divider.test.ts | 3 ++- .../components/f-emoji-picker/f-emoji-picker.test.ts | 3 ++- .../components/f-file-upload/f-file-upload.test.ts | 3 ++- .../src/components/f-form-group/f-form-group.test.ts | 3 ++- .../flow-core/src/components/f-form/f-form.test.ts | 3 ++- .../flow-core/src/components/f-grid/f-grid.test.ts | 3 ++- .../components/f-icon-button/f-icon-button.test.ts | 3 ++- .../flow-core/src/components/f-icon/f-icon.test.ts | 3 ++- .../flow-core/src/components/f-input/f-input.test.ts | 3 ++- .../src/components/f-pictogram/f-pictogram.test.ts | 3 ++- .../src/components/f-popover/f-popover.test.ts | 3 ++- .../components/f-progress-bar/f-progress-bar.test.ts | 3 ++- .../flow-core/src/components/f-radio/f-radio.test.ts | 3 ++- .../src/components/f-search/f-search.test.ts | 3 ++- .../src/components/f-select/f-select.test.ts | 3 ++- .../src/components/f-spacer/f-spacer.test.ts | 3 ++- .../src/components/f-suggest/f-suggest.test.ts | 3 ++- .../src/components/f-switch/f-switch.test.ts | 3 ++- .../components/f-tab-content/f-tab-content.test.ts | 3 ++- .../src/components/f-tab-node/f-tab-node.test.ts | 3 ++- .../flow-core/src/components/f-tab/f-tab.test.ts | 3 ++- .../flow-core/src/components/f-tag/f-tag.test.ts | 3 ++- .../src/components/f-template/f-template.test.ts | 3 ++- .../src/components/f-text-area/f-text-area.test.ts | 3 ++- .../flow-core/src/components/f-text/f-text.test.ts | 3 ++- .../flow-core/src/components/f-toast/f-toast.test.ts | 3 ++- .../src/components/f-tooltip/f-tooltip.test.ts | 3 ++- packages/flow-form-builder/README.md | 5 +++-- .../components/f-form-builder/f-form-builder.test.ts | 4 +++- packages/flow-lineage/README.md | 12 ++++++++---- packages/flow-log/README.md | 6 ++++-- packages/flow-log/src/components/f-log/f-log.test.ts | 3 ++- packages/flow-md-editor/README.md | 6 ++++-- .../src/components/f-md-editor/f-md-editor.test.ts | 6 +++--- packages/flow-table/README.md | 6 ++++-- .../components/f-table-schema/f-table-schema.test.ts | 4 +++- .../src/components/f-table/f-table.test.ts | 4 +++- .../src/components/f-tcell/f-tcell.test.ts | 4 +++- .../flow-table/src/components/f-trow/f-trow.test.ts | 4 +++- stories/flow-form-builder/about.mdx | 5 +++-- stories/flow-lineage/introduction/about.mdx | 5 +++-- 54 files changed, 134 insertions(+), 68 deletions(-) diff --git a/.storybook/code-sandbox.js b/.storybook/code-sandbox.js index 1553d2e38..7d7b6a4ba 100644 --- a/.storybook/code-sandbox.js +++ b/.storybook/code-sandbox.js @@ -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}\` `, diff --git a/README.md b/README.md index 72512854b..9562e1daf 100644 --- a/README.md +++ b/README.md @@ -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); ```
@@ -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"; ``` diff --git a/packages/flow-code-editor/README.md b/packages/flow-code-editor/README.md index 3c5e7361e..625305a2f 100644 --- a/packages/flow-code-editor/README.md +++ b/packages/flow-code-editor/README.md @@ -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]); ```
diff --git a/packages/flow-core/README.md b/packages/flow-core/README.md index 72512854b..9562e1daf 100644 --- a/packages/flow-core/README.md +++ b/packages/flow-core/README.md @@ -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); ```
@@ -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"; ``` diff --git a/packages/flow-core/src/components/f-accordion/f-accordion.test.ts b/packages/flow-core/src/components/f-accordion/f-accordion.test.ts index beca995e1..5a4a2e76b 100644 --- a/packages/flow-core/src/components/f-accordion/f-accordion.test.ts +++ b/packages/flow-core/src/components/f-accordion/f-accordion.test.ts @@ -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 diff --git a/packages/flow-core/src/components/f-breadcrumb/f-breadcrumb.test.ts b/packages/flow-core/src/components/f-breadcrumb/f-breadcrumb.test.ts index da33f95b5..ec6ee535c 100644 --- a/packages/flow-core/src/components/f-breadcrumb/f-breadcrumb.test.ts +++ b/packages/flow-core/src/components/f-breadcrumb/f-breadcrumb.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-button/f-button.test.ts b/packages/flow-core/src/components/f-button/f-button.test.ts index 7c12a50a2..d937e8eca 100644 --- a/packages/flow-core/src/components/f-button/f-button.test.ts +++ b/packages/flow-core/src/components/f-button/f-button.test.ts @@ -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 diff --git a/packages/flow-core/src/components/f-carousel/f-carousel.test.ts b/packages/flow-core/src/components/f-carousel/f-carousel.test.ts index 85931904e..176fdeaf8 100644 --- a/packages/flow-core/src/components/f-carousel/f-carousel.test.ts +++ b/packages/flow-core/src/components/f-carousel/f-carousel.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-checkbox/f-checkbox.test.ts b/packages/flow-core/src/components/f-checkbox/f-checkbox.test.ts index fc42cee64..50fc2a18f 100644 --- a/packages/flow-core/src/components/f-checkbox/f-checkbox.test.ts +++ b/packages/flow-core/src/components/f-checkbox/f-checkbox.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-color-picker/f-color-picker.test.ts b/packages/flow-core/src/components/f-color-picker/f-color-picker.test.ts index e99536d7a..f5de1c9af 100644 --- a/packages/flow-core/src/components/f-color-picker/f-color-picker.test.ts +++ b/packages/flow-core/src/components/f-color-picker/f-color-picker.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-counter/f-counter.test.ts b/packages/flow-core/src/components/f-counter/f-counter.test.ts index 670fedd24..500e9bb48 100644 --- a/packages/flow-core/src/components/f-counter/f-counter.test.ts +++ b/packages/flow-core/src/components/f-counter/f-counter.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-date-time-picker/f-date-time-picker.test.ts b/packages/flow-core/src/components/f-date-time-picker/f-date-time-picker.test.ts index d41c48a1f..eb8f75bde 100644 --- a/packages/flow-core/src/components/f-date-time-picker/f-date-time-picker.test.ts +++ b/packages/flow-core/src/components/f-date-time-picker/f-date-time-picker.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-div/f-div.test.ts b/packages/flow-core/src/components/f-div/f-div.test.ts index 62dcb6003..d94628548 100644 --- a/packages/flow-core/src/components/f-div/f-div.test.ts +++ b/packages/flow-core/src/components/f-div/f-div.test.ts @@ -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", () => { diff --git a/packages/flow-core/src/components/f-divider/f-divider.test.ts b/packages/flow-core/src/components/f-divider/f-divider.test.ts index cadfe0e50..0d6c0d1dc 100644 --- a/packages/flow-core/src/components/f-divider/f-divider.test.ts +++ b/packages/flow-core/src/components/f-divider/f-divider.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-emoji-picker/f-emoji-picker.test.ts b/packages/flow-core/src/components/f-emoji-picker/f-emoji-picker.test.ts index 5167a0061..ab016180b 100644 --- a/packages/flow-core/src/components/f-emoji-picker/f-emoji-picker.test.ts +++ b/packages/flow-core/src/components/f-emoji-picker/f-emoji-picker.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-file-upload/f-file-upload.test.ts b/packages/flow-core/src/components/f-file-upload/f-file-upload.test.ts index 0b662b71b..bd21ac333 100644 --- a/packages/flow-core/src/components/f-file-upload/f-file-upload.test.ts +++ b/packages/flow-core/src/components/f-file-upload/f-file-upload.test.ts @@ -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 diff --git a/packages/flow-core/src/components/f-form-group/f-form-group.test.ts b/packages/flow-core/src/components/f-form-group/f-form-group.test.ts index aada854c0..069a68be6 100644 --- a/packages/flow-core/src/components/f-form-group/f-form-group.test.ts +++ b/packages/flow-core/src/components/f-form-group/f-form-group.test.ts @@ -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", () => { diff --git a/packages/flow-core/src/components/f-form/f-form.test.ts b/packages/flow-core/src/components/f-form/f-form.test.ts index 42bb824b3..06446290b 100644 --- a/packages/flow-core/src/components/f-form/f-form.test.ts +++ b/packages/flow-core/src/components/f-form/f-form.test.ts @@ -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", () => { diff --git a/packages/flow-core/src/components/f-grid/f-grid.test.ts b/packages/flow-core/src/components/f-grid/f-grid.test.ts index 90582054f..ebe98ec33 100644 --- a/packages/flow-core/src/components/f-grid/f-grid.test.ts +++ b/packages/flow-core/src/components/f-grid/f-grid.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-icon-button/f-icon-button.test.ts b/packages/flow-core/src/components/f-icon-button/f-icon-button.test.ts index b342b63a5..02ed88254 100644 --- a/packages/flow-core/src/components/f-icon-button/f-icon-button.test.ts +++ b/packages/flow-core/src/components/f-icon-button/f-icon-button.test.ts @@ -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 }); diff --git a/packages/flow-core/src/components/f-icon/f-icon.test.ts b/packages/flow-core/src/components/f-icon/f-icon.test.ts index 325a4c2bc..15ccc5293 100644 --- a/packages/flow-core/src/components/f-icon/f-icon.test.ts +++ b/packages/flow-core/src/components/f-icon/f-icon.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-input/f-input.test.ts b/packages/flow-core/src/components/f-input/f-input.test.ts index 7370d7cfd..68a9d7802 100644 --- a/packages/flow-core/src/components/f-input/f-input.test.ts +++ b/packages/flow-core/src/components/f-input/f-input.test.ts @@ -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 diff --git a/packages/flow-core/src/components/f-pictogram/f-pictogram.test.ts b/packages/flow-core/src/components/f-pictogram/f-pictogram.test.ts index 5d2a6c47f..707544571 100644 --- a/packages/flow-core/src/components/f-pictogram/f-pictogram.test.ts +++ b/packages/flow-core/src/components/f-pictogram/f-pictogram.test.ts @@ -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 }); diff --git a/packages/flow-core/src/components/f-popover/f-popover.test.ts b/packages/flow-core/src/components/f-popover/f-popover.test.ts index d51c09472..f535570d9 100644 --- a/packages/flow-core/src/components/f-popover/f-popover.test.ts +++ b/packages/flow-core/src/components/f-popover/f-popover.test.ts @@ -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", () => { diff --git a/packages/flow-core/src/components/f-progress-bar/f-progress-bar.test.ts b/packages/flow-core/src/components/f-progress-bar/f-progress-bar.test.ts index 30610d503..e554d3a0b 100644 --- a/packages/flow-core/src/components/f-progress-bar/f-progress-bar.test.ts +++ b/packages/flow-core/src/components/f-progress-bar/f-progress-bar.test.ts @@ -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", () => { diff --git a/packages/flow-core/src/components/f-radio/f-radio.test.ts b/packages/flow-core/src/components/f-radio/f-radio.test.ts index 50707d205..fcbd17330 100644 --- a/packages/flow-core/src/components/f-radio/f-radio.test.ts +++ b/packages/flow-core/src/components/f-radio/f-radio.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-search/f-search.test.ts b/packages/flow-core/src/components/f-search/f-search.test.ts index 8d19aacdc..d0ebd1ee3 100644 --- a/packages/flow-core/src/components/f-search/f-search.test.ts +++ b/packages/flow-core/src/components/f-search/f-search.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-select/f-select.test.ts b/packages/flow-core/src/components/f-select/f-select.test.ts index d155088c9..30a9c2c29 100644 --- a/packages/flow-core/src/components/f-select/f-select.test.ts +++ b/packages/flow-core/src/components/f-select/f-select.test.ts @@ -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 diff --git a/packages/flow-core/src/components/f-spacer/f-spacer.test.ts b/packages/flow-core/src/components/f-spacer/f-spacer.test.ts index b1cf1f217..2628caf50 100644 --- a/packages/flow-core/src/components/f-spacer/f-spacer.test.ts +++ b/packages/flow-core/src/components/f-spacer/f-spacer.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-suggest/f-suggest.test.ts b/packages/flow-core/src/components/f-suggest/f-suggest.test.ts index 61801683c..0743953a6 100644 --- a/packages/flow-core/src/components/f-suggest/f-suggest.test.ts +++ b/packages/flow-core/src/components/f-suggest/f-suggest.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-switch/f-switch.test.ts b/packages/flow-core/src/components/f-switch/f-switch.test.ts index 9b9d646fe..4d365fd52 100644 --- a/packages/flow-core/src/components/f-switch/f-switch.test.ts +++ b/packages/flow-core/src/components/f-switch/f-switch.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-tab-content/f-tab-content.test.ts b/packages/flow-core/src/components/f-tab-content/f-tab-content.test.ts index c8cb6fd22..e6a75ff35 100644 --- a/packages/flow-core/src/components/f-tab-content/f-tab-content.test.ts +++ b/packages/flow-core/src/components/f-tab-content/f-tab-content.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-tab-node/f-tab-node.test.ts b/packages/flow-core/src/components/f-tab-node/f-tab-node.test.ts index 75f6ffa25..87cdbd64d 100644 --- a/packages/flow-core/src/components/f-tab-node/f-tab-node.test.ts +++ b/packages/flow-core/src/components/f-tab-node/f-tab-node.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-tab/f-tab.test.ts b/packages/flow-core/src/components/f-tab/f-tab.test.ts index f8faa321b..5db687479 100644 --- a/packages/flow-core/src/components/f-tab/f-tab.test.ts +++ b/packages/flow-core/src/components/f-tab/f-tab.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-tag/f-tag.test.ts b/packages/flow-core/src/components/f-tag/f-tag.test.ts index 8dc8a7423..0cc9d1832 100644 --- a/packages/flow-core/src/components/f-tag/f-tag.test.ts +++ b/packages/flow-core/src/components/f-tag/f-tag.test.ts @@ -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 diff --git a/packages/flow-core/src/components/f-template/f-template.test.ts b/packages/flow-core/src/components/f-template/f-template.test.ts index cc4a02818..68997728c 100644 --- a/packages/flow-core/src/components/f-template/f-template.test.ts +++ b/packages/flow-core/src/components/f-template/f-template.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-text-area/f-text-area.test.ts b/packages/flow-core/src/components/f-text-area/f-text-area.test.ts index 0cf9e4e0d..5ba8296c5 100644 --- a/packages/flow-core/src/components/f-text-area/f-text-area.test.ts +++ b/packages/flow-core/src/components/f-text-area/f-text-area.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-text/f-text.test.ts b/packages/flow-core/src/components/f-text/f-text.test.ts index c4af9469c..ec0dd836a 100644 --- a/packages/flow-core/src/components/f-text/f-text.test.ts +++ b/packages/flow-core/src/components/f-text/f-text.test.ts @@ -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", () => { diff --git a/packages/flow-core/src/components/f-toast/f-toast.test.ts b/packages/flow-core/src/components/f-toast/f-toast.test.ts index 2780726d4..572b04daa 100644 --- a/packages/flow-core/src/components/f-toast/f-toast.test.ts +++ b/packages/flow-core/src/components/f-toast/f-toast.test.ts @@ -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"; diff --git a/packages/flow-core/src/components/f-tooltip/f-tooltip.test.ts b/packages/flow-core/src/components/f-tooltip/f-tooltip.test.ts index a44ab3163..a99869c3b 100644 --- a/packages/flow-core/src/components/f-tooltip/f-tooltip.test.ts +++ b/packages/flow-core/src/components/f-tooltip/f-tooltip.test.ts @@ -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 { FTooltip } from "@ollion/flow-core"; describe("f-tooltip", () => { diff --git a/packages/flow-form-builder/README.md b/packages/flow-form-builder/README.md index 8e41aed3a..ea1b8874a 100644 --- a/packages/flow-form-builder/README.md +++ b/packages/flow-form-builder/README.md @@ -77,8 +77,9 @@ npm i --save @ollion/flow-form-builder Paste the below snippet in your project and add your application startup/runtime code to it. ```javascript -import "@ollion/flow-core"; -import "@ollion/flow-form-builder"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { flowFormBuilderElements } from "@ollion/flow-form-builder"; +register([...flowCoreElements, ...flowFormBuilderElements]); ```
diff --git a/packages/flow-form-builder/src/components/f-form-builder/f-form-builder.test.ts b/packages/flow-form-builder/src/components/f-form-builder/f-form-builder.test.ts index bf6d52ca9..677d773ba 100644 --- a/packages/flow-form-builder/src/components/f-form-builder/f-form-builder.test.ts +++ b/packages/flow-form-builder/src/components/f-form-builder/f-form-builder.test.ts @@ -1,7 +1,9 @@ import { html, fixture, expect, oneEvent } from "@open-wc/testing"; // import flow-core elements -import "@ollion/flow-core"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { flowFormBuilderElements } from "@ollion/flow-form-builder"; +register([...flowCoreElements, ...flowFormBuilderElements]); import "@ollion/flow-system-icon"; import { FFormArray, FFormBuilder, FFormObject } from "../../../"; diff --git a/packages/flow-lineage/README.md b/packages/flow-lineage/README.md index a56b419b8..7505cd26c 100644 --- a/packages/flow-lineage/README.md +++ b/packages/flow-lineage/README.md @@ -45,8 +45,10 @@ npm i --save @ollion/flow-lineage Paste the below snippet in your project and add your application startup/runtime code to it. ```javascript -import "@ollion/flow-core"; -import "@ollion/flow-lineage"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { FLineage } from "@ollion/flow-lineage"; + +register([...flowCoreElements, FLineage]); ```
Example @@ -54,10 +56,12 @@ import "@ollion/flow-lineage"; **VueJS:** In the following example, I imported `@ollion/flow-core` and then imported the rest of the flow packages including `@ollion/flow-lineage` and after that startup code was added for VueJs `createApp(App).use(router).mount(“#app”);`. ```javascript -import "@ollion/flow-core"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { FLineage } from "@ollion/flow-lineage"; + +register([...flowCoreElements, FLineage]); import "@ollion/flow-system-icon"; import "@ollion/flow-product-icon"; -import "@ollion/flow-lineage"; createApp(App).use(router).mount("#app"); //runtime ``` diff --git a/packages/flow-log/README.md b/packages/flow-log/README.md index df556c852..dbfdd1be2 100644 --- a/packages/flow-log/README.md +++ b/packages/flow-log/README.md @@ -19,8 +19,10 @@ npm i --save @ollion/flow-log Paste the below snippet in your project and add your application startup/runtime code to it. ```javascript -import "@ollion/flow-core"; -import "@ollion/flow-log"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { FLog } from "@ollion/flow-log"; + +register([...flowCoreElements, FLog]); ```
diff --git a/packages/flow-log/src/components/f-log/f-log.test.ts b/packages/flow-log/src/components/f-log/f-log.test.ts index cee5adf61..1769e69c8 100644 --- a/packages/flow-log/src/components/f-log/f-log.test.ts +++ b/packages/flow-log/src/components/f-log/f-log.test.ts @@ -3,7 +3,8 @@ import { html, fixture, expect } from "@open-wc/testing"; import samplelogs from "./sample-logs"; // import flow-core elements -import "@ollion/flow-core"; +import { register, flowCoreElements } from "@ollion/flow-core"; +register(flowCoreElements); import { FLog } from "@ollion/flow-log"; import { FDiv } from "@ollion/flow-core"; diff --git a/packages/flow-md-editor/README.md b/packages/flow-md-editor/README.md index b68f4a1b5..6c5048eea 100644 --- a/packages/flow-md-editor/README.md +++ b/packages/flow-md-editor/README.md @@ -19,8 +19,10 @@ npm i --save @ollion/flow-md-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-md-editor"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { FMDEditor } from "@ollion/flow-md-editor"; + +register([...flowCoreElements, FMDEditor]); ```
diff --git a/packages/flow-md-editor/src/components/f-md-editor/f-md-editor.test.ts b/packages/flow-md-editor/src/components/f-md-editor/f-md-editor.test.ts index f2f8ea740..8fd2d01f9 100644 --- a/packages/flow-md-editor/src/components/f-md-editor/f-md-editor.test.ts +++ b/packages/flow-md-editor/src/components/f-md-editor/f-md-editor.test.ts @@ -3,10 +3,10 @@ import { expect, fixture, html } from "@open-wc/testing"; import sampleMd from "./sample-md"; // import flow-core elements -import "@ollion/flow-core"; - -import { ConfigUtil } from "@ollion/flow-core"; +import { register, flowCoreElements, ConfigUtil } from "@ollion/flow-core"; import { FMDEditor } from "@ollion/flow-md-editor"; + +register([...flowCoreElements, FMDEditor]); ConfigUtil.setConfig({ iconPack: IconPack }); describe("f-md-editor", () => { diff --git a/packages/flow-table/README.md b/packages/flow-table/README.md index f6a2916d6..c956e8e73 100644 --- a/packages/flow-table/README.md +++ b/packages/flow-table/README.md @@ -19,8 +19,10 @@ npm i --save @ollion/flow-table Paste the below snippet in your project and add your application startup/runtime code to it. ```javascript -import "@ollion/flow-core"; -import "@ollion/flow-table"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { flowTableElements } from "@ollion/flow-table"; + +register([...flowCoreElements, ...flowTableElements]); ```
diff --git a/packages/flow-table/src/components/f-table-schema/f-table-schema.test.ts b/packages/flow-table/src/components/f-table-schema/f-table-schema.test.ts index 73d1a8a7e..0c32fbe4f 100644 --- a/packages/flow-table/src/components/f-table-schema/f-table-schema.test.ts +++ b/packages/flow-table/src/components/f-table-schema/f-table-schema.test.ts @@ -1,7 +1,9 @@ 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"; +import { flowTableElements } from "@ollion/flow-table"; +register([...flowCoreElements, ...flowTableElements]); import { ConfigUtil, FDiv } from "@ollion/flow-core"; import { diff --git a/packages/flow-table/src/components/f-table/f-table.test.ts b/packages/flow-table/src/components/f-table/f-table.test.ts index a210a246a..4a3dd8e82 100644 --- a/packages/flow-table/src/components/f-table/f-table.test.ts +++ b/packages/flow-table/src/components/f-table/f-table.test.ts @@ -2,7 +2,9 @@ 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"; +import { flowTableElements } from "@ollion/flow-table"; +register([...flowCoreElements, ...flowTableElements]); import { ConfigUtil, FCheckbox } from "@ollion/flow-core"; import { FTable, FTcell } from "@ollion/flow-table"; diff --git a/packages/flow-table/src/components/f-tcell/f-tcell.test.ts b/packages/flow-table/src/components/f-tcell/f-tcell.test.ts index 3239b7262..13246a37c 100644 --- a/packages/flow-table/src/components/f-tcell/f-tcell.test.ts +++ b/packages/flow-table/src/components/f-tcell/f-tcell.test.ts @@ -2,7 +2,9 @@ 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"; +import { flowTableElements } from "@ollion/flow-table"; +register([...flowCoreElements, ...flowTableElements]); import { ConfigUtil, FIconButton } from "@ollion/flow-core"; import { FTcell, FTable } from "@ollion/flow-table"; diff --git a/packages/flow-table/src/components/f-trow/f-trow.test.ts b/packages/flow-table/src/components/f-trow/f-trow.test.ts index b07a433f8..693ff49f2 100644 --- a/packages/flow-table/src/components/f-trow/f-trow.test.ts +++ b/packages/flow-table/src/components/f-trow/f-trow.test.ts @@ -2,7 +2,9 @@ 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"; +import { flowTableElements } from "@ollion/flow-table"; +register([...flowCoreElements, ...flowTableElements]); import { ConfigUtil } from "@ollion/flow-core"; import { FTrow, FTable } from "@ollion/flow-table"; diff --git a/stories/flow-form-builder/about.mdx b/stories/flow-form-builder/about.mdx index 2f99647d8..53b61f43a 100644 --- a/stories/flow-form-builder/about.mdx +++ b/stories/flow-form-builder/about.mdx @@ -108,8 +108,9 @@ import "@ollion/flow-form-builder/dist/style.css"; Paste the below snippet in your project and add your application startup/runtime code to it. ```javascript -import "@ollion/flow-core"; -import "@ollion/flow-form-builder"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { flowFormBuilderElements } from "@ollion/flow-form-builder"; +register([...flowCoreElements, ...flowFormBuilderElements]); ```
diff --git a/stories/flow-lineage/introduction/about.mdx b/stories/flow-lineage/introduction/about.mdx index 897e0683d..c668ec494 100644 --- a/stories/flow-lineage/introduction/about.mdx +++ b/stories/flow-lineage/introduction/about.mdx @@ -45,8 +45,9 @@ import "@ollion/flow-lineage/dist/style.css"; `import` lineage after `@ollion/flow-core` like below. 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 "@ollion/flow-lineage"; +import { register, flowCoreElements } from "@ollion/flow-core"; +import { FLineage } from "@ollion/flow-lineage"; +register([...flowCoreElements, FLineage]); ``` #### Step 4 : If your project is typescript enabled then you will need to include import types