@operato/shell 8.0.0-alpha.51 → 8.0.0-beta.1

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.
@@ -1,77 +0,0 @@
1
- import startCase from 'lodash-es/startCase'
2
- import { updateMetadata } from 'pwa-helpers/metadata.js'
3
-
4
- import {
5
- REGISTER_NAVIGATION_CALLBACK,
6
- UNREGISTER_NAVIGATION_CALLBACK,
7
- UPDATE_ACTIVE_PAGE,
8
- UPDATE_CONTEXT,
9
- UPDATE_PAGE
10
- } from '../actions/const'
11
-
12
- const APP_TITLE_EL = document.querySelector('meta[name="application-name"]') as HTMLMetaElement
13
-
14
- var appTitle: string | undefined
15
- if (APP_TITLE_EL) {
16
- appTitle = APP_TITLE_EL.content
17
- }
18
-
19
- const INITIAL_STATE: {
20
- page: string
21
- resourceId: string
22
- params: any
23
- activePage: any
24
- context: any
25
- callbacks: any[]
26
- } = {
27
- page: '',
28
- resourceId: '',
29
- params: {},
30
- activePage: null,
31
- context: {},
32
- callbacks: []
33
- }
34
-
35
- const route = (state = INITIAL_STATE, action: any) => {
36
- switch (action.type) {
37
- case UPDATE_PAGE:
38
- return {
39
- ...state,
40
- page: action.page,
41
- resourceId: action.resourceId,
42
- params: action.params
43
- }
44
- case UPDATE_CONTEXT:
45
- let title = action.context?.title
46
- let text = typeof title === 'object' ? title.text : title
47
-
48
- updateMetadata({
49
- title: appTitle + (text ? ` - ${startCase(text)}` : '')
50
- })
51
- return {
52
- ...state,
53
- context: action.context || (state.activePage && state.activePage.context) || {}
54
- }
55
- case UPDATE_ACTIVE_PAGE:
56
- return {
57
- ...state,
58
- activePage: action.activePage
59
- }
60
-
61
- case REGISTER_NAVIGATION_CALLBACK:
62
- return {
63
- ...state,
64
- callbacks: [...state.callbacks, action.callback]
65
- }
66
- case UNREGISTER_NAVIGATION_CALLBACK:
67
- return {
68
- ...state,
69
- callbacks: state.callbacks.filter(callback => callback !== action.callback)
70
- }
71
-
72
- default:
73
- return state
74
- }
75
- }
76
-
77
- export default route
package/src/store.ts DELETED
@@ -1,36 +0,0 @@
1
- import { lazyReducerEnhancer, LazyStore } from 'pwa-helpers/lazy-reducer-enhancer.js'
2
- import { Action, applyMiddleware, combineReducers, compose, createStore, Store } from 'redux'
3
- import thunk from 'redux-thunk'
4
-
5
- import app from './reducers/app'
6
- import route from './reducers/route'
7
- import busy from './reducers/busy'
8
-
9
- declare global {
10
- var __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any
11
- }
12
-
13
- // Sets up a Chrome extension for time travel debugging.
14
- // See https://github.com/zalmoxisus/redux-devtools-extension for more information.
15
- const devCompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
16
-
17
- // Only for providing test environment - combineReducers 에서 process.env.NODE_ENV를 접근하기 때문에.
18
- if (typeof window.process == 'undefined') {
19
- window.process = {
20
- env: {
21
- NODE_ENV: JSON.stringify('development')
22
- }
23
- } as any
24
- }
25
-
26
- export const store: Store<unknown, Action<any>> & LazyStore = createStore(
27
- state => state,
28
- devCompose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk))
29
- )
30
-
31
- // Initially loaded reducers.
32
- store.addReducers({
33
- app,
34
- route,
35
- busy
36
- })
@@ -1,22 +0,0 @@
1
- export class Domain {
2
- readonly id?: string
3
-
4
- name?: string
5
- description?: string
6
-
7
- subdomain?: string
8
-
9
- extType?: string
10
- timezone?: string
11
- systemFlag?: boolean
12
-
13
- brandName?: string
14
- brandImage?: string
15
- contentImage?: string
16
-
17
- owner?: string
18
- theme?: string
19
-
20
- createdAt?: Date
21
- updatedAt?: Date
22
- }
@@ -1,5 +0,0 @@
1
- export * from './domain'
2
- export * from './privilege'
3
- export * from './role'
4
- export * from './user'
5
- export * from './types'
@@ -1,28 +0,0 @@
1
- import { Role } from './role'
2
- import { User } from './user'
3
-
4
- export class Privilege {
5
- id?: string
6
-
7
- name?: string
8
-
9
- category?: string
10
-
11
- nullable?: true
12
-
13
- description?: string
14
-
15
- roles?: Role[]
16
-
17
- creator?: User
18
-
19
- creatorId?: string
20
-
21
- updater?: User
22
-
23
- updaterId?: string
24
-
25
- createdAt?: Date
26
-
27
- updatedAt?: Date
28
- }
package/src/types/role.ts DELETED
@@ -1,33 +0,0 @@
1
- import { Domain } from './domain'
2
- import { User } from './user'
3
- import { Privilege } from './privilege'
4
-
5
- export class Role {
6
- readonly id?: string
7
-
8
- domain?: Domain
9
-
10
- domainId?: string
11
-
12
- name?: string
13
-
14
- users?: User[]
15
-
16
- privileges?: Privilege[]
17
-
18
- nullable?: true
19
-
20
- description?: string
21
-
22
- creator?: User
23
-
24
- creatorId?: string
25
-
26
- updater?: User
27
-
28
- updaterId?: string
29
-
30
- createdAt?: Date
31
-
32
- updatedAt?: Date
33
- }
@@ -1,5 +0,0 @@
1
- export enum InheritedValueType {
2
- None = 'None',
3
- Include = 'Include',
4
- Only = 'Only'
5
- }
package/src/types/user.ts DELETED
@@ -1,23 +0,0 @@
1
- export enum UserStatus {
2
- INACTIVE = 'inactive',
3
- ACTIVATED = 'activated',
4
- DELETED = 'deleted',
5
- LOCKED = 'locked',
6
- BANNED = 'banned',
7
- PWD_RESET_REQUIRED = 'password_reset_required'
8
- }
9
-
10
- export class User {
11
- readonly id?: string
12
-
13
- name?: string
14
- description?: string
15
-
16
- email?: string
17
-
18
- creator?: User
19
- updater?: User
20
-
21
- createdAt?: Date
22
- updatedAt?: Date
23
- }
@@ -1,51 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
-
3
- import { css, html, render, TemplateResult } from 'lit'
4
- import '../src/app/app.js'
5
-
6
- export default {
7
- title: 'things-app',
8
- component: 'things-app',
9
- argTypes: {
10
- label: { control: 'string' }
11
- }
12
- }
13
-
14
- interface Story<T> {
15
- (args: T): TemplateResult
16
- args?: Partial<T>
17
- argTypes?: Record<string, unknown>
18
- }
19
-
20
- interface ArgTypes {
21
- label?: string
22
- }
23
-
24
- const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
25
- <link href="/themes/app-theme.css" rel="stylesheet" />
26
- <link
27
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
28
- rel="stylesheet"
29
- />
30
- <link
31
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
32
- rel="stylesheet"
33
- />
34
- <link
35
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
36
- rel="stylesheet"
37
- />
38
-
39
- <style>
40
- body {
41
- background-color: var(--md-sys-color-surface);
42
- }
43
- </style>
44
-
45
- <things-app></things-app>
46
- `
47
-
48
- export const Regular = Template.bind({})
49
- Regular.args = {
50
- label: 'common header styles'
51
- }
package/tsconfig.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "noEmitOnError": true,
7
- "lib": ["es2017", "dom"],
8
- "strict": true,
9
- "esModuleInterop": false,
10
- "allowSyntheticDefaultImports": true,
11
- "experimentalDecorators": true,
12
- "useDefineForClassFields": false,
13
- "importHelpers": true,
14
- "outDir": "dist",
15
- "sourceMap": true,
16
- "inlineSources": true,
17
- "rootDir": "./",
18
- "declaration": true,
19
- "incremental": true,
20
- "skipLibCheck": true,
21
- "types": ["node", "mocha"]
22
- },
23
- "include": ["**/*.ts"]
24
- }
@@ -1,27 +0,0 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr');
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- open: '/demo/',
8
- /** Use regular watch mode if HMR is not enabled. */
9
- watch: !hmr,
10
- /** Resolve bare module imports */
11
- nodeResolve: {
12
- exportConditions: ['browser', 'development'],
13
- },
14
-
15
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
16
- // esbuildTarget: 'auto'
17
-
18
- /** Set appIndex to enable SPA routing */
19
- // appIndex: 'demo/index.html',
20
-
21
- plugins: [
22
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
23
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
24
- ],
25
-
26
- // See documentation for all available options
27
- });
@@ -1,41 +0,0 @@
1
- // import { playwrightLauncher } from '@web/test-runner-playwright';
2
-
3
- const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4
-
5
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6
- /** Test files to run */
7
- files: 'dist/test/**/*.test.js',
8
-
9
- /** Resolve bare module imports */
10
- nodeResolve: {
11
- exportConditions: ['browser', 'development'],
12
- },
13
-
14
- /** Filter out lit dev mode logs */
15
- filterBrowserLogs(log) {
16
- for (const arg of log.args) {
17
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18
- return false;
19
- }
20
- }
21
- return true;
22
- },
23
-
24
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25
- // esbuildTarget: 'auto',
26
-
27
- /** Amount of browsers to run concurrently */
28
- // concurrentBrowsers: 2,
29
-
30
- /** Amount of test files per browser to test concurrently */
31
- // concurrency: 1,
32
-
33
- /** Browsers to run tests on */
34
- // browsers: [
35
- // playwrightLauncher({ product: 'chromium' }),
36
- // playwrightLauncher({ product: 'firefox' }),
37
- // playwrightLauncher({ product: 'webkit' }),
38
- // ],
39
-
40
- // See documentation for all available options
41
- });