this._onEnter(ndx, this.status)}
40 | @mouseleave=${() => this._onExit(ndx, this.status)}
41 | class=${this.placement}
42 | >
43 |
44 |
45 |
`;
46 | }
47 | }
48 |
49 | customElements.define('task-overlay', TaskOverlay);
50 |
51 | declare global {
52 | interface HTMLElementTagNameMap {
53 | 'task-overlay': TaskOverlay;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/packages/query/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "sourceRoot": "packages/query/src",
3 | "projectType": "library",
4 | "targets": {
5 | "build": {
6 | "executor": "@nrwl/js:tsc",
7 | "outputs": ["{options.outputPath}"],
8 | "options": {
9 | "outputPath": "dist/packages/query",
10 | "main": "packages/query/src/index.ts",
11 | "tsConfig": "packages/query/tsconfig.lib.json",
12 | "assets": ["packages/query/*.md"]
13 | }
14 | },
15 | "prod": {
16 | "executor": "@nrwl/web:rollup",
17 | "outputs": ["{options.outputPath}"],
18 | "options": {
19 | "outputPath": "dist/packages/query",
20 | "tsConfig": "packages/query/tsconfig.lib.json",
21 | "project": "packages/query/package.json",
22 | "entryFile": "packages/query/src/index.ts",
23 | "format": ["esm", "cjs"],
24 | "rollupConfig": ["rollup.lib.prod.js", "packages/query/rollup.lib.js"]
25 | }
26 | },
27 | "publish": {
28 | "executor": "@nrwl/workspace:run-commands",
29 | "options": {
30 | "command": "./node_modules/.bin/ts-node tools/scripts/packages/publish-single.ts query"
31 | }
32 | },
33 | "lint": {
34 | "executor": "@nrwl/linter:eslint",
35 | "outputs": ["{options.outputFile}"],
36 | "options": {
37 | "lintFilePatterns": ["packages/query/**/*.ts"]
38 | }
39 | },
40 | "test": {
41 | "executor": "@nrwl/jest:jest",
42 | "outputs": ["coverage/packages/query"],
43 | "options": {
44 | "jestConfig": "packages/query/jest.config.ts",
45 | "passWithNoTests": true
46 | }
47 | }
48 | },
49 | "tags": []
50 | }
51 |
--------------------------------------------------------------------------------
/packages/slice/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "sourceRoot": "packages/slice/src",
3 | "projectType": "library",
4 | "targets": {
5 | "build": {
6 | "executor": "@nrwl/js:tsc",
7 | "outputs": ["{options.outputPath}"],
8 | "options": {
9 | "outputPath": "dist/packages/slice",
10 | "main": "packages/slice/src/index.ts",
11 | "tsConfig": "packages/slice/tsconfig.lib.json",
12 | "assets": ["packages/slice/*.md"]
13 | }
14 | },
15 | "prod": {
16 | "executor": "@nrwl/web:rollup",
17 | "outputs": ["{options.outputPath}"],
18 | "options": {
19 | "outputPath": "dist/packages/slice",
20 | "tsConfig": "packages/slice/tsconfig.lib.json",
21 | "project": "packages/slice/package.json",
22 | "entryFile": "packages/slice/src/index.ts",
23 | "format": ["esm", "cjs"],
24 | "rollupConfig": ["rollup.lib.prod.js", "packages/slice/rollup.lib.js"]
25 | }
26 | },
27 | "publish": {
28 | "executor": "@nrwl/workspace:run-commands",
29 | "options": {
30 | "command": "./node_modules/.bin/ts-node tools/scripts/packages/publish-single.ts slice"
31 | }
32 | },
33 | "lint": {
34 | "executor": "@nrwl/linter:eslint",
35 | "outputs": ["{options.outputFile}"],
36 | "options": {
37 | "lintFilePatterns": ["packages/slice/**/*.ts"]
38 | }
39 | },
40 | "test": {
41 | "executor": "@nrwl/jest:jest",
42 | "outputs": ["coverage/packages/slice"],
43 | "options": {
44 | "jestConfig": "packages/slice/jest.config.ts",
45 | "passWithNoTests": true
46 | }
47 | }
48 | },
49 | "tags": []
50 | }
51 |
--------------------------------------------------------------------------------
/apps/dev/src/features/todos/domain/todos.selectors.ts:
--------------------------------------------------------------------------------
1 | import type { TodosService } from './todos.service';
2 | import type { Task, TodosState } from './todos.types';
3 |
4 | /**
5 | * Select the to-do tasks.
6 | */
7 | export function tasksTodo(tasks: Task[]): Task[] {
8 | return tasks.filter((task) => task.status === 'to-do');
9 | }
10 |
11 | /**
12 | * Select the in-progress tasks.
13 | */
14 | export function tasksInProgress(tasks: Task[]): Task[] {
15 | return tasks.filter((task) => task.status === 'in-progress');
16 | }
17 |
18 | /**
19 | * Select the completed tasks.
20 | */
21 | export function tasksCompleted(tasks: Task[]): Task[] {
22 | return tasks.filter((task) => task.status === 'completed');
23 | }
24 |
25 | /**
26 | * Select the tasks as an object with status keys.
27 | */
28 | export function taskColumns(toDo: Task[], inProgress: Task[], completed: Task[]) {
29 | return [
30 | { icon: 'bell', status: 'to-do', tasks: toDo, title: 'To Do' },
31 | {
32 | icon: 'shipping-fast',
33 | status: 'in-progress',
34 | tasks: inProgress,
35 | title: 'In Progress',
36 | },
37 | { icon: 'check-circle', status: 'completed', tasks: completed, title: 'Completed' },
38 | ];
39 | }
40 |
41 | /**
42 | * Select all data required for the todo view.
43 | */
44 | export function todosData(todos: TodosState, tasks: ReturnType