🍴 Meu Garfo é uma visualização em grafo dos CNPJs cuducos.tngl.io/meu-garfo
1

Configure Feed

Select the types of activity you want to include in your feed.

elm-format

+145 -11
+2
.tangled/workflows/check.yaml
··· 11 11 steps: 12 12 - name: "Install" 13 13 command: "npm ci" 14 + - name: "Check" 15 + command: "npm run check" 14 16 - name: "Build" 15 17 command: "npm run build"
+2
README.md
··· 25 25 ``` 26 26 27 27 Os arquivos serão gerados na pasta `dist/`. 28 + 29 + `npm run format` formata os arquivos Elm.
+85 -2
package-lock.json
··· 1 1 { 2 2 "name": "minha-receita-graph", 3 - "version": "1.0.0", 3 + "version": "0.1.0", 4 4 "lockfileVersion": 3, 5 5 "requires": true, 6 6 "packages": { 7 7 "": { 8 8 "name": "minha-receita-graph", 9 - "version": "1.0.0", 9 + "version": "0.1.0", 10 10 "devDependencies": { 11 11 "elm": "^0.19.1-5", 12 + "elm-format": "^0.8.8", 12 13 "elm-live": "^4.0.2" 13 14 } 15 + }, 16 + "node_modules/@avh4/elm-format-darwin-arm64": { 17 + "version": "0.8.8-1", 18 + "resolved": "https://registry.npmjs.org/@avh4/elm-format-darwin-arm64/-/elm-format-darwin-arm64-0.8.8-1.tgz", 19 + "integrity": "sha512-VDu3CRajhB/Sax+CEU4PhIzErBZv8vVxbk9Sk8seUHa1ngfICa3Ejoq3PhnoOFKYF1v1sSxNOC2RnUzvd/9bUw==", 20 + "cpu": [ 21 + "arm64" 22 + ], 23 + "dev": true, 24 + "optional": true, 25 + "os": [ 26 + "darwin" 27 + ] 28 + }, 29 + "node_modules/@avh4/elm-format-darwin-x64": { 30 + "version": "0.8.8-1", 31 + "resolved": "https://registry.npmjs.org/@avh4/elm-format-darwin-x64/-/elm-format-darwin-x64-0.8.8-1.tgz", 32 + "integrity": "sha512-9NAzi3HUBSHEIx3Nje+a6wFcv6RDKv2PO0OUNcV/XlS4Sou3r89xsYAVAXS8mi4+CKTdscyfSSkgGd8qiCCxAw==", 33 + "cpu": [ 34 + "x64" 35 + ], 36 + "dev": true, 37 + "optional": true, 38 + "os": [ 39 + "darwin" 40 + ] 41 + }, 42 + "node_modules/@avh4/elm-format-linux-arm64": { 43 + "version": "0.8.8-1", 44 + "resolved": "https://registry.npmjs.org/@avh4/elm-format-linux-arm64/-/elm-format-linux-arm64-0.8.8-1.tgz", 45 + "integrity": "sha512-VNuXYphgxtnk7Gw+VBgWBeA9k8wKSo9r/O2F7udgurokYLO8S+RGhLHgD9mb6Yecv/veWz4v9n/O0IggH/BOCQ==", 46 + "cpu": [ 47 + "arm64" 48 + ], 49 + "dev": true, 50 + "optional": true, 51 + "os": [ 52 + "linux" 53 + ] 54 + }, 55 + "node_modules/@avh4/elm-format-linux-x64": { 56 + "version": "0.8.8-1", 57 + "resolved": "https://registry.npmjs.org/@avh4/elm-format-linux-x64/-/elm-format-linux-x64-0.8.8-1.tgz", 58 + "integrity": "sha512-IvtmUTDw/V5mBeglLgtQMzWZPc0QvmqUmoJ+vipxYii3DJ/1KV2drtpvlLuFdBlFrehUivtrh4HhOTsdGXxyXQ==", 59 + "cpu": [ 60 + "x64" 61 + ], 62 + "dev": true, 63 + "optional": true, 64 + "os": [ 65 + "linux" 66 + ] 67 + }, 68 + "node_modules/@avh4/elm-format-win32-x64": { 69 + "version": "0.8.8-1", 70 + "resolved": "https://registry.npmjs.org/@avh4/elm-format-win32-x64/-/elm-format-win32-x64-0.8.8-1.tgz", 71 + "integrity": "sha512-qGYZM2oJFSVQ80Tayk1v15ba7PWCU3B89EkA3Fy4YQasvtA+UrYYR5Bv7MRF4kn6Zp7oSDk4FhknURFsZWZ7kg==", 72 + "cpu": [ 73 + "x64" 74 + ], 75 + "dev": true, 76 + "optional": true, 77 + "os": [ 78 + "win32" 79 + ] 14 80 }, 15 81 "node_modules/ajv": { 16 82 "version": "6.15.0", ··· 327 393 }, 328 394 "engines": { 329 395 "node": ">=7.0.0" 396 + } 397 + }, 398 + "node_modules/elm-format": { 399 + "version": "0.8.8", 400 + "resolved": "https://registry.npmjs.org/elm-format/-/elm-format-0.8.8.tgz", 401 + "integrity": "sha512-OJYUtVnepuy8UZdnL5OCjSxUY5+dIGP2NdWTB6icxVVOOH0b8MpJIijTPsGW+ztnv9yzSoTK0dhCuVDh+AGhNQ==", 402 + "dev": true, 403 + "hasInstallScript": true, 404 + "bin": { 405 + "elm-format": "bin/elm-format" 406 + }, 407 + "optionalDependencies": { 408 + "@avh4/elm-format-darwin-arm64": "0.8.8-1", 409 + "@avh4/elm-format-darwin-x64": "0.8.8-1", 410 + "@avh4/elm-format-linux-arm64": "0.8.8-1", 411 + "@avh4/elm-format-linux-x64": "0.8.8-1", 412 + "@avh4/elm-format-win32-x64": "0.8.8-1" 330 413 } 331 414 }, 332 415 "node_modules/elm-hot": {
+3
package.json
··· 6 6 "scripts": { 7 7 "start": "node configure.js && elm-live src/Main.elm --dir=dist --port=${PORT:-8000} -- --output=dist/main.js --debug", 8 8 "build": "node configure.js && elm make src/Main.elm --output=dist/main.js", 9 + "format": "elm-format --yes src/", 10 + "check": "elm-format --validate src/", 9 11 "deploy": "node deploy.js" 10 12 }, 11 13 "devDependencies": { 12 14 "elm": "^0.19.1-5", 15 + "elm-format": "^0.8.8", 13 16 "elm-live": "^4.0.2" 14 17 } 15 18 }
+27 -3
src/Main.elm
··· 1 1 module Main exposing (main) 2 2 3 3 import Api 4 - import Format 5 4 import Browser 6 5 import Browser.Dom as Dom 7 6 import Browser.Events 8 7 import Browser.Navigation as Nav 9 8 import Dict exposing (Dict) 9 + import Format 10 10 import Graph 11 11 import Html exposing (Html) 12 12 import Http ··· 385 385 in 386 386 case existing.entity of 387 387 Person oldName oldCpf -> 388 - { existing | entity = Person name (if data.cpf /= Nothing then data.cpf else oldCpf) } 388 + { existing 389 + | entity = 390 + Person name 391 + (if data.cpf /= Nothing then 392 + data.cpf 393 + 394 + else 395 + oldCpf 396 + ) 397 + } 389 398 390 399 _ -> 391 400 { existing | entity = Person name data.cpf } ··· 444 453 if partner.name /= Nothing || partner.cpf /= Nothing then 445 454 case existing.entity of 446 455 Person oldName oldCpf -> 447 - { existing | entity = Person (if partner.name /= Nothing then name else oldName) (if partner.cpf /= Nothing then partner.cpf else oldCpf) } 456 + { existing 457 + | entity = 458 + Person 459 + (if partner.name /= Nothing then 460 + name 461 + 462 + else 463 + oldName 464 + ) 465 + (if partner.cpf /= Nothing then 466 + partner.cpf 467 + 468 + else 469 + oldCpf 470 + ) 471 + } 448 472 449 473 _ -> 450 474 { existing | entity = entity }
+26 -6
src/View.elm
··· 1 1 module View exposing (view) 2 2 3 3 import Dict exposing (Dict) 4 - import Html exposing (Html, a, button, div, footer, h1, header, input, label, main_, nav, small, text, ul, li, span) 5 - import Html.Attributes exposing (class, for, id, placeholder, type_, value, attribute, href) 6 - import Html.Events exposing (onClick, onInput, preventDefaultOn, custom) 4 + import Format 5 + import Html exposing (Html, a, button, div, footer, h1, header, input, label, li, main_, nav, small, span, text, ul) 6 + import Html.Attributes exposing (attribute, class, for, href, id, placeholder, type_, value) 7 + import Html.Events exposing (custom, onClick, onInput, preventDefaultOn) 7 8 import Json.Decode as Decode 8 9 import Set exposing (Set) 9 - import Svg exposing (Svg, g, line, svg, text_, circle) 10 + import Svg exposing (Svg, circle, g, line, svg, text_) 10 11 import Svg.Attributes as SA 11 12 import Svg.Events as SE 12 13 import Types exposing (..) 13 - import Format 14 14 15 15 16 16 view : Model -> Html Msg ··· 313 313 ] 314 314 [ circle 315 315 [ SA.r (String.fromFloat radius) 316 - , SA.class (nodeClass ++ (if isVisited then " visited" else " expandable") ++ (if node.error /= Nothing then " errored" else "") ++ (if isRoot then " root" else "")) 316 + , SA.class 317 + (nodeClass 318 + ++ (if isVisited then 319 + " visited" 320 + 321 + else 322 + " expandable" 323 + ) 324 + ++ (if node.error /= Nothing then 325 + " errored" 326 + 327 + else 328 + "" 329 + ) 330 + ++ (if isRoot then 331 + " root" 332 + 333 + else 334 + "" 335 + ) 336 + ) 317 337 , onNodeMouseDown node 318 338 ] 319 339 []