Skip to content

Commit

Permalink
Fix docs.js failed script and build core package
Browse files Browse the repository at this point in the history
  • Loading branch information
gjovanovicst committed Sep 30, 2023
1 parent 6bec00c commit f3064d4
Show file tree
Hide file tree
Showing 14 changed files with 185 additions and 118 deletions.
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anywhere-ui/angular",
"version": "0.4.0+16",
"version": "0.4.0+17",
"license": "MIT",
"keywords": [
"anywhere-ui",
Expand Down Expand Up @@ -66,5 +66,5 @@
"tslint": "~6.1.3",
"typescript": "4.9.5"
},
"buildnum": "16"
"buildnum": "17"
}
4 changes: 2 additions & 2 deletions packages/angular/projects/anywhere-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anywhere-ui/angular",
"version": "0.4.0+16",
"version": "0.4.0+17",
"license": "MIT",
"keywords": [
"anywhere-ui",
Expand Down Expand Up @@ -33,5 +33,5 @@
"@anywhere-ui/core": "^0.3.0",
"@anywhere-ui/flex": "^1.0.2"
},
"buildnum": "16"
"buildnum": "17"
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,21 @@ export declare interface AnyCheckbox extends Components.AnyCheckbox {


@ProxyCmp({
inputs: ['anyStyle', 'anyTabIndex', 'autoZIndex', 'baseZIndex', 'clearIcon', 'disabled', 'dropdownIcon', 'hideAnimation', 'inputId', 'name', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'value', 'virtualScroll']
inputs: ['anyStyle', 'anyTabIndex', 'autoZIndex', 'baseZIndex', 'clearIcon', 'disabled', 'dropdownIcon', 'filter', 'hideAnimation', 'inputId', 'name', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'value', 'virtualScroll']
})
@Component({
selector: 'any-dropdown',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['anyStyle', 'anyTabIndex', 'autoZIndex', 'baseZIndex', 'clearIcon', 'disabled', 'dropdownIcon', 'hideAnimation', 'inputId', 'name', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'value', 'virtualScroll'],
inputs: ['anyStyle', 'anyTabIndex', 'autoZIndex', 'baseZIndex', 'clearIcon', 'disabled', 'dropdownIcon', 'filter', 'hideAnimation', 'inputId', 'name', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'value', 'virtualScroll'],
})
export class AnyDropdown {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['valueChange', 'aOnShow', 'aOnShowStart', 'aOnHide', 'aOnHideStart', 'aOnFocus', 'aOnBlur', 'aOnClick']);
proxyOutputs(this, this.el, ['valueChange', 'aOnPanelShow', 'aOnPanelShowStart', 'aOnPanelHide', 'aOnPanelHideStart', 'aOnFocus', 'aOnBlur', 'aOnClick']);
}
}

Expand All @@ -153,19 +153,19 @@ export declare interface AnyDropdown extends Components.AnyDropdown {
/**
* Callback to invoke when dropdown overlay gets visible
*/
aOnShow: EventEmitter<CustomEvent<any>>;
aOnPanelShow: EventEmitter<CustomEvent<any>>;
/**
* Callback to invoke when dropdown overlay before gets visible
*/
aOnShowStart: EventEmitter<CustomEvent<any>>;
aOnPanelShowStart: EventEmitter<CustomEvent<any>>;
/**
* Callback to invoke when dropdown overlay gets hidden
*/
aOnHide: EventEmitter<CustomEvent<any>>;
aOnPanelHide: EventEmitter<CustomEvent<any>>;
/**
* Callback to invoke when dropdown overlay before gets hidden
*/
aOnHideStart: EventEmitter<CustomEvent<any>>;
aOnPanelHideStart: EventEmitter<CustomEvent<any>>;
/**
* Callback to invoke when dropdown gets focus
*/
Expand Down Expand Up @@ -369,14 +369,14 @@ export declare interface AnyListbox extends Components.AnyListbox {


@ProxyCmp({
inputs: ['anyStyle', 'anyTabIndex', 'checkbox', 'clearIcon', 'dataKey', 'defaultLabel', 'disabled', 'dropdownIcon', 'filter', 'group', 'hideAnimation', 'inputId', 'name', 'optionGroupChildren', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'value', 'virtualScroll']
inputs: ['anyStyle', 'anyTabIndex', 'checkbox', 'clearIcon', 'dataKey', 'defaultLabel', 'disabled', 'dropdownIcon', 'filter', 'group', 'hideAnimation', 'inputId', 'name', 'optionGroupChildren', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'showToggleAll', 'value', 'virtualScroll']
})
@Component({
selector: 'any-multiselect',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['anyStyle', 'anyTabIndex', 'checkbox', 'clearIcon', 'dataKey', 'defaultLabel', 'disabled', 'dropdownIcon', 'filter', 'group', 'hideAnimation', 'inputId', 'name', 'optionGroupChildren', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'value', 'virtualScroll'],
inputs: ['anyStyle', 'anyTabIndex', 'checkbox', 'clearIcon', 'dataKey', 'defaultLabel', 'disabled', 'dropdownIcon', 'filter', 'group', 'hideAnimation', 'inputId', 'name', 'optionGroupChildren', 'optionLabel', 'optionValue', 'options', 'panelScrollHeight', 'placeholder', 'readonly', 'showAnimation', 'showClear', 'showToggleAll', 'value', 'virtualScroll'],
})
export class AnyMultiselect {
protected el: HTMLElement;
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anywhere-ui/core",
"version": "0.4.0+16",
"version": "0.4.0+17",
"description": "Base components for AnywhereUI",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
Expand Down Expand Up @@ -85,5 +85,5 @@
"build": "^0.1.4",
"run": "^1.4.0"
},
"buildnum": "16"
}
"buildnum": "17"
}
75 changes: 36 additions & 39 deletions packages/core/scripts/docs.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
const rebase = require('rebase');
const fs = require('fs-extra');
const path = require('path');
const replace = require('replace');


let subdir = process.argv[2] || 'anywhere-ui-showcase';
console.log(process.cwd() + '/' + subdir)

// fs.removeSync(process.cwd() + '/' + subdir);
// fs.copySync(process.cwd() + '/www', subdir);

let files = ['index.html', 'app/components/app-config.js'];
files.forEach((filename) => {
let path_to_file = process.cwd() + '/www/' + filename;
let file = fs.readFileSync(path_to_file, 'utf8');
let replacements = {
'^\/(?!\/)': '/' + subdir + '/',
'^(?!\/|http|https)': '/' + subdir + '/',
};
let rebased = rebase(file, {
url: replacements,
a: replacements,
img: replacements,
link: replacements,
script: replacements
});
fs.writeFileSync(path_to_file, rebased);


});

replace({
regex: "@import \"",
replacement: "@import \"\/" + subdir + "",
paths: [process.cwd() + '/www/' + 'app/components/app-config.js'],
recursive: true,
silent: true,
});
const rebase = require("rebase");
const fs = require("fs-extra");
const path = require("path");
const replace = require("replace");

let subdir = process.argv[2] || "anywhere-ui-showcase";
console.log(process.cwd() + "/" + subdir);

// fs.removeSync(process.cwd() + '/' + subdir);
// fs.copySync(process.cwd() + '/www', subdir);

let files = ["index.html"];
files.forEach((filename) => {
let path_to_file = process.cwd() + "/www/" + filename;
let file = fs.readFileSync(path_to_file, "utf8");
let replacements = {
"^/(?!/)": "/" + subdir + "/",
"^(?!/|http|https)": "/" + subdir + "/",
};
let rebased = rebase(file, {
url: replacements,
a: replacements,
img: replacements,
link: replacements,
script: replacements,
});
fs.writeFileSync(path_to_file, rebased);
});

// replace({
// regex: '@import "',
// replacement: '@import "/' + subdir + "",
// paths: [process.cwd() + "/www/" + "app/components/app-config.js"],
// recursive: true,
// silent: true,
// });
23 changes: 13 additions & 10 deletions packages/core/src/components/dropdown/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| `clearIcon` | `clear-icon` | Icon class of the dropdown clear icon | `string` | `"fa-solid:times"` |
| `disabled` | `disabled` | When present, it specifies that the element should be disabled | `boolean` | `false` |
| `dropdownIcon` | `dropdown-icon` | Icon class of the dropdown icon | `string` | `"fa-solid:chevron-down"` |
| `filter` | `filter` | When specified, displays a filter input at header | `boolean` | `false` |
| `hideAnimation` | `hide-animation` | Transition options of the hide animation | `string` | `"growUp"` |
| `inputId` | `input-id` | Identifier of the focus input to match a label defined for the component. | `string` | ``any-dd-${dropdownIds++}`` |
| `name` | `name` | Name of the dropdown input. | `string` | `this.inputId` |
Expand All @@ -33,16 +34,16 @@

## Events

| Event | Description | Type |
| -------------- | ------------------------------------------------------------ | ------------------ |
| `aOnBlur` | Callback to invoke when dropdown loses focus | `CustomEvent<any>` |
| `aOnClick` | Callback to invoke when component is clicked | `CustomEvent<any>` |
| `aOnFocus` | Callback to invoke when dropdown gets focus | `CustomEvent<any>` |
| `aOnHide` | Callback to invoke when dropdown overlay gets hidden | `CustomEvent<any>` |
| `aOnHideStart` | Callback to invoke when dropdown overlay before gets hidden | `CustomEvent<any>` |
| `aOnShow` | Callback to invoke when dropdown overlay gets visible | `CustomEvent<any>` |
| `aOnShowStart` | Callback to invoke when dropdown overlay before gets visible | `CustomEvent<any>` |
| `valueChange` | Callback to invoke when value of dropdown changes | `CustomEvent<any>` |
| Event | Description | Type |
| ------------------- | ------------------------------------------------------------ | ------------------ |
| `aOnBlur` | Callback to invoke when dropdown loses focus | `CustomEvent<any>` |
| `aOnClick` | Callback to invoke when component is clicked | `CustomEvent<any>` |
| `aOnFocus` | Callback to invoke when dropdown gets focus | `CustomEvent<any>` |
| `aOnPanelHide` | Callback to invoke when dropdown overlay gets hidden | `CustomEvent<any>` |
| `aOnPanelHideStart` | Callback to invoke when dropdown overlay before gets hidden | `CustomEvent<any>` |
| `aOnPanelShow` | Callback to invoke when dropdown overlay gets visible | `CustomEvent<any>` |
| `aOnPanelShowStart` | Callback to invoke when dropdown overlay before gets visible | `CustomEvent<any>` |
| `valueChange` | Callback to invoke when value of dropdown changes | `CustomEvent<any>` |


## Shadow Parts
Expand All @@ -56,11 +57,13 @@

### Depends on

- [any-overlay](../overlay)
- [any-listbox](../listbox)

### Graph
```mermaid
graph TD;
any-dropdown --> any-overlay
any-dropdown --> any-listbox
any-listbox --> any-checkbox
any-listbox --> any-input-text
Expand Down
Loading

0 comments on commit f3064d4

Please sign in to comment.