@infly/ui 1.0.18 → 1.0.20

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.
Files changed (34) hide show
  1. package/README.md +53 -43
  2. package/index.js +47 -33
  3. package/package.json +60 -29
  4. package/scripts/install-comp.js +13 -0
  5. package/src/Base/InflyCheckBox/InflyCheckBox.test.js +154 -0
  6. package/src/Base/InflyCheckBox/InflyCheckBox.vue +227 -0
  7. package/src/Base/InflyCheckBox/index.js +6 -0
  8. package/src/Base/InflyDialog/InflyDialog.test.js +122 -0
  9. package/src/Base/InflyDialog/InflyDialog.vue +111 -0
  10. package/src/Base/InflyDialog/index.js +6 -0
  11. package/src/Base/InflyForm/InflyForm.test.js +239 -0
  12. package/src/Base/InflyForm/InflyForm.vue +974 -0
  13. package/src/Base/InflyForm/index.js +6 -0
  14. package/src/Base/InflyInput/InflyInput.test.js +105 -0
  15. package/src/Base/InflyInput/InflyInput.vue +167 -0
  16. package/src/Base/InflyInput/index.js +6 -0
  17. package/src/Base/InflyList/InflyList.test.js +229 -0
  18. package/src/Base/InflyList/InflyList.vue +926 -0
  19. package/src/Base/InflyList/index.js +6 -0
  20. package/src/Business/BusinessSwitch/BusinessSwitch.test.js +250 -0
  21. package/src/Business/BusinessSwitch/BusinessSwitch.vue +115 -0
  22. package/src/Business/BusinessSwitch/index.js +6 -0
  23. package/src/Business/BusinessTag/BusinessTag.test.js +70 -0
  24. package/src/Business/BusinessTag/BusinessTag.vue +58 -0
  25. package/src/Business/BusinessTag/index.js +6 -0
  26. package/src/Business/InstitutionSelect/InstitutionSelect.test.js +281 -0
  27. package/src/Business/InstitutionSelect/InstitutionSelect.vue +768 -0
  28. package/src/Business/InstitutionSelect/index.js +6 -0
  29. package/src/utils/Uts.js +3 -0
  30. package/src/utils/ts-libs.test.js +31 -0
  31. package/styles/base.scss +755 -0
  32. package/styles/index.scss +202 -0
  33. package/styles/mixin.scss +19 -0
  34. package/styles/variables.scss +24 -0
@@ -0,0 +1,6 @@
1
+ import InstitutionSelect from "./InstitutionSelect.vue";
2
+ import { withInstall } from "../../../scripts/install-comp";
3
+
4
+ export { InstitutionSelect };
5
+
6
+ export default withInstall(InstitutionSelect);
@@ -0,0 +1,3 @@
1
+ import * as Uts from "@infly/ts-libs";
2
+
3
+ export default Uts;
@@ -0,0 +1,31 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+
5
+ describe("@infly/ui 的 @infly/ts-libs 适配层", () => {
6
+ it("提供组件现有 Uts 调用所需的纯函数与深拷贝", async () => {
7
+ const module = await import("./Uts.js");
8
+ const Uts = module.default;
9
+
10
+ expect(Uts.isFunction(() => {})).toBe(true);
11
+ expect(Uts.notEmptyArray([1])).toBe(true);
12
+ expect(Uts.getNestedValue({ user: { name: "Infly" } }, "user.name")).toBe("Infly");
13
+
14
+ const source = { nested: { value: 1 } };
15
+ const result = Uts.copyObj(source);
16
+ expect(result).toEqual(source);
17
+ expect(result.nested).not.toBe(source.nested);
18
+ });
19
+
20
+ it("InflyForm 直接消费 ts-libs,UI 包不保存 Vue2 导出适配器", () => {
21
+ const formPath = path.resolve(
22
+ __dirname,
23
+ "../Base/InflyForm/InflyForm.vue",
24
+ );
25
+ const localExportPath = path.resolve(__dirname, "file-export.js");
26
+ const source = fs.readFileSync(formPath, "utf8");
27
+
28
+ expect(source).toContain('import { exportFile } from "@infly/ts-libs";');
29
+ expect(fs.existsSync(localExportPath)).toBe(false);
30
+ });
31
+ });