@arkitektbedriftene/fe-lib 0.2.6 → 0.2.7
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/dist/lib/icons/productExternalIdToIcon.d.ts +3 -0
- package/dist/productExternalIdToIcon.d.ts +3 -0
- package/package.json +6 -3
- package/src/App.tsx +2 -3
- package/src/lib/icons/README.md +1 -0
- package/src/lib/icons/{icon.tsx → productExternalIdToIcon.tsx} +1 -1
- package/vite.config.ts +1 -1
- package/dist/icon.d.ts +0 -3
- package/dist/lib/icons/icon.d.ts +0 -3
- /package/dist/{icon.cjs.js → productExternalIdToIcon.cjs.js} +0 -0
- /package/dist/{icon.es.js → productExternalIdToIcon.es.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkitektbedriftene/fe-lib",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.umd.cjs",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"require": "./dist/hooks.umd.cjs"
|
|
19
19
|
},
|
|
20
20
|
"./icons": {
|
|
21
|
-
"import": "./dist/
|
|
22
|
-
"require": "./dist/
|
|
21
|
+
"import": "./dist/productExternalIdToIcon.es.js",
|
|
22
|
+
"require": "./dist/productExternalIdToIcon.umd.js"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"typesVersions": {
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
],
|
|
33
33
|
"icon": [
|
|
34
34
|
"dist/icon.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"hooks": [
|
|
37
|
+
"dist/hook.d.ts"
|
|
35
38
|
]
|
|
36
39
|
}
|
|
37
40
|
},
|
package/src/App.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
import reactLogo from './assets/react.svg'
|
|
3
3
|
import './App.css'
|
|
4
|
+
import ProductExternalIdToIcon from './lib/icons/productExternalIdToIcon'
|
|
4
5
|
|
|
5
6
|
function App() {
|
|
6
7
|
const [count, setCount] = useState(0)
|
|
@@ -22,9 +23,7 @@ function App() {
|
|
|
22
23
|
Edit <code>src/App.tsx</code> and save to test HMR
|
|
23
24
|
</p>
|
|
24
25
|
</div>
|
|
25
|
-
<
|
|
26
|
-
Click on the Vite and React logos to learn more
|
|
27
|
-
</p>
|
|
26
|
+
<ProductExternalIdToIcon ExternalId='M_MEDLEM'></ProductExternalIdToIcon>
|
|
28
27
|
</div>
|
|
29
28
|
)
|
|
30
29
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<ProductExternalIdToIcon ExternalId='M_MEDLEM'></ProductExternalIdToIcon>
|
|
@@ -14,7 +14,7 @@ import { GrStatusUnknown } from 'react-icons/gr'
|
|
|
14
14
|
import { AiOutlineMedium } from "react-icons/ai";
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
export default function
|
|
17
|
+
export default function ProductExternalIdToIcon(props: { ExternalId: string }) {
|
|
18
18
|
if (props.ExternalId == null || props.ExternalId == '')
|
|
19
19
|
return <GrStatusUnknown />;
|
|
20
20
|
if (props.ExternalId.indexOf("SYKELONN") > -1)
|
package/vite.config.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default defineConfig({
|
|
|
10
10
|
"src/lib/index.ts",
|
|
11
11
|
"src/lib/oidc/oidc.tsx",
|
|
12
12
|
"src/lib/hooks/hooks.ts",
|
|
13
|
-
"src/lib/icons/
|
|
13
|
+
"src/lib/icons/productExternalIdToIcon.tsx",
|
|
14
14
|
],
|
|
15
15
|
name: "fe-lib",
|
|
16
16
|
fileName: (format, entryname) => `${entryname}.${format}.js`,
|
package/dist/icon.d.ts
DELETED
package/dist/lib/icons/icon.d.ts
DELETED
|
File without changes
|
|
File without changes
|