mirror of
https://github.com/archtechx/airwire-demo.git
synced 2025-12-12 00:24:03 +00:00
public release
This commit is contained in:
commit
d6d22f8355
115 changed files with 67218 additions and 0 deletions
21
public/.htaccess
Normal file
21
public/.htaccess
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Send Requests To Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
1113
public/css/app.css
vendored
Normal file
1113
public/css/app.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
0
public/favicon.ico
Normal file
0
public/favicon.ico
Normal file
55
public/index.php
Normal file
55
public/index.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Contracts\Http\Kernel;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Check If The Application Is Under Maintenance
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If the application is in maintenance / demo mode via the "down" command
|
||||
| we will load this file so that any pre-rendered content can be shown
|
||||
| instead of starting the framework, which could cause an exception.
|
||||
|
|
||||
*/
|
||||
|
||||
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
||||
require __DIR__.'/../storage/framework/maintenance.php';
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader for
|
||||
| this application. We just need to utilize it! We'll simply require it
|
||||
| into the script here so we don't need to manually load our classes.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once we have the application, we can handle the incoming request using
|
||||
| the application's HTTP kernel. Then, we will send the response back
|
||||
| to this client's browser, allowing them to enjoy our application.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$kernel = $app->make(Kernel::class);
|
||||
|
||||
$response = tap($kernel->handle(
|
||||
$request = Request::capture()
|
||||
))->send();
|
||||
|
||||
$kernel->terminate($request, $response);
|
||||
24656
public/js/app.js
vendored
Normal file
24656
public/js/app.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
98
public/js/component.js
vendored
Normal file
98
public/js/component.js
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).
|
||||
(() => {
|
||||
var exports = __webpack_exports__;
|
||||
/*!***********************************!*\
|
||||
!*** ./resources/js/component.ts ***!
|
||||
\***********************************/
|
||||
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.Component = void 0;
|
||||
|
||||
var Component = /*#__PURE__*/function () {
|
||||
function Component(state) {
|
||||
_classCallCheck(this, Component);
|
||||
|
||||
this.state = state;
|
||||
var refObj = {};
|
||||
var component = this;
|
||||
this.proxy = new Proxy(refObj, {
|
||||
get: function get(object, property) {
|
||||
if (Object.keys(component.state).includes(property)) {
|
||||
return component.state[property];
|
||||
}
|
||||
|
||||
return function () {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return component.call.apply(component, [property].concat(args));
|
||||
}; // if state has it, return it
|
||||
// otherwise it's a method
|
||||
},
|
||||
set: function set(obj, prop, value) {
|
||||
component.update(prop, value);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_createClass(Component, [{
|
||||
key: "update",
|
||||
value: function update(property, value) {// update locally
|
||||
// set loading
|
||||
// send request
|
||||
}
|
||||
}, {
|
||||
key: "call",
|
||||
value: function call(method) {
|
||||
var _this = this;
|
||||
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 1] = arguments[_key2];
|
||||
}
|
||||
|
||||
// todo custom route
|
||||
return fetch('/components/filter/abc', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
state: this.state,
|
||||
changes: [],
|
||||
calls: _defineProperty({}, method, args)
|
||||
})
|
||||
}).then(function (response) {
|
||||
return response.json().then(function (json) {
|
||||
var _a;
|
||||
|
||||
_this.state = json.data;
|
||||
return (_a = json.metadata.calls[method]) !== null && _a !== void 0 ? _a : null;
|
||||
});
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
return Component;
|
||||
}();
|
||||
|
||||
exports.Component = Component; // export function component(alias: string, initialState: any) {
|
||||
// // todo use alias here....
|
||||
// return new Component(initialState).proxy;
|
||||
// }
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
4
public/mix-manifest.json
Normal file
4
public/mix-manifest.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/css/app.css": "/css/app.css"
|
||||
}
|
||||
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow:
|
||||
28
public/web.config
Normal file
28
public/web.config
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
Rewrites requires Microsoft URL Rewrite Module for IIS
|
||||
Download: https://www.iis.net/downloads/microsoft/url-rewrite
|
||||
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
|
||||
-->
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="Imported Rule 1" stopProcessing="true">
|
||||
<match url="^(.*)/$" ignoreCase="false" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||
</conditions>
|
||||
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
|
||||
</rule>
|
||||
<rule name="Imported Rule 2" stopProcessing="true">
|
||||
<match url="^" ignoreCase="false" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="index.php" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
Loading…
Add table
Add a link
Reference in a new issue